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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2007-12-06 22:44:17 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-12-06 22:44:17 +0300
commit37d11907d0a96a68d1200bf57c6efdb31f4692e4 (patch)
tree74bcebd6e42354074a32bd5822ee7941bd7ebd85 /intern/iksolver
parent51322964f4e00891621e249e5bd15e93a2d2ee06 (diff)
Bugfix for IK locked axes with an initial rotation, gave wrong
starting angle in some cases, but wasn't always noticeable due to the IK solver changing it anyway. Bugfix for hidden bones in pose mode still being active, and preventing other bones from becoming active.
Diffstat (limited to 'intern/iksolver')
-rw-r--r--intern/iksolver/intern/IK_QSegment.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/iksolver/intern/IK_QSegment.cpp b/intern/iksolver/intern/IK_QSegment.cpp
index a5217ed91d6..bf38c369363 100644
--- a/intern/iksolver/intern/IK_QSegment.cpp
+++ b/intern/iksolver/intern/IK_QSegment.cpp
@@ -61,11 +61,11 @@ static MT_Scalar EulerAngleFromMatrix(const MT_Matrix3x3& R, int axis)
MT_Scalar t = sqrt(R[0][0]*R[0][0] + R[0][1]*R[0][1]);
if (t > 16.0*MT_EPSILON) {
- if (axis == 0) return atan2(R[1][2], R[2][2]);
+ if (axis == 0) return -atan2(R[1][2], R[2][2]);
else if(axis == 1) return atan2(-R[0][2], t);
- else return atan2(R[0][1], R[0][0]);
+ else return -atan2(R[0][1], R[0][0]);
} else {
- if (axis == 0) return atan2(-R[2][1], R[1][1]);
+ if (axis == 0) return -atan2(-R[2][1], R[1][1]);
else if(axis == 1) return atan2(-R[0][2], t);
else return 0.0f;
}