mel or python render command vs command-line Render

mel or python render command vs command-line Render

Anonymous
Not applicable
943 Views
2 Replies
Message 1 of 3

mel or python render command vs command-line Render

Anonymous
Not applicable
My python script running on Maya2008 looks for .mb files and opens to fix, then renders. I can only get it working if I save the scene file then issue the command-line Render command from the script. i was hoping that the mel/python render command would work for me. it does not seem to be equivalent to the command-line Render which has all the flags to overide render settings. With echo on, I could get attributes for defaultRenderGlobals node ... but not for all of them. And ... there is no doc on the node: defaultRenderGlobals. There is on other render related nodes ... but trying to correlate attributes was making me crazy. I did do a listAttr on defaultRenderGlobals ... but wo docs stuff still wasn't clear.

So i gave up and went back to version of script that saves scene file and issues command-line Render.

Has anyone out there had similar problems and able to resolve ?

(Also I did try tunring on echo all commads while I was setting attrs in defaultRenderGlobals ... I got a lot of Maya UI commands not giving obvious answers to settings of those attributes that didn't echo with regular echo)

thanks to all who can help
0 Likes
944 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
... there is no doc on the node: defaultRenderGlobals.....


look up renderGlobals as the node type in the node reference...
0 Likes
Message 3 of 3

Anonymous
Not applicable
I tried to use renderGlobals ... Maya didn't seem to recognize it

listAttr renderGlobals;
// Error: No object matches name: renderGlobals //

... just realized that you have to create the node first via the renderGlobalsNode command

now this worked ...

setAttr "renderGlobals1.imageFormat" 8;

and in Python ...

import maya.cmds as cmds
cmds.setAttr('renderGlobals1.imageFormat',8)

... at first glance this was confusing ... Thanks
0 Likes