v1.0
viewing
Captures the viewport into an image sequence.
Note: This command does not work in normal batch mode because it
relies on the Softimage user interface. However you can use the
"-uiscript" command line argument instead of "-script" to use this
command as part of a batch process.
CaptureViewport( [Target], [Interactive] ); |
Parameter | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Target | Long | Viewport to capture.
Default Value: -1 (the current viewport, or viewport B if no current viewport)
|
||||||||||||
Interactive | Boolean | Specifies whether running in batch mode (False) or interactive
mode (True)
Default Value: False |
/* This example demonstrates how to perform a viewport capture via scripting. NB: You cannot set the codec from scripting. The codec is a combination of codec ID and private codec-specific parameters (not a human-readable string). However, you can save the codec in a preset via the UI and then load the preset back by scripting anytime you need it. */ // 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.pic"; // 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 |