Fix T51450: Report correct render times in view port

Authored by Jeff Knox (knox) on Jul 25 2017, 1:34 AM.



This is a proposed fix for T51450.
I added a new end_time variable in the Progress class, which is updated when the render status is set to "Done." Progress::get_time now reads from end_time if the render is complete, instead of always calling time_dt.

I also noticed that the internal blender render would keep updating the time forever when rendering in the view port. So I added an update_flag check in render_view3d_startjob to re-init the render whenever the 3D view updates.

Diff Detail

rB Blender
Jeff Knox (knox) retitled this revision from Report correct render times in view port to Fix T51450: Report correct render times in view port.Jul 25 2017, 1:38 AM
Jeff Knox (knox) edited the summary of this revision. (Show Details)

Looks good to me, thanks for the patch!


This does quite a lot more than just resetting the time, but it should still all be fast operations that you wouldn't notice. Since PR_UPDATE_RENDERSIZE already does the same update without updating the scene database and that case works ok, it seems safe.

This revision is now accepted and ready to land.Jul 25 2017, 1:53 AM
This revision was automatically updated to reflect the committed changes.

This is my first multi-line patch. I'm happy to see it in master!


I thought about resetting just the time in the block above, but wasn't sure if I'd be missing something. I figured I check with you on this current solution first. :-)