diff options
author | Bastien Montagne <bastien@blender.org> | 2022-02-10 18:58:22 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-02-10 18:58:22 +0300 |
commit | d5a88f9bf4f0d73bd8ee9f68ad4146260f7d559b (patch) | |
tree | 5847a1ca375f0649f2a31221bd764d0fa4714e63 /source/blender/blenkernel | |
parent | ad77b52abcbd0daf0d1a3ad395983cb90beeb72a (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/lib_override.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |