From 23ac79f2c257b94b28593a5c7cdcc37a5021201d Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 28 Dec 2021 12:33:35 +0100 Subject: LibOverride: Tweak RNA 'need resync' detection code. * Assert about source ID of an overridden pointer property not being a liboverride was not necessary, just skip in that case. * Tag actual 'real' ID owner for resync, and not (potentially) an embedded one. --- source/blender/makesrna/intern/rna_access_compare_override.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c index 35af92592e9..19c678a4222 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.c +++ b/source/blender/makesrna/intern/rna_access_compare_override.c @@ -1095,8 +1095,8 @@ static void rna_property_override_check_resync(Main *bmain, ID *id_src = rna_property_override_property_real_id_owner(bmain, ptr_item_src, NULL, NULL); ID *id_dst = rna_property_override_property_real_id_owner(bmain, ptr_item_dst, NULL, NULL); - BLI_assert(id_src == NULL || ID_IS_OVERRIDE_LIBRARY_REAL(id_src)); - /* Work around file corruption on writing, see T86853. */ + /* If `id_src` is not a liboverride, we cannot perform any further 'need resync' checks from + * here. */ if (id_src != NULL && !ID_IS_OVERRIDE_LIBRARY_REAL(id_src)) { return; } @@ -1117,8 +1117,8 @@ static void rna_property_override_check_resync(Main *bmain, * override copy generated by `BKE_lib_override_library_update` will already have its * self-references updated to itself, instead of still pointing to its linked source. */ (id_dst->lib == id_src->lib && id_dst != id_owner))) { - ptr_dst->owner_id->tag |= LIB_TAG_LIB_OVERRIDE_NEED_RESYNC; - CLOG_INFO(&LOG, 3, "Local override %s detected as needing resync", ptr_dst->owner_id->name); + id_owner->tag |= LIB_TAG_LIB_OVERRIDE_NEED_RESYNC; + CLOG_INFO(&LOG, 3, "Local override %s detected as needing resync", id_owner->name); } } -- cgit v1.2.3