[Bf-blender-cvs] [1a2ab21a2ca] ui-asset-view-template: Fix T85981, part II: bone's custom shape disappear on undo in some cases.

Bastien Montagne noreply at git.blender.org
Wed Mar 3 21:45:16 CET 2021


Commit: 1a2ab21a2ca1cc1cca099018461bf8d2a00048d9
Author: Bastien Montagne
Date:   Tue Mar 2 12:37:44 2021 +0100
Branches: ui-asset-view-template
https://developer.blender.org/rB1a2ab21a2ca1cc1cca099018461bf8d2a00048d9

Fix T85981, part II: bone's custom shape disappear on undo in some cases.

Nicely hidden bug in pose read library code, it was using the library
from the wrong ID as reference to relink the custom shape object pointer
(pose is data from Object, not Armature).

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

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

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

diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 06b8bd5f0f2..f9c2a4e53ad 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -2002,7 +2002,7 @@ void BKE_pose_blend_read_lib(BlendLibReader *reader, Object *ob, bPose *pose)
 
     IDP_BlendReadLib(reader, pchan->prop);
 
-    BLO_read_id_address(reader, arm->id.lib, &pchan->custom);
+    BLO_read_id_address(reader, ob->id.lib, &pchan->custom);
     if (UNLIKELY(pchan->bone == NULL)) {
       rebuild = true;
     }



More information about the Bf-blender-cvs mailing list