diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-10-15 16:18:30 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-10-18 11:42:17 +0300 |
commit | 9c7fda6de3e828be40999c960bce2dc89e54b7cb (patch) | |
tree | 2e6afef016e36fedb0fe30b69634f3fc394b7a6f /intern/cycles/blender | |
parent | f425f40c4e17e889c720647b26c07ae3f6d3ba64 (diff) |
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
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |