Batch rendering

Batch rendering

Anonymous
Not applicable
1,530 Views
4 Replies
Message 1 of 5

Batch rendering

Anonymous
Not applicable

I just want a simple script to kick off the current scene as a batch render (the equivilant of Render > Batch render) . I thought it'd would be as easy as

import maya.cmds as cmds

cmds.batchRender()

However that just kicks up

// Result: There is currently no render to cancel //

 

What am I overlooking?

 

 

0 Likes
1,531 Views
4 Replies
Replies (4)
Message 2 of 5

h.schoenberger
Enthusiast
Enthusiast

I do not have the solution, but a tip how to find out what Maya does.

You will get a mel function, but you can eval mel code from python if you cannot get it work with the same Python functions. (There is sometimes a difference between the mel and python implementation)

 

Open the Script Editor in Maya and enable the option History/Echo all commands

Write and execute the script line

print "#############################################################################"

Execute Batch render from the menu.

Check which command was used.

 

0 Likes
Message 3 of 5

Anonymous
Not applicable

The kicker is that nothing shows up. I was hoping to see a line of Mel with a couple of parameters, but it doesn't show anything at all.

0 Likes
Message 4 of 5

h.schoenberger
Enthusiast
Enthusiast

Just tested it.

It shows me the mel function BatchRender().

If I execute it in the MEL script editor, it works.

Then I tested the python command as you stated in your first post and it did not work.

0 Likes
Message 5 of 5

rbesseling
Explorer
Explorer

I think i had this problem before, now a days it seems to work even in maya 2018.
cmds.BatchRender()

0 Likes