v1.0
ビューポートをキャプチャしてイメージ シーケンスに取り込みます。
注: このコマンドは、Softimage ユーザ インターフェイスに依存しているため、通常のバッチ モードでは機能しません。 ただし、「-script」の代わりに「-uiscript」コマンドライン引数を使用すると、このコマンドをバッチ プロセスの一部として使用できます。
CaptureViewport( [Target], [Interactive] ); |
パラメータ | タイプ | 説明 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Target | Long |
キャプチャするビューポート。 デフォルト値:-1 (現在選択されているビューポート、現在ビューポートが選択されていない場合はビューポート B)
|
||||||||||||
Interactive | Boolean |
バッチ モードで実行するか(False)、インタラクティブ モードで実行するか(True)を指定します。 デフォルト値: False |
/* This example demonstrates how to perform a viewport capture via scripting. The File Format is specified by the File Name extension. To specify the codec parameters, you can save a preset via the UI and then load the preset back by scripting anytime you need it. You can also specify the codec parameters by setting the "DSCodec" parameter, which contains an encoded string for the codec parameters. The string for a desired set of codec parameters can be obtained by doing a capture interactively as following: - in a 3D view, click the Camera pulldown menu > Start Capture to open the Capture Viewport dialog - select the desired format from the File Format pulldown menu - click Codec to select the desired parameters, click OK to exit the codec dialog - click OK to start a capture The encoded string for the codec parameters is printed in the Script History window. You can copy it for future use in scripting. You can also get the encoded codec parameters string by scripting, e.g.: LogMessage( GetValue("ViewportCapture.DSCodec")); */ // Get the current frame var currFrame = ActiveProject.Properties.Item("Play Control").Parameters.Item("Current").Value; // Set the capture options var oViewportCapture = Dictionary.GetObject("ViewportCapture"); // Capture a 1-frame sequence oViewportCapture.NestedObjects.Item("Start Frame").Value = currFrame; oViewportCapture.NestedObjects.Item("End Frame").Value = currFrame; // Specify the output file name // The output file format is determined by the extension oViewportCapture.NestedObjects.Item("File Name").Value = "C:\\test.mov"; // Set the Quicktime codec parameters (in this case: "Keyframe every 10 frames") SetValue("ViewportCapture.DSCodec", "AAAAFnNwdGxycHphAAAAAAAQAAACAAAAABR0cHJsAAACAAAd+FEAAAAKAAAAGGRyYXQAAAAAAAAAUwAAAQAAAAEAAAAACW1wc28AAAAADG1mcmEAAAAAAAAADHBzZnIAAAAAAAAACWJmcmEAAAAACm1wZXMAAAAAABxoYXJkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKc2RuZQAAAAAADGNtZnJhcHBsAAAAAA==", null); // Do not display dialog CaptureViewport( 2, false ); |
CreatePrim "Sphere", "NurbsSurface", "MySphere" SetValue "PlayControl.Out", 40 ' Setting a key frame on XPos at frame 1 SaveKey "MySphere.kine.local.posx", 1, -9.0 ' Setting a key frame on XPos at frame 10 SaveKey "MySphere.kine.local.posx", 10, 3.0 ' Setting a key frame on XPos at frame 30 SaveKey "MySphere.kine.local.posx", 30,-3.0 ' Setting a key frame on XPos at frame 40 SaveKey "MySphere.kine.local.posx", 40, 9.0 ' Setting a key frame on YPos at frame 1 SaveKey "MySphere.kine.local.posy", 1, -2.0 ' Setting a key frame on YPos at frame 30 SaveKey "MySphere.kine.local.posy", 30, 2.0 SetDisplayMode "Camera", "shaded" CaptureViewport 2, true |