/*
This example demonstrates how to use this command in the script by first
generating the image files via a render pass (required for this command)
*/
// Set up a new scene with a cube
NewScene( null, false );
var obj = CreatePrim( "Cube", "MeshSurface" );
SetValue( obj + ".cube.length", 4 );
// Add some animation
SetMarking( ".kine.local.sclx,.kine.local.scly,.kine.local.sclz" );
SaveKey( "", 1 );
Scale( null, 0.5, 0.5, 0.5, siAbsolute, siPivot );
SaveKey( "", 2 );
Scale( null, 0.25, 0.25, 0.25, siAbsolute, siPivot );
SaveKey( "", 3 );
// Set the Diffuse color to yellow (to see it)
MakeLocal( obj + ".Scene_Material", siDefaultPropagation );
SetValue( obj + ".Scene_Material.Phong.diffuse.blue", 0.239 );
SetValue( obj + ".Scene_Material.Phong.diffuse.green", 0.897 );
SetValue( obj + ".Scene_Material.Phong.diffuse.red", 0.91 );
// Render the scene using the default pass (use only 3
// frames to shorten the render time)
var cpass = Dictionary.GetObject( "Passes.Default_Pass" );
SetValue( cpass + ".FrameRangeSource", 0 );
SetValue( cpass + ".FrameEnd", 3 );
RenderPasses( cpass );
// Open the flipbook
LaunchFlipbookForPass( cpass );
|