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).
This commit is contained in:
Bastien Montagne 2021-05-05 12:44:05 +02:00
parent b616c522d9
commit 693a215dc4
1 changed files with 4 additions and 1 deletions

View File

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