diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-03-20 15:06:02 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-03-24 11:58:25 +0300 |
commit | 02f7a6b2bdea4b338b977770c951f8b38d88e4b0 (patch) | |
tree | 94510ad3239f1468940cfa7b631323a521e159d2 /source/blender/draw/engines/workbench/workbench_data.c | |
parent | ed44bb902d6b2f861cbcdbb1bffd5339ab3b50e7 (diff) |
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
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_data.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_data.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c index 432179e68e2..fc047eadf55 100644 --- a/source/blender/draw/engines/workbench/workbench_data.c +++ b/source/blender/draw/engines/workbench/workbench_data.c @@ -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. */ |