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.
This commit is contained in:
Bastien Montagne 2021-10-20 15:21:24 +02:00
parent 4539c7cc57
commit 2d46cef2e8
Notes: blender-bot 2023-02-14 07:31:32 +01:00
Referenced by issue #92347, Append function excludes Collections that do not contain Objects directly
1 changed files with 2 additions and 1 deletions

View File

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