View Single Post
Old 09-01-2011, 03:22 PM   #9
Registered User
Join Date: Jan 2011
Posts: 2
Thanks: 1
Thanked 1 Time in 1 Post
Default adjusting the render script

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.
Many thanks

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++)
    currentTime $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]
anwol is offline   Reply With Quote
The Following User Says Thank You to anwol For This Useful Post:
NextDesign (19-04-2011)