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>2021-10-20 16:21:24 +0300
committerBastien Montagne <bastien@blender.org>2021-10-20 16:22:26 +0300
commit2d46cef2e88730f40d8927a10102fa9e2a2d4ea3 (patch)
treed9ce05973ec69bdb642149bd14aa10908a51eba1 /source/blender/windowmanager/intern
parent4539c7cc5786c20aa52e046739e39ce67c8b2a17 (diff)
Fix T92347: Append function excludes Collections that do not contain Objects directly.
Collections directly selected by the user should always be instantiated. Regression from recent append code refactor.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 461ae20cf8a..e698702316e 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -462,7 +462,8 @@ static void wm_append_loose_data_instantiate(WMLinkAppendData *lapp_data,
* children.
*/
Collection *collection = (Collection *)id;
- bool do_add_collection = false;
+ /* We always add collections directly selected by the user. */
+ bool do_add_collection = (item->append_tag & WM_APPEND_TAG_INDIRECT) == 0;
LISTBASE_FOREACH (CollectionObject *, coll_ob, &collection->gobject) {
Object *ob = coll_ob->ob;
if (!object_in_any_scene(bmain, ob)) {