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
Notes: blender-bot 2023-02-14 06:54:28 +01:00
Referenced by issue #79586, Viewport's "Rendering Paused" is missing sometimes, making it very confusing
2 changed files with 12 additions and 3 deletions

View File

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

View File

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