From d544a61e8a366f05a6360d9e5baea84edcaa2ca0 Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Thu, 19 Jan 2017 00:41:55 +0100 Subject: Cycles: Update remaining time once per second without waiting for a tile change Previously, the code would only update the status string if the main status changed. However, the main status did not include the remaining time, and therefore it wasn't updated until the amount of rendered tiles (which is part of the main status) changed. This commit therefore makes the BlenderSession remember the time of the last status update and forces a status update if the last one was more than a second ago. Reviewers: sergey Differential Revision: https://developer.blender.org/D2465 --- intern/cycles/render/session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intern/cycles/render/session.cpp') diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index 0c7bd271371..e7050f9ef37 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -833,7 +833,7 @@ void Session::update_status_time(bool show_pause, bool show_done) int progressive_sample = tile_manager.state.sample; int num_samples = tile_manager.get_num_effective_samples(); - int tile = tile_manager.state.num_rendered_tiles; + int tile = progress.get_finished_tiles(); int num_tiles = tile_manager.state.num_tiles; /* update status */ @@ -841,7 +841,7 @@ void Session::update_status_time(bool show_pause, bool show_done) if(!params.progressive) { const bool is_cpu = params.device.type == DEVICE_CPU; - const bool is_last_tile = (progress.get_finished_tiles() + 1) == num_tiles; + const bool is_last_tile = (tile + 1) == num_tiles; substatus = string_printf("Path Tracing Tile %d/%d", tile, num_tiles); -- cgit v1.2.3