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:
authorSebastian Parborg <darkdefende@gmail.com>2020-05-13 17:27:05 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-05-19 13:22:18 +0300
commit25dea3e65efd64566d0b6397094fa76ec4ef089d (patch)
tree1f7f213e4113c3e3afaef50b0202fb0504d82ef6 /source/blender/editors/armature/pose_edit.c
parent10528a5cd4eacad7d67e0939f0e0941d8c499876 (diff)
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.
Diffstat (limited to 'source/blender/editors/armature/pose_edit.c')
-rw-r--r--source/blender/editors/armature/pose_edit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index c5b9f6adb28..0cd3afc9cf9 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) {