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>2010-10-26 20:55:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-26 20:55:38 +0400
commitd5f66ea92584ce0d707387c9daebd05913c7209a (patch)
tree9794a3804c45463cb4c5a1adfedacc4df32c20b6 /source/blender/blenkernel/intern/constraint.c
parentf8ec6b8654962cd2fc77b9941f35c8127d37fc90 (diff)
partial bugfix [#24002] Constraint "Limit rotation" doesn't work properly
this fixes the obvious problems but there are still some rotation jumping when clamping in some cases.
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index c3f05e497f1..4d6ef612c83 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1381,6 +1381,7 @@ static bConstraintTypeInfo CTI_LOCLIMIT = {
static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
{
bRotLimitConstraint *data = con->data;
+ float eul_zero[3]= {0.0f, 0.0f, 0.0f};
float loc[3];
float eul[3];
float size[3];
@@ -1388,8 +1389,9 @@ static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *U
copy_v3_v3(loc, cob->matrix[3]);
mat4_to_size(size, cob->matrix);
- mat4_to_eulO(eul, cob->rotOrder, cob->matrix);
-
+ /* use compat function because it uses the rotation without axis flipping [#24002] */
+ mat4_to_compatible_eulO(eul, eul_zero, cob->rotOrder, cob->matrix);
+
/* constraint data uses radians internally */
/* limiting of euler values... */