PDA

View Full Version : Render Setting "Frame/Animation ext"


fallenrelics
02-21-2009, 03:22 AM
Does anyone know a MEL command to change the "Frame/Animation ext" in the render settings.

I would like the ability to change the file name when rendering to name.#.ext format.

Maya only echos the following when i change it manually which isn't quite helpful.

changeMayaSoftwareFileNameFormat;
updateMayaSoftwareFileNameFormatControl;
control -edit -enable false startFrameCtrl;
control -edit -enable false endFrameCtrl;
control -edit -enable false byFrameStepCtrl;
control -edit -enable false extensionPaddingCtrl;
control -edit -enable false modifyExtensionCtrl;
control -edit -enable false startExtensionCtrl;
control -edit -enable false byExtensionCtrl;

siproductions
02-21-2009, 05:44 AM
The Render globals window is just a UI that changes attributes of other nodes. If you run:

select defaultRenderGlobals;

you can see in the attribute editor the actual node and at least some of the main attributes there. if you change them there you will actually see the proper mel command that is being run. In this case there are a couple different ones being run to create the proper render extention.

setAttr defaultRenderGlobals.outFormatControl 0;
setAttr defaultRenderGlobals.animation 1;
setAttr defaultRenderGlobals.putFrameBeforeExt 1;
setAttr defaultRenderGlobals.extensionPadding 4;

The extention padding isn't needed but thought I'd throw it in for good mesure. Hope that helps and you can always learn about the node attributes by looking at the "Node and attribute reference" under the help menu.

Cheers,
Simon

fallenrelics
02-21-2009, 06:05 AM
Thanks for the reply.

I noticed those values changed as well under the defaultRenderGlobals however changing those don't seem to differentiate between name.#.ext, name_#.ext, and name#.ext.

I would like to find a way to force the format to only render as name.#.ext even if the user sets it to name_#.ext.

siproductions
02-21-2009, 07:35 AM
add this line to the previous script: setAttr defaultRenderGlobals.periodInExt 1;

so the whole thing would be:

setAttr defaultRenderGlobals.outFormatControl 0;
setAttr defaultRenderGlobals.animation 1;
setAttr defaultRenderGlobals.putFrameBeforeExt 1;
setAttr defaultRenderGlobals.extensionPadding 4;
setAttr defaultRenderGlobals.periodInExt 1;


That should change it from any of the presets in the render globals panel to the name.#.ext that you're looking for.

Cheers,
Simon

fallenrelics
02-21-2009, 08:10 AM
That's Awesome! Thank you very much.:thumbsup:

CGTalk Moderation
02-21-2009, 08:10 AM
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.