batch render in interactive mode (with GUI) via python

162 views
Skip to first unread message

Juan Cristóbal Quesada

unread,
Oct 17, 2018, 11:07:11 AM10/17/18
to Python Programming for Autodesk Maya
Im facing the need to batch render with arnold with maya opened.

Being very fancy of the render.exe command which allows to specify multiple flags (the renderer among them) at first i relied on a "os.system('render blablablalba')" call.

This has some problems which i figure have to do with the shell environment the command is launched on. Primarily, i have a render failing because of a custom plugin node being not recognized with this specific os.system call... whereas if i run the command in a independent shell (not from the maya python interpreter) the scene renders correctly and it just simply ignores the node.


Im considering two fixing options:
(1) keep the call to os.system("render...balbalbal") and try to emulate the same environment maya has when run in GUI mode.
(2) use a batch render command of the maya.cmds api. In this case i would need as sole condition to be able to specify the render layer.

I would prefer option (2) since option (1) seems to be like reinventing the wheel but i dont have much experience with the amount of render commands available, and it seems to be quite a bunch.

Juan Cristóbal Quesada

unread,
Oct 18, 2018, 3:46:49 AM10/18/18
to Python Programming for Autodesk Maya
has anyone ever tried to batch render with arnold from inside maya? Which commands did you use?

Juan Cristóbal Quesada

unread,
Oct 18, 2018, 5:18:23 AM10/18/18
to Python Programming for Autodesk Maya
Hi, i just found out.

I digged into the "mayaBatchRender" mel command and turned out to be a procedure located in "C:\Program Files\Autodesk\Maya2017\scripts\others\mayaBatchRender.mel".

I inspected the code and i discovered that with the mayabatch command you can add all specific renderer flags you only need to do it the proper way, so it's solved.

If anyone needs some help on this let me know.

I will try now as an extra to get the batch render progress in a qt window, not sure if this is possible.

Thanks.

El miércoles, 17 de octubre de 2018, 17:07:11 (UTC+2), Juan Cristóbal Quesada escribió:
Reply all
Reply to author
Forward
0 new messages