View Full Version : Calling a render in MEL - how ?

02 February 2011, 07:10 AM

Short version:

Is there a way to call a render and save it to disk of a particular frame from within a MEL script ?

Longer version:

I'm programming a script in Maya for a non CG project - it serves mostly as a UI for another system ... Thing is it turns out we'd like to render some frames after all but the thing is our code builds its elements per frame then deletes them all ready for the next (we output text files for use elsewhere), keeping everything and/or keyframing visibility and other attempts have bogged down the RAM with waaaaaaay to much geometry. If we could just call a render from MEL at the end of each frame that would output to disk it'd be awesome. When I select and use the render panel I see no MEL output in the script editor happening from which to distill the commands...

Is it possible ?

Kind regards...

02 February 2011, 12:27 PM
You should have a look at the renderscripts in scripts/others. For every renderer, a new "renderer" is defined and some mel callbacks are assigned. e.g. there is one that is executed if you render from UI or another one if you render from commandline. I'm not sure about the names of the scripts, but they are easy to find.

If you render with mentalray, the final command you need is called mayatomr with several options.

CGTalk Moderation
02 February 2011, 12:27 PM
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.