From 02f7a6b2bdea4b338b977770c951f8b38d88e4b0 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 20 Mar 2020 13:06:02 +0100 Subject: 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 --- source/blender/draw/engines/workbench/workbench_data.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/draw') 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. */ -- cgit v1.2.3