From 693a215dc4460502388da7c63921f4d43c24a082 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 5 May 2021 12:44:05 +0200 Subject: LibOverride: Fix usage of IDProps that are not overridable. Not all python-defined ID properties are overridable (yet), this needs to be detected by libquery 'foreach id' code, such that those ID pointers can be ignored by override code when working on override hierarchies. Fixes part of the issues found while investigating studio files (namely, some py-defined ID pointer properties from rigify that are not currently overridable would cause issues and false detections during resync). --- source/blender/blenkernel/intern/lib_query.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c index 37585ce969b..2c659890ec0 100644 --- a/source/blender/blenkernel/intern/lib_query.c +++ b/source/blender/blenkernel/intern/lib_query.c @@ -144,7 +144,10 @@ void BKE_lib_query_idpropertiesForeachIDLink_callback(IDProperty *id_prop, void BLI_assert(id_prop->type == IDP_ID); LibraryForeachIDData *data = (LibraryForeachIDData *)user_data; - BKE_LIB_FOREACHID_PROCESS_ID(data, id_prop->data.pointer, IDWALK_CB_USER); + const int cb_flag = IDWALK_CB_USER | ((id_prop->flag & IDP_FLAG_OVERRIDABLE_LIBRARY) ? + 0 : + IDWALK_CB_OVERRIDE_LIBRARY_NOT_OVERRIDABLE); + BKE_LIB_FOREACHID_PROCESS_ID(data, id_prop->data.pointer, cb_flag); } bool BKE_library_foreach_ID_embedded(LibraryForeachIDData *data, ID **id_pp) -- cgit v1.2.3