From 2d46cef2e88730f40d8927a10102fa9e2a2d4ea3 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 20 Oct 2021 15:21:24 +0200 Subject: [PATCH] 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. --- source/blender/windowmanager/intern/wm_files_link.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) {