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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-05-05 13:44:05 +0300
committerBastien Montagne <bastien@blender.org>2021-05-05 13:51:59 +0300
commit693a215dc4460502388da7c63921f4d43c24a082 (patch)
treed0d51a8a537ac9951ae01b16572b20a32bd51f84 /source
parentb616c522d9b395d3b14059c276e4b4ab4cb82c63 (diff)
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).
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/lib_query.c5
1 files changed, 4 insertions, 1 deletions
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)