[Bf-blender-cvs] [02f7a6b2bde] master: Fix T74744: Studio Lights editor not updating in realtime when tweaking the settings

Philipp Oeser noreply at git.blender.org
Tue Mar 24 10:00:39 CET 2020


Commit: 02f7a6b2bdea4b338b977770c951f8b38d88e4b0
Author: Philipp Oeser
Date:   Fri Mar 20 13:06:02 2020 +0100
Branches: master
https://developer.blender.org/rB02f7a6b2bdea4b338b977770c951f8b38d88e4b0

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

===================================================================

M	source/blender/draw/engines/workbench/workbench_data.c

===================================================================

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. */



More information about the Bf-blender-cvs mailing list