LibOverride: Fix resync bug on recursive overrides.

Linked override were not properly ignored in some part of the code,
leading to invalid resync results in some cases with recursive overrides
(i.e. overrides of overrides).

Reported by Andy @eyecandy from the studio.
This commit is contained in:
Bastien Montagne 2021-04-10 18:36:43 +02:00
parent 3bd892a74c
commit ed5507de8a
1 changed files with 1 additions and 1 deletions

View File

@ -895,7 +895,7 @@ bool BKE_lib_override_library_resync(Main *bmain,
BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, __func__);
ID *id;
FOREACH_MAIN_ID_BEGIN (bmain, id) {
if (id->tag & LIB_TAG_DOIT && ID_IS_OVERRIDE_LIBRARY_REAL(id)) {
if (id->tag & LIB_TAG_DOIT && !ID_IS_LINKED(id) && ID_IS_OVERRIDE_LIBRARY_REAL(id)) {
/* While this should not happen in typical cases (and won't be properly supported here), user
* is free to do all kind of very bad things, including having different local overrides of a
* same linked ID in a same hierarchy. */