Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-11-04 20:32:01 +0300
committerJacques Lucke <jacques@blender.org>2021-11-04 20:32:01 +0300
commitc7fcc50842d85664d2b07c32b181951ea7661440 (patch)
treef7f79d03c30de2306d74f35d5f9acd49875c4a83 /intern/cycles/blender/sync.cpp
parentb7260ca4c9f4b7618c9c214f1270e31d6ed9886b (diff)
Fix T91986: incorrect syncing of geometry instances
The issue was that some geometries were not synced again even when they changed. This commit adds a map that keeps track of the geometries that need to be updated when an object has changed. Differential Revision: https://developer.blender.org/D13020
Diffstat (limited to 'intern/cycles/blender/sync.cpp')
-rw-r--r--intern/cycles/blender/sync.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp
index cf0b77a9b16..ffd1e78b7f8 100644
--- a/intern/cycles/blender/sync.cpp
+++ b/intern/cycles/blender/sync.cpp
@@ -183,6 +183,15 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d
(object_subdivision_type(b_ob, preview, experimental) != Mesh::SUBDIVISION_NONE)) {
BL::ID key = BKE_object_is_modified(b_ob) ? b_ob : b_ob.data();
geometry_map.set_recalc(key);
+
+ /* Sync all contained geometry instances as well when the object changed.. */
+ map<void *, set<BL::ID>>::const_iterator instance_geometries =
+ instance_geometries_by_object.find(b_ob.ptr.data);
+ if (instance_geometries != instance_geometries_by_object.end()) {
+ for (BL::ID geometry : instance_geometries->second) {
+ geometry_map.set_recalc(geometry);
+ }
+ }
}
if (updated_geometry) {