diff options
author | Bastien Montagne <bastien@blender.org> | 2021-03-18 16:25:23 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-03-18 16:26:29 +0300 |
commit | 248d9809cabe483049fdc50f777a540180b4635b (patch) | |
tree | bc972a0e9d3a9b04e923794cc88bcc5dfd1624e9 /source | |
parent | f75d690ee4dc3404bb7de5c205eb34b811c45a9a (diff) |
Fix T86594: Overrides: Possible collection "duplication".
Issue was actually in some Collection management code, a bit too eager
to add collection to the scene master one when it was not actually
needed.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 4e4134c7c8f..178a762fd40 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -485,6 +485,11 @@ void BKE_collection_add_from_collection(Main *bmain, collection_child_add(collection, collection_dst, 0, true); is_instantiated = true; } + else if (!is_instantiated && collection_find_child(collection, collection_dst)) { + /* If given collection_dst is already instantiated in scene, even if its 'model' src one is + * not, do not add it to master scene collection. */ + is_instantiated = true; + } } FOREACH_SCENE_COLLECTION_END; |