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:
authorBastien Montagne <bastien@blender.org>2020-08-20 11:37:11 +0300
committerJeroen Bakker <jeroen@blender.org>2020-08-26 12:10:58 +0300
commit22d8506ae5796fb1d385fd44bba617e0f935270a (patch)
tree885b9c4536b8f5978b7800c8f6c8ef015c1b9923
parent0fb7d5381ef29b837ea602e853d0fdc057da0e6c (diff)
Fix T79935: Inonsistent simplify behavior when linking collection with objects in sub-collection.
RNA update function would only update objects from 'main' instantiated collection, not those from sub-collections. This should be comitted to 2.90 (and backported to 2.83 too). Maniphest Tasks: T79935 Differential Revision: https://developer.blender.org/D8654
-rw-r--r--source/blender/makesrna/intern/rna_scene.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 81343f12af2..05acff160e7 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1873,11 +1873,10 @@ static void object_simplify_update(Object *ob)
}
if (ob->instance_collection) {
- CollectionObject *cob;
-
- for (cob = ob->instance_collection->gobject.first; cob; cob = cob->next) {
- object_simplify_update(cob->ob);
+ FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (ob->instance_collection, ob_collection) {
+ object_simplify_update(ob_collection);
}
+ FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
}
}