diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index d553ead1e45..d8336e79064 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -1238,6 +1238,8 @@ static bool rna_property_override_diff_propptr_validate_diffing(PointerRNA *prop /* Used for both Pointer and Collection properties. */ static int rna_property_override_diff_propptr(Main *bmain, + ID *owner_id_a, + ID *owner_id_b, PointerRNA *propptr_a, PointerRNA *propptr_b, eRNACompareMode mode, @@ -1359,6 +1361,17 @@ static int rna_property_override_diff_propptr(Main *bmain, * override is not matching its reference anymore. */ opop->flag &= ~IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE; } + else if ((owner_id_a->tag & LIB_TAG_LIB_OVERRIDE_NEED_RESYNC) != 0 || + (owner_id_b->tag & LIB_TAG_LIB_OVERRIDE_NEED_RESYNC) != 0) { + /* In case one of the owner of the checked property is tagged as needing resync, do + * not change the 'match reference' status of its ID pointer properties overrides, + * since many non-matching ones are likely due to missing resync. */ + printf( + "%s: Not checking matching ID pointer properties, since owner %s is tagged as " + "needing resync.\n", + __func__, + id_a->name); + } else if (id_a->override_library != NULL && id_a->override_library->reference == id_b) { opop->flag |= IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE; } @@ -1778,6 +1791,8 @@ int rna_property_override_diff_default(Main *bmain, PointerRNA propptr_a = RNA_property_pointer_get(ptr_a, rawprop_a); PointerRNA propptr_b = RNA_property_pointer_get(ptr_b, rawprop_b); return rna_property_override_diff_propptr(bmain, + ptr_a->owner_id, + ptr_b->owner_id, &propptr_a, &propptr_b, mode, @@ -1934,6 +1949,8 @@ int rna_property_override_diff_default(Main *bmain, else if (is_id || is_valid_for_diffing) { if (equals || do_create) { const int eq = rna_property_override_diff_propptr(bmain, + ptr_a->owner_id, + ptr_b->owner_id, &iter_a.ptr, &iter_b.ptr, mode, |