From d5a88f9bf4f0d73bd8ee9f68ad4146260f7d559b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 10 Feb 2022 16:58:22 +0100 Subject: Fix (unreported) over-resync from RNA detection code in linked cases. While applying liboverrides on linked data, RNA code (in `rna_property_override_check_resync`) would detect a lot of false positive regarding IDs needing resync, because the temporary ID used to apply overrides was always local, breaking the libraries comparison check. NOTE: that whole 'apply liboverrides' code could use some refreshment, it did not change much from initila version several years ago, we now have better tools and control over non-main data. But for now the 'trick' in that commit should do the job, ultimately those temps IDs should never be put in Main at all. --- source/blender/blenkernel/intern/lib_override.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source') diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index 961f63b1f82..049b5e75c89 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -2997,6 +2997,8 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) return; } + tmp_id->lib = local->lib; + /* This ID name is problematic, since it is an 'rna name property' it should not be editable or * different from reference linked ID. But local ID names need to be unique in a given type * list of Main, so we cannot always keep it identical, which is why we need this special @@ -3009,6 +3011,7 @@ void BKE_lib_override_library_update(Main *bmain, ID *local) Key *tmp_key = BKE_key_from_id(tmp_id); if (local_key != NULL && tmp_key != NULL) { tmp_key->id.flag |= (local_key->id.flag & LIB_EMBEDDED_DATA_LIB_OVERRIDE); + tmp_key->id.lib = local_key->id.lib; } PointerRNA rnaptr_src, rnaptr_dst, rnaptr_storage_stack, *rnaptr_storage = NULL; -- cgit v1.2.3