Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-12-28 14:33:35 +0300
committerBastien Montagne <bastien@blender.org>2021-12-28 17:08:10 +0300
commit23ac79f2c257b94b28593a5c7cdcc37a5021201d (patch)
tree633288c776f440f6ed71ce5a32e69619f51d59e8 /source/blender
parent44db9f192eba5ef3c2f3117457b45540d3ca3801 (diff)
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.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c8
1 files changed, 4 insertions, 4 deletions
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);
}
}