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-11-30 19:16:11 +0300
committerBastien Montagne <bastien@blender.org>2020-11-30 19:19:27 +0300
commita7cf6ad5471e4109d60d99c49b58d7257c95e392 (patch)
tree4bdb8ac3a902061934aee77c40e2aebb57f0b245 /source/blender
parentc760ab0ddade365914196ce2703edad110b38cfd (diff)
Fix (unreported) broken logic in `BKE_collection_add_from_collection`.
That function was adding given new collection to all ancestors of the reference one, instead of only to its immediate parents.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/collection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index ab92480cce2..5eec788255d 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -452,7 +452,7 @@ void BKE_collection_add_from_collection(Main *bmain,
bool is_instantiated = false;
FOREACH_SCENE_COLLECTION_BEGIN (scene, collection) {
- if (!ID_IS_LINKED(collection) && BKE_collection_has_collection(collection, collection_src)) {
+ if (!ID_IS_LINKED(collection) && collection_find_child(collection, collection_src)) {
collection_child_add(collection, collection_dst, 0, true);
is_instantiated = true;
}