diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-02-28 13:47:28 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-02-28 13:47:28 +0400 |
commit | f23f07ced020cc337a5fe77d02f7aaed5d584144 (patch) | |
tree | aa2f4556dd1429b61a5b646b9605d32a21e9b71b /source/blender | |
parent | 2e0a33745dbf7d70e313bf3cb9a3c413ed66f3b9 (diff) |
Fix T38407: Bone roll calculation flips local axes at wrong rotation angle
Just remove that rotation special case for now, at least fixes the glitch along Z axis when rotating around Y axis in report.
Anyway, there is no reason for such special handling, we do not have real rotation in editbone...
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index af4beff4bc9..8e7e5c4c1ce 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -812,17 +812,12 @@ static void recalcData_objects(TransInfo *t) } else { copy_v3_v3(up_axis, td->axismtx[2]); - - if (t->mode != TFM_ROTATION) { - sub_v3_v3v3(vec, ebo->tail, ebo->head); - normalize_v3(vec); - rotation_between_vecs_to_quat(qrot, td->axismtx[1], vec); - mul_qt_v3(qrot, up_axis); - } - else { - mul_m3_v3(t->mat, up_axis); - } - + + sub_v3_v3v3(vec, ebo->tail, ebo->head); + normalize_v3(vec); + rotation_between_vecs_to_quat(qrot, td->axismtx[1], vec); + mul_qt_v3(qrot, up_axis); + /* roll has a tendency to flip in certain orientations - [#34283], [#33974] */ roll = ED_rollBoneToVector(ebo, up_axis, false); ebo->roll = angle_compat_rad(roll, td->ival); |