Welcome to the forum, feel free to ask questions here.
Hi Rodrigo, When exactly does Maya crash?
I started to change the values in yellow, then got confused totally.
int $startFrame = 3; int $endFrame = 24;
Hi Harishankar, All you really need to change are the numbers on these lines: Code: int $startFrame = 3; int $endFrame = 24; Start frame is the first frame to render, and end frame is the last frame to render. The script will render all values in-between. Make sure that you keep the semicolon ; as MEL requires this. Also be sure to execute this script in the MEL lab of the script editor, and not the python tab. Let me know if you're still stuck. -John
Wow, it seems this script has attracted quite a bit of attention Here is a fixed version that will allow rendering in multiple renderers, as well as work in Maya 2011! Code: // Batch rendering workaround - John Mather (NextDesign) string $filename = "render"; string $cameraName = "persp"; int $startFrame = 1; int $endFrame = 3; string $directory = (`workspace -q -rd` + "images/"); for ($i = $startFrame; $i <= $endFrame; $i++) { currentTime $i; // Old version // render -x `getAttr defaultResolution.width` -y `getAttr defaultResolution.height` $cameraName; // New version - supports MR and other renderers! renderWindowRender redoPreviousRender renderView; string $concatFilename = $directory + $filename + "." + $i; if (`getApplicationVersionAsFloat` >= 2011) // Thanks to nowayfra on creativecrash for his workaround catch(eval(renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`))); else renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`); print ("Saved " + $concatFilename + "\n"); } print ("Completed rendering of " + ($endFrame - $startFrame) + " frames.\n"); P.s. Many thanks goes out to nowayfra on CreativeCrash for his Maya 2011 fix! (http://www.creativecrash.com/forums/...on_post_306312) Edit: Fixed a small bug that would stop all frames from being rendered.
// Batch rendering workaround - John Mather (NextDesign) string $filename = "render"; string $cameraName = "persp"; int $startFrame = 1; int $endFrame = 3; string $directory = (`workspace -q -rd` + "images/"); for ($i = $startFrame; $i <= $endFrame; $i++) { currentTime $i; // Old version // render -x `getAttr defaultResolution.width` -y `getAttr defaultResolution.height` $cameraName; // New version - supports MR and other renderers! renderWindowRender redoPreviousRender renderView; string $concatFilename = $directory + $filename + "." + $i; if (`getApplicationVersionAsFloat` >= 2011) // Thanks to nowayfra on creativecrash for his workaround catch(eval(renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`))); else renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`); print ("Saved " + $concatFilename + "\n"); } print ("Completed rendering of " + ($endFrame - $startFrame) + " frames.\n");
wow the script is working very well , but the problem now is that the extension of the images is saving as an ISO image !! lol how does it happens ?! I set render settings to be the output render image is .png please help. I need to save as .png or .psd better Thanks.
Hi Hesham, That's actually an older version of the script. Try the one here: https://simplymaya.com/forum/showpos...7&postcount=23