timdose
03-20-2008, 10:35 PM
Hi All
I have a script which checks which objects are in a group, then creates a separate render layer for each one of them. The idea is to break an object made of multiple parts into separate parts/images. Ideally, this would happen at render time, such that any file with a group of the correct name would have the render layers generated on-the-spot at render time.
When I source this script in Maya and execute the command- everything works fine. The render layers get created, I save the scene, and the scene renders happily from the command line, spitting out the expected zillion images.
However, when I run this exact same script as a -preRender script via the command line using the original, unmodified file, the command is executed (I can tell because it prints the expected output to the shell), but *nothing* renders. It prints the output from my script, then the next line says that the scene has completed rendering.
The script pretty much just uses "ls" and "createRenderLayer" with some loops- no AETemplates or interface macro-type commands...
Any thoughts on why the script would behave differently when run from the command line and cause no rendering to happen at all? Any input would be greatly appreciated!
Tim
I have a script which checks which objects are in a group, then creates a separate render layer for each one of them. The idea is to break an object made of multiple parts into separate parts/images. Ideally, this would happen at render time, such that any file with a group of the correct name would have the render layers generated on-the-spot at render time.
When I source this script in Maya and execute the command- everything works fine. The render layers get created, I save the scene, and the scene renders happily from the command line, spitting out the expected zillion images.
However, when I run this exact same script as a -preRender script via the command line using the original, unmodified file, the command is executed (I can tell because it prints the expected output to the shell), but *nothing* renders. It prints the output from my script, then the next line says that the scene has completed rendering.
The script pretty much just uses "ls" and "createRenderLayer" with some loops- no AETemplates or interface macro-type commands...
Any thoughts on why the script would behave differently when run from the command line and cause no rendering to happen at all? Any input would be greatly appreciated!
Tim
