Fix T74744: Studio Lights editor not updating in realtime when tweaking

the settings

Caused by rBc476c36e4008.

This hooks into the existing FIXME (workaround for a missing update
tagging), reactivates the NS_VIEW3D_GPU notifier (introduced in
rB2ad3d8f158d2 -- but not going anywhere atm.) to check changes to rv3d
rflag which indicated UserStudioLight has changed. To not have updates
all the time, the rflag also needs to be cleared again (see original
rB2ad3d8f158d2).

Maniphest Tasks: T74744

Differential Revision: https://developer.blender.org/D7194
This commit is contained in:
Philipp Oeser 2020-03-20 13:06:02 +01:00
parent ed44bb902d
commit 02f7a6b2bd
Notes: blender-bot 2023-02-13 23:11:31 +01:00
Referenced by issue #76216, Object disappared and glichted when switching between normal view and quad views
Referenced by issue #74744, Studio Lights editor not updating in realtime when tweaking the settings
1 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,7 @@
/** \file
* \ingroup draw_engine
*/
#include "DRW_render.h"
#include "workbench_private.h"
@ -207,6 +208,13 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
wpd->volumes_do = false;
BLI_listbase_clear(&wpd->smoke_domains);
/* FIXME: This reproduce old behavior when workbench was separated in 2 engines.
* But this is a workaround for a missing update tagging. */
if ((rv3d != NULL) && (rv3d->rflag & RV3D_GPULIGHT_UPDATE)) {
wpd->view_updated = true;
rv3d->rflag &= ~RV3D_GPULIGHT_UPDATE;
}
if (!v3d || (v3d->shading.type == OB_RENDER && BKE_scene_uses_blender_workbench(scene))) {
/* FIXME: This reproduce old behavior when workbench was separated in 2 engines.
* But this is a workaround for a missing update tagging from operators. */