Commit: 23ac79f2c257b94b28593a5c7cdcc37a5021201d Author: Bastien Montagne Date: Tue Dec 28 12:33:35 2021 +0100 Branches: master https://developer.blender.org/rB23ac79f2c257b94b28593a5c7cdcc37a5021201d
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. =================================================================== M source/blender/makesrna/intern/rna_access_compare_override.c =================================================================== 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); } } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs