[Bf-blender-cvs] [2d46cef2e88] master: Fix T92347: Append function excludes Collections that do not contain Objects directly.

Bastien Montagne noreply at git.blender.org
Wed Oct 20 15:31:02 CEST 2021


Commit: 2d46cef2e88730f40d8927a10102fa9e2a2d4ea3
Author: Bastien Montagne
Date:   Wed Oct 20 15:21:24 2021 +0200
Branches: master
https://developer.blender.org/rB2d46cef2e88730f40d8927a10102fa9e2a2d4ea3

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.

===================================================================

M	source/blender/windowmanager/intern/wm_files_link.c

===================================================================

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)) {



More information about the Bf-blender-cvs mailing list