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:
authorCampbell Barton <ideasman42@gmail.com>2011-02-02 03:40:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-02 03:40:55 +0300
commit95df65f1b55d311be4171f71bb106f9c7d193a79 (patch)
tree9ceafdf50ae1afbb903722ae4979d85ad7dd300f /source/blender/editors/armature/poseobject.c
parent19efa4301a5f2545eddfd4e5e56943d9a1d9f5cf (diff)
- some parts of the code to remove rotation were not removing axis/angle rotation (only functional change of this commit).
- use BLI_math functions for removing rotations from objects and pose channels. - add unit_axis_angle() to avoid setting the Y axis inline anywhere rotation needs removing.
Diffstat (limited to 'source/blender/editors/armature/poseobject.c')
-rw-r--r--source/blender/editors/armature/poseobject.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 6c1adcb2ccb..2913f001d48 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -1892,11 +1892,8 @@ static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
/* only if bone is using quaternion rotation */
if (pchan->rotmode == ROT_MODE_QUAT) {
/* quaternions have 720 degree range */
- pchan->quat[0]= -pchan->quat[0];
- pchan->quat[1]= -pchan->quat[1];
- pchan->quat[2]= -pchan->quat[2];
- pchan->quat[3]= -pchan->quat[3];
-
+ negate_v4(pchan->quat);
+
/* tagging */
if (autokeyframe_cfra_can_key(scene, &ob->id)) {
ListBase dsources = {NULL, NULL};