Difference between revisions of "Category:Render Controller Helper Scripts"

From The Foundry MODO SDK wiki
Jump to: navigation, search
Line 30: Line 30:
* [[Scripting]]
* [[Scripting]]
[[Category:Example Scripts]]
[[Category:Script Examples]]

Latest revision as of 22:52, 1 April 2012

There are a few common tasks that are commonly performed by render controllers that can only really be done through the use of scripts. This can be a hurdle for render controller developers new to modo.

These scripts are included in the default modo resource directory, but the source is provided here for reference. These can be used from the GUI, from headlless mode and from Telnet.

Here is a quick example of how you might use the following scripts in a render controller by piping the following commands into modo.

The first line first turns on logging output through Log.toConsole and Log.toConsoleRolling. These is useful for obtaining status information (especially when rendering), but is not necessary.

Next it calls Scene.open to load a scene normally.

The Pref.value call sets the render threads to automatic, ensuring that all of the CPUs on the machine are utilized. Note that you should generally not make changes to the preferences if you are using the same config file that the user uses when running modo normally, since you don't want to change the user's settings out form under them. If you are using your on config file specifically for rendering, this isn’t an issue. If you are using the user’s config file, you should either restore it back to the original settings when you are done, or you should run modo with -dbon:noconfig, which forces modo to skip saving the config file when it quits.

The frame range is set to 1 through 60 via the @ChangeRenderFrameRange.pl script. The output paths for all render items are modified to point to a particular renders directory using the @ChangeRenderOutputPaths.pl script.

Finally, the animation is rendered with render.animation. The asterisk tells the command to use the render output items for the save file formats and paths. Once the render has completed, the application is told to exit through a call to app.quit.

log.toConsole true
log.toConsoleRolling true
scene.open "r:\NetRender\modo\Content\Food\CoffeeBeans.lxo" normal
pref.value render.threads auto
@ChangeRenderFrameRange 1 60
@ChangeRenderOutputPaths R:\NETRENDER\frames4\
render.animation {*}

More Information

Pages in category "Render Controller Helper Scripts"

The following 2 pages are in this category, out of 2 total.