Difference between revisions of "ChangeRenderFrameRange Script"

From The Foundry MODO SDK wiki
Jump to: navigation, search
(More Information)
Line 87: Line 87:
 
-- Make sure we have our arguments
 
-- Make sure we have our arguments
 
if( (#arg != 1) && (#arg != 2) ) {
 
if( (#arg != 1) && (#arg != 2) ) {
     lxout( "Usage: \@ChangeRenderFrameRange.lua first last <step>" );
+
     lxout( "Usage: @ChangeRenderFrameRange.lua first last <step>" );
 
     lxout( "Changes the render frame range for the first render item in the scene." );
 
     lxout( "Changes the render frame range for the first render item in the scene." );
 
     lxout( "First and last frame are required; frame step is optional." );
 
     lxout( "First and last frame are required; frame step is optional." );
Line 137: Line 137:
 
args = lx.args()
 
args = lx.args()
 
if (len(args) != 1) && (len(args) != 2):
 
if (len(args) != 1) && (len(args) != 2):
     lxout( "Usage: \@ChangeRenderFrameRange.lua first last <step>" )
+
     lxout( "Usage: @ChangeRenderFrameRange.lua first last <step>" )
 
     lxout( "Changes the render frame range for the first render item in the scene." )
 
     lxout( "Changes the render frame range for the first render item in the scene." )
 
     lxout( "First and last frame are required; frame step is optional." )
 
     lxout( "First and last frame are required; frame step is optional." )

Revision as of 23:06, 1 April 2012

This simple script changes the first frame, last frame and frame step of the first render item in the scene. This is a bit easier than calling three separate item.channel commands and making sure that the first render item is actually selected.

TabbedArea

The first and last frame arguments are required, while the frame step is optional. This sets the first frame to 1 and the last frame to 60.

TabbedArea

This script could be simplified by directly selecting the render items with Select.itemType, but this extended version can be used as a framework for other scripts that operate on item types.

TabbedArea

More Information