PDA

View Full Version : render command's -preRender flag


tdHendrix
07-28-2010, 01:27 PM
Hi, I need to disable certain lights in the scene at render time depending on which camera I'm rendering from. I'm using a .bat file with a bunch of render commands in it to render the scene from outside of Maya 2011. It works fine until I add the -preRender flag. Only after I add the -preRender flag it gives the error where it exits with status 210, otherwise everything works perfectly. Here's an example of the command I'm trying to do:

render -r sw -cam myCam -im "imageName" -preRender "setAttr pSphere1.translateY 2;" -rd "C:/render dir" "C:/fileToRender.ma"

Am I using the -preRender flag wrong or something? I found a post a while back that someone had a problem with the render command's -preRender flag and had to use the mayabatch command instead, but I'm hoping to be able to use the render command instead. Thanks for any help.

ph2003
07-28-2010, 06:06 PM
i have no problem using -preRender flag either on 2008 or 2011.
it should told u what error u had b4 the "exit with 201 status" line
make sure u type obj name correctly, or just try using a simple command see if it works
render -preRender "select -all" filename.ma

CGTalk Moderation
07-28-2010, 06:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.