Render Settings- Frame/Animation Ext

146 views
Skip to first unread message

Shea Crowley

unread,
May 30, 2023, 7:05:28 PM5/30/23
to Python Programming for Autodesk Maya
      I cannot for the life of me figure out how to change the frame/animation extension setting using Python. I found this conversation in this group very helpful for a similar problem, but I can't figure out how to find the nodes their talking about for troubleshooting other things and I'm worried it might be because they were in Maya 2016.

Shea Crowley

unread,
May 30, 2023, 7:17:00 PM5/30/23
to Python Programming for Autodesk Maya
Update- This bit of code

cmds.setAttr("defaultRenderGlobals.outFormatControl", 2)
cmds.setAttr("defaultRenderGlobals.outFormatExt", "name.#.ext", type = "string")
cmds.setAttr("defaultRenderGlobals.extensionPadding", 4)

 sort of works except that it's still only rendering one frame because the Frame/ Animation Ext. dropdown is still set to a single frame setting so I still need to figure out how to access that specific attribute with python and it continues to elude me.

Professor van Dusen

unread,
May 30, 2023, 8:43:25 PM5/30/23
to python_in...@googlegroups.com
Hi Shea, selecting the node in maya will give you the hints you need, if you want to go down this route, in mel it would be:

setAttr "defaultRenderGlobals.animation" 1;
setAttr "defaultRenderGlobals.animationRange" 0;

then you can set the start, end etc

setAttr "defaultRenderGlobals.startFrame" 1001;
setAttr "defaultRenderGlobals.endFrame" 1100;

hope that helps

Chris



--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/94f9023c-6663-47b3-905d-d01ca99ad542n%40googlegroups.com.

Shea Crowley

unread,
May 30, 2023, 9:19:30 PM5/30/23
to Python Programming for Autodesk Maya
Thank you for your help! That got me closer to what I need, but I've discovered that outFormatExt is not working the way I thought it was. It's essentially doing nothing as far as I can tell because my frames are still rendering with the name.ext.# format that  "defaultRenderGlobals.animation" 1;  sets. I'm also having trouble figuring out how to find the render node that should be giving me the hints I need. I've never used the node editor before outside of using it within Hypershade to add noise to shaders and other sources are saying it should be in the attribute editor, but I'm seeing no such node unless I'm confusing it for something else??? At any rate, I don't know how to find the Default Render Globals node or anything like it. I've got the render settings up, but changing the "Frame/ Animation ext setting doesn't print anything in the script editor like it does when you change the compression of an exr or move an object.

Professor van Dusen

unread,
May 31, 2023, 12:19:14 AM5/31/23
to python_in...@googlegroups.com
Hi,

the rendersettings in maya are build on the fly by the defaultRenderGlobals its all a bit weird if you ask me

just use the mel window in the script editor  and type:

select -r "defaultRenderGlobals";

now open it up in attribute editor and change any settings and the script editor will tell you what you are doing and you can figure out the correct python commands hopefully eg

setAttr "defaultRenderGlobals.useFrameExt" 1;
setAttr -type "string" defaultRenderGlobals.outFormatExt "exr";
setAttr "defaultRenderGlobals.outFormatControl" 0;
setMayaSoftwareFrameExt("3", 0);

there are also defaultRenderQuality and defaultResolution and defaultArnoldRenderOptions nodes

best,

Chris

Reply all
Reply to author
Forward
0 new messages