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:
authorJoshua Leung <aligorith@gmail.com>2009-10-08 04:57:00 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-08 04:57:00 +0400
commit475ab5ceb4875eb37dd761f7a71ff569dd493395 (patch)
treea545c13c1ea502e60b4c64fb56756c8a3432ed83 /source/blender/editors/armature/poseobject.c
parentfd511eb984a23b63b373e171666667c8213579c0 (diff)
Rotation Modes Bugfix:
Animating rotations using different rotation modes should now work more often than before. Previously, quaternion and axis-angle values were stored in the same variable in DNA, but that was causing problems with other animation curves overwriting the values and causing the rotations to not work as expected. There are still some issues, but I'll track those down later tonight
Diffstat (limited to 'source/blender/editors/armature/poseobject.c')
-rw-r--r--source/blender/editors/armature/poseobject.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index edbc7b9ae9b..461a70bbf86 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -819,7 +819,7 @@ void pose_copy_menu(Scene *scene)
/* need to convert to quat first (in temp var)... */
Mat4ToQuat(delta_mat, tmp_quat);
- QuatToAxisAngle(tmp_quat, &pchan->quat[1], &pchan->quat[0]);
+ QuatToAxisAngle(tmp_quat, pchan->rotAxis, &pchan->rotAngle);
}
else if (pchan->rotmode == ROT_MODE_QUAT)
Mat4ToQuat(delta_mat, pchan->quat);
@@ -1024,23 +1024,23 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
else if (pchan->rotmode > 0) {
/* quat/axis-angle to euler */
if (chan->rotmode == ROT_MODE_AXISANGLE)
- AxisAngleToEulO(&chan->quat[1], chan->quat[0], pchan->eul, pchan->rotmode);
+ AxisAngleToEulO(chan->rotAxis, chan->rotAngle, pchan->eul, pchan->rotmode);
else
QuatToEulO(chan->quat, pchan->eul, pchan->rotmode);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
/* quat/euler to axis angle */
if (chan->rotmode > 0)
- EulOToAxisAngle(chan->eul, chan->rotmode, &pchan->quat[1], &pchan->quat[0]);
+ EulOToAxisAngle(chan->eul, chan->rotmode, pchan->rotAxis, &pchan->rotAngle);
else
- QuatToAxisAngle(chan->quat, &pchan->quat[1], &pchan->quat[0]);
+ QuatToAxisAngle(chan->quat, pchan->rotAxis, &pchan->rotAngle);
}
else {
/* euler/axis-angle to quat */
if (chan->rotmode > 0)
EulOToQuat(chan->eul, chan->rotmode, pchan->quat);
else
- AxisAngleToQuat(pchan->quat, &chan->quat[1], chan->quat[0]);
+ AxisAngleToQuat(pchan->quat, chan->rotAxis, pchan->rotAngle);
}
/* paste flipped pose? */
@@ -1055,10 +1055,10 @@ static int pose_paste_exec (bContext *C, wmOperator *op)
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
float eul[3];
- AxisAngleToEulO(&pchan->quat[1], pchan->quat[0], eul, EULER_ORDER_DEFAULT);
+ AxisAngleToEulO(pchan->rotAxis, pchan->rotAngle, eul, EULER_ORDER_DEFAULT);
eul[1]*= -1;
eul[2]*= -1;
- EulOToAxisAngle(eul, EULER_ORDER_DEFAULT, &pchan->quat[1], &pchan->quat[0]);
+ EulOToAxisAngle(eul, EULER_ORDER_DEFAULT, pchan->rotAxis, &pchan->rotAngle);
// experimental method (uncomment to test):
#if 0