Commit: 074c695a0d4de88550be71181690639ab6b16dcf Author: Bastien Montagne Date: Fri May 13 18:05:44 2022 +0200 Branches: blender-v3.2-release https://developer.blender.org/rB074c695a0d4de88550be71181690639ab6b16dcf
Fix T98072: Regression: When appending a Scene, the Collections that are excluded get instanced into Current Scene. This was due to using `BKE_scene_has_object` function, which uses the cache of bases of the viewlayers, which do not have entries for the content of excluded collections... Now use `BKE_collection_has_object_recursive` instead. =================================================================== M source/blender/blenkernel/intern/blendfile_link_append.c =================================================================== diff --git a/source/blender/blenkernel/intern/blendfile_link_append.c b/source/blender/blenkernel/intern/blendfile_link_append.c index 555c4690308..f9eea52360e 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.c +++ b/source/blender/blenkernel/intern/blendfile_link_append.c @@ -400,7 +400,9 @@ typedef struct LooseDataInstantiateContext { static bool object_in_any_scene(Main *bmain, Object *ob) { LISTBASE_FOREACH (Scene *, sce, &bmain->scenes) { - if (BKE_scene_object_find(sce, ob)) { + /* #BKE_scene_has_object checks bases cache of the scenes' viewlayer, not actual content of + * their collections. */ + if (BKE_collection_has_object_recursive(sce->master_collection, ob)) { return true; } } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs