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.