I tried your script- it works fantastic!
Is there anyway to make it work with mental ray as the rendering engine?
I cant figure out where or what to adjust.
I haven't tested this as I don't have Maya installed on this machine, but it should work without problems.
Open up your script editor, and change the first 4 lines to your requirements.
Filename is used for something like "render.001.jpg"
Camera, is the camera you want to render out of
Start and end frame are self-explanatory.
If you have problems setting this up, just give me your requirements, and I'll do the changes for you.
string $filename = "render";
string $cameraName = "persp";
int $startFrame = 1;
int $endFrame = 24;
string $directory = (`workspace -q -rd` + "images/");
for ($i = $startFrame; $i <= ($endFrame - $startFrame); $i++)
render -x `getAttr defaultResolution.width` -y `getAttr defaultResolution.height` $cameraName;
string $concatFilename = $directory + $filename + "." + $i;
renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`);
print ("Saved " + $concatFilename + "\n");
print ("Completed rendering of " + ($endFrame - $startFrame) + " frames.\n");
Hope this helps guys.[/quote]