Setting render globals in Mel?

Specifically, the file type...I see that renderGlobalNode lets me change the resolution and name but I want to change the file type...is it possible? thank you.

"If we knew what we were doing, it wouldn't be called research, would it?

Yes it is possible.. Don't know if offhand but it can be done because the setting sthat are there by default are established by a MEL script.

Aha...good point. Let me see if I can find the script to establish it.

"If we knew what we were doing, it wouldn't be called research, would it?

This seems to work:

setAttr defaultRenderGlobals.imageFormat [number between 1-23];

Still can't figure out how to set it once as opposed to defaultwise, since renderGlobals.imageFormat doesn't work. ah well.

"If we knew what we were doing, it wouldn't be called research, would it?

//Still can't figure out how to set it once as opposed to
//defaultwise, since renderGlobals.imageFormat doesn't
//work. ah well.

Executing this command only changes it while you have the program open it doesn't permanently set the default value unless you make it into a userpref script.

setAttr defaultRenderGlobals.imageFormat 5

If you mean you want it to return to the previous setting before it was changed you'd have to query it somehow and store the setting and then return it when you're done.