Fix IDManagement remapping missing some required remapping with some liboverrides.

`BKE_library_id_can_use_filter_id` would not handle properly cases where
the ID is a liboverride - it's hierarchy root pointer can point back to
virtually any kind of ID (although typically a Collection or Object).

This was breaking liboverride resync process in some rare cases, by
failing to remap the 'hierarchy root' pointer of some liboverrides.
This commit is contained in:
Bastien Montagne
2023-05-12 16:58:47 +02:00
parent 6491387fba
commit 4ecbb3f1d5

View File

@@ -404,6 +404,11 @@ uint64_t BKE_library_id_can_use_filter_id(const ID *id_owner, const bool include
return FILTER_ID_ALL;
}
if (ID_IS_OVERRIDE_LIBRARY_REAL(id_owner)) {
/* LibOverride data 'hierarchy root' can virtually point back to any type of ID. */
return FILTER_ID_ALL;
}
switch ((ID_Type)id_type_owner) {
case ID_LI:
return FILTER_ID_LI;