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).
This commit is contained in:
Bastien Montagne
2021-03-02 12:37:44 +01:00
parent 3059c0b386
commit b3005bf688

View File

@@ -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;
}