Commit: 9c7fda6de3e828be40999c960bce2dc89e54b7cb
Author: Philipp Oeser
Date:   Thu Oct 15 15:18:30 2020 +0200
Branches: master
https://developer.blender.org/rB9c7fda6de3e828be40999c960bce2dc89e54b7cb

Fix T81729: Cycles object color not updating for instancers

Caused by rBe65c78cd43aa.

Since above commit, only geometry and lights received the update,
previous to this check an instancer would receive that is well (in case
of 'is_updated_shading').

Now check for an instancer (checking OB_DUPLI via ob.is_instancer()) and
do an update then as well.

Reviewers: brecht

Maniphest Tasks: T81729

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

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

M       intern/cycles/blender/blender_sync.cpp

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

diff --git a/intern/cycles/blender/blender_sync.cpp 
b/intern/cycles/blender/blender_sync.cpp
index 1cdaba57be7..d2760d55f2d 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -151,6 +151,11 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, 
BL::SpaceView3D &b_v3d
       const bool is_geometry = object_is_geometry(b_ob);
       const bool is_light = !is_geometry && object_is_light(b_ob);
 
+      if (b_ob.is_instancer() && b_update->is_updated_shading()) {
+        /* Needed for e.g. object color updates on instancer. */
+        object_map.set_recalc(b_ob);
+      }
+
       if (is_geometry || is_light) {
         const bool updated_geometry = b_update->is_updated_geometry();

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to