Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2022-07-13 17:10:03 +0300
committerBastien Montagne <bastien@blender.org>2022-07-13 17:11:59 +0300
commit88fbf0a8fc1c4192279ebd4c31b66acf05117aa6 (patch)
tree7f3d5d0c29888b973c87a8f08ca417f3171d5bc8 /source/blender/blenkernel/intern/lib_query.c
parentccdf189d3c5c3b90dbb95b704f684f1cd1bd192c (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/lib_query.c')
-rw-r--r--source/blender/blenkernel/intern/lib_query.c5
1 files changed, 3 insertions, 2 deletions
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;
}