[Bf-blender-cvs] [5f12dd3beb1] cycles-x: Cycles X: Fix missing viewport update on shadow catcher changes

Sergey Sharybin noreply at git.blender.org
Thu Jun 3 14:38:56 CEST 2021


Commit: 5f12dd3beb19b1b0c35447aa5f9574aa2882b0c2
Author: Sergey Sharybin
Date:   Thu Jun 3 12:49:37 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB5f12dd3beb19b1b0c35447aa5f9574aa2882b0c2

Cycles X: Fix missing viewport update on shadow catcher changes

Solves missing KernelInterator update in viewport when changing object's
shadow catcher mask flag.

Differential Revision: https://developer.blender.org/D11471

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

M	intern/cycles/render/integrator.h
M	intern/cycles/render/object.cpp

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

diff --git a/intern/cycles/render/integrator.h b/intern/cycles/render/integrator.h
index d788113a695..7d53309c981 100644
--- a/intern/cycles/render/integrator.h
+++ b/intern/cycles/render/integrator.h
@@ -84,6 +84,7 @@ class Integrator : public Node {
   enum : uint32_t {
     AO_PASS_MODIFIED = (1 << 0),
     BACKGROUND_AO_MODIFIED = (1 << 1),
+    OBJECT_MANAGER = (1 << 2),
 
     /* tag everything in the manager for an update */
     UPDATE_ALL = ~0u,
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index f9e176d9ac7..7563fe2034c 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -919,6 +919,11 @@ void ObjectManager::tag_update(Scene *scene, uint32_t flag)
   }
 
   scene->light_manager->tag_update(scene, LightManager::OBJECT_MANAGER);
+
+  /* Integrator's shadow catcher settings depends on object visibility settings. */
+  if (flag & (OBJECT_ADDED | OBJECT_REMOVED | OBJECT_MODIFIED)) {
+    scene->integrator->tag_update(scene, Integrator::OBJECT_MANAGER);
+  }
 }
 
 bool ObjectManager::need_update() const



More information about the Bf-blender-cvs mailing list