Maya - Querying previous render information

喜夏-厌秋 提交于 2019-12-08 18:58:41

I know of no way to query it directly, but this solution works:


Put the following in your Pre Render MEL (from the Render Settings):

python "global last_render_time;import time;last_render_time=time.time()"

Expanded for readability:

global last_render_time # not needed when in module
import time
last_render_time = time.time()

And put this in your Post Render MEL:

python "global last_render_time;import time;last_render_time=time.time()-last_render_time"

Expanded:

global last_render_time # again, not needed when in module
import time
last_render_time = time.time() - last_render_time

This will store a global python variable last_render_time which is the number of seconds the render took.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!