[Bf-blender-cvs] [74888cdbfd5] master: Fix (studio-reported) issue in remapping code.

Bastien Montagne noreply at git.blender.org
Wed Jul 13 11:16:39 CEST 2022


Commit: 74888cdbfd523d70ea0573e4452bf65c25b3a888
Author: Bastien Montagne
Date:   Wed Jul 13 11:15:19 2022 +0200
Branches: master
https://developer.blender.org/rB74888cdbfd523d70ea0573e4452bf65c25b3a888

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.

===================================================================

M	source/blender/blenkernel/intern/lib_remap.c

===================================================================

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);
+  }
 }
 
 /**



More information about the Bf-blender-cvs mailing list