diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-09-24 21:49:33 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-09-24 21:49:33 +0400 |
commit | b57e09544a430a585e8665c7064252be1b59ec57 (patch) | |
tree | 352b65f75f37c064091887901ba7c985c1a946e3 /source/blender/blenkernel/intern/constraint.c | |
parent | 3567eebcc20acbefd393fb8263cd2b750bcf8a93 (diff) |
Fix for [#21875] Copy rotation only on y axies
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index cec552b8124..59e81293c9f 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -1636,8 +1636,9 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta mat4_to_size(size, cob->matrix); /* to allow compatible rotations, must get both rotations in the order of the owner... */ - mat4_to_eulO(eul, cob->rotOrder, ct->matrix); mat4_to_eulO(obeul, cob->rotOrder, cob->matrix); + /* we must get compatible eulers from the beginning because some of them can be modified below (see bug #21875) */ + mat4_to_compatible_eulO(eul, obeul, cob->rotOrder, ct->matrix); if ((data->flag & ROTLIKE_X)==0) eul[0] = obeul[0]; @@ -1669,6 +1670,7 @@ static void rotlike_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta eul[2] *= -1; } + /* good to make eulers compatible again, since we don't know how much they were changed above */ compatible_eul(eul, obeul); loc_eulO_size_to_mat4(cob->matrix, loc, eul, size, cob->rotOrder); } |