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-07-13 12:15:19 +0300
committerBastien Montagne <bastien@blender.org>2022-07-13 12:15:19 +0300
commit74888cdbfd523d70ea0573e4452bf65c25b3a888 (patch)
treed40f6586d918798af8924237f7a9952035a40186
parenta0848396051bd4aa8f611013f0ed722c9d85ec63 (diff)
Fix (studio-reported) issue in remapping code.
Not clearing runtime remapping data for the new ID as well as the old one can lead to false stale data there, wichi could e.g. make indirectly linked data be tagged as directly linked. This would generate an error report on file write when hapening on ShapeKey ID, since that type is not allowed to be directly linked.
-rw-r--r--source/blender/blenkernel/intern/lib_remap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lib_remap.c b/source/blender/blenkernel/intern/lib_remap.c
index 246999a1179..28b0337d9a2 100644
--- a/source/blender/blenkernel/intern/lib_remap.c
+++ b/source/blender/blenkernel/intern/lib_remap.c
@@ -428,10 +428,13 @@ static void libblock_remap_data_update_tags(ID *old_id, ID *new_id, void *user_d
}
static void libblock_remap_reset_remapping_status_callback(ID *old_id,
- ID *UNUSED(new_id),
+ ID *new_id,
void *UNUSED(user_data))
{
BKE_libblock_runtime_reset_remapping_status(old_id);
+ if (new_id != NULL) {
+ BKE_libblock_runtime_reset_remapping_status(new_id);
+ }
}
/**