Fix T79586: "rendering paused" not shown when viewport render starts paused

This commit is contained in:
Brecht Van Lommel 2020-08-06 18:34:41 +02:00
parent 8fbfc150a0
commit 8123b12006
2 changed files with 12 additions and 3 deletions

@ -59,6 +59,7 @@ BlenderSession::BlenderSession(BL::RenderEngine &b_engine,
BL::BlendData &b_data, BL::BlendData &b_data,
bool preview_osl) bool preview_osl)
: session(NULL), : session(NULL),
scene(NULL),
sync(NULL), sync(NULL),
b_engine(b_engine), b_engine(b_engine),
b_userpref(b_userpref), b_userpref(b_userpref),
@ -88,6 +89,7 @@ BlenderSession::BlenderSession(BL::RenderEngine &b_engine,
int width, int width,
int height) int height)
: session(NULL), : session(NULL),
scene(NULL),
sync(NULL), sync(NULL),
b_engine(b_engine), b_engine(b_engine),
b_userpref(b_userpref), b_userpref(b_userpref),
@ -970,7 +972,8 @@ void BlenderSession::update_status_progress()
remaining_time = (1.0 - (double)progress) * (render_time / (double)progress); remaining_time = (1.0 - (double)progress) * (render_time / (double)progress);
if (background) { if (background) {
scene_status += " | " + scene->name; if (scene)
scene_status += " | " + scene->name;
if (b_rlay_name != "") if (b_rlay_name != "")
scene_status += ", " + b_rlay_name; scene_status += ", " + b_rlay_name;

@ -945,8 +945,14 @@ void Session::set_pause(bool pause_)
} }
} }
if (notify) if (session_thread) {
pause_cond.notify_all(); if (notify) {
pause_cond.notify_all();
}
}
else if (pause_) {
update_status_time(pause_);
}
} }
void Session::set_denoising(const DenoiseParams &denoising) void Session::set_denoising(const DenoiseParams &denoising)