From 88fbf0a8fc1c4192279ebd4c31b66acf05117aa6 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 13 Jul 2022 16:10:03 +0200 Subject: Fix (studio-reported) bad remapping of libraries. New remapper code would also fail in some cases when remapping libraries, similar to the issue yesterday, because ID_LI type had no mask value. That would fail to remap `parent` member of a library to NULL when deleting that parent, leading to a crash e.g. in Outliner tree building code. Reported by @JulienKaspar from Blender studio. --- source/blender/blenkernel/intern/lib_query.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/lib_query.c') diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c index 38252a46b93..a869bf4c4b0 100644 --- a/source/blender/blenkernel/intern/lib_query.c +++ b/source/blender/blenkernel/intern/lib_query.c @@ -391,8 +391,7 @@ uint64_t BKE_library_id_can_use_filter_id(const ID *id_owner) switch ((ID_Type)id_type_owner) { case ID_LI: - /* ID_LI doesn't exist as filter_id. */ - return 0; + return FILTER_ID_LI; case ID_SCE: return FILTER_ID_OB | FILTER_ID_WO | FILTER_ID_SCE | FILTER_ID_MC | FILTER_ID_MA | FILTER_ID_GR | FILTER_ID_TXT | FILTER_ID_LS | FILTER_ID_MSK | FILTER_ID_SO | @@ -472,6 +471,8 @@ uint64_t BKE_library_id_can_use_filter_id(const ID *id_owner) /* Deprecated... */ return 0; } + + BLI_assert_unreachable(); return 0; } -- cgit v1.2.3