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>2022-01-05 18:30:15 +0300
committerBastien Montagne <bastien@blender.org>2022-01-05 19:30:22 +0300
commitbfb760e16acbc33661739154f0ab8f5505987d1d (patch)
tree1058bb182647e3e5a364509e868344f419899e6b /source/blender/makesrna/intern/rna_access_compare_override.c
parent1403f034ffd4b394fc8a9b8adec34698dcec891e (diff)
Fix T94650: LibOverride: Bad handling of (auto)resync in case of single override.
Overrides that are not created as part of an override hierarchy should not be handled through (auto)resync at all. users are responsible to hanlde those updates if they need it. This is achieved by flagging overrides created outside of a hierarchical process accordingly, and skipping them during resync process.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access_compare_override.c')
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 19c678a4222..2af83c8adcb 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -1095,6 +1095,13 @@ 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_IS_OVERRIDE_LIBRARY_REAL(id_owner));
+
+ /* If the owner ID is not part of an override hierarchy, there is no possible resync. */
+ if (id_owner->override_library->flag & IDOVERRIDE_LIBRARY_FLAG_NO_HIERARCHY) {
+ return;
+ }
+
/* 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)) {