From 95583a398c77ba9d8c15310b2b867adbdbafe908 Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Wed, 13 May 2020 16:27:05 +0200 Subject: Fix T76717: Set Rotation Mode Incorrectly Recalculates Bone Rotation In Pose Mode The issue was that we didn't convert the current rotational values. We simply just switched mode without doing any data conversions. --- source/blender/editors/armature/pose_edit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index b86da6374be..daab945c106 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -665,6 +665,11 @@ static int pose_bone_rotmode_exec(bContext *C, wmOperator *op) /* set rotation mode of selected bones */ CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob) { + /* use API Method for conversions... */ + BKE_rotMode_change_values( + pchan->quat, pchan->eul, pchan->rotAxis, &pchan->rotAngle, pchan->rotmode, (short)mode); + + /* finally, set the new rotation type */ pchan->rotmode = mode; if (prev_ob != ob) { -- cgit v1.2.3