Hi,
Within my automation I launch rendering with python.(Open MAX, open project, start rendering, close MAX).
Is there a way to see/track progress of rendering programmatically? Or does MAX store somewhere in file system an accessible progress information or rendering(image) preview? Thanks
You could attach a calback to #preRenderFrame or #postRenderFrame and calculate progress based on the total number of frames. See https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=GUID-E5BE0058-2216-4E0B-88AF-680CA58AAC73 for some details.
Hope that helps,
Drew
Hi Drew,
thanks for your answer. Can you please help me out how to implement your advice in to my snippet?
Let's say loop every 2 minutes and get values you suggested (#preRenderFrame)
import pymxs
import codecs
pymxs.runtime.loadMaxFile(project_path)
bmp = pymxs.runtime.render(outputFile=output_path)
pymxs.runtime.save
pymxs.runtime.quitMax()
thank a lot!
Something like this will print the time for each frame processed during rendering, it might give you a starting point:
from pymxs import runtime as mxs
def renderCallback():
a = mxs.callbacks.notificationParam()
print (f"we're on frame: {a[12]}"
)
mxs.callbacks.removeScripts( id=mxs.name('render_test'))
mxs.callbacks.addScript(mxs.name('preRenderFrame'), renderCallback, id=mxs.name('render_test'))
Can't find what you're looking for? Ask the community or share your knowledge.