I'm new to MEL script and working on dealing with batch render of massive files(over 10000) with MAYA, the basic prototype is like this:
import maya.mel as mel
import maya.cmds as mc
mc.file("D:/render/abc.mb",i=True)
mel.eval('RenderIntoNewWindow;')
mc.renderWindowEditor('renderView' , e=True , wi='D:/render/abc')
This is a simple script which contains three commands: import, render, saveimage.
Here is the problem. RenderIntoNewWindow seems to be an asynchronous method so that the script will proceed while rendering is in progress. Then Maya will save something like an incomplete image.
I also tried a callback method 'renderwindowssaveimagecallback'.
mel.eval('renderWindowSaveImageCallback "renderView" ("D:/render/abc") "image";')
But it didn't work either. Maya give the message "ImageFormats instance has no attribute 'oldOutf' # ".
Is there any command that i could render an image with a synchronous way? Thanks.