[Bf-blender-cvs] [693a215dc44] blender-v2.93-release: LibOverride: Fix usage of IDProps that are not overridable.

Bastien Montagne noreply at git.blender.org
Wed May 5 14:21:33 CEST 2021


Commit: 693a215dc4460502388da7c63921f4d43c24a082
Author: Bastien Montagne
Date:   Wed May 5 12:44:05 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rB693a215dc4460502388da7c63921f4d43c24a082

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).

===================================================================

M	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 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)



More information about the Bf-blender-cvs mailing list