diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-02-28 13:35:11 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-02-28 13:35:11 +0400 |
commit | 2e0a33745dbf7d70e313bf3cb9a3c413ed66f3b9 (patch) | |
tree | ed767c3483cf83f74925e7a715398cce8c491862 /source/blender/editors/transform/transform_conversions.c | |
parent | 5ac1b38b4b21959b552c0787e2f86a104624c615 (diff) |
Revert editbone roll correction changes.
This reverts commit f72acc38d 65c5be967 eff6b385e 3fe487217
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 91bac74e8e6..31123827c4c 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1061,27 +1061,6 @@ static void createTransPose(TransInfo *t, Object *ob) /* ********************* armature ************** */ -static void createTransArmatureVerts_init_roll_fix(TransData *td, EditBone *ebo) -{ - /* To fix roll, see comments in transform_generic.c::recalcData_objects() */ - const float z_axis[3] = {0.0f, 0.0f, 1.0f}; - float vec[3]; - - sub_v3_v3v3(vec, ebo->tail, ebo->head); - normalize_v3(vec); - - td->extra = ebo; - - if (fabsf(dot_v3v3(vec, z_axis)) > 0.999999f) { - /* If nearly aligned with Z axis, do not alter roll. See T38843. */ - ebo->temp_f = ebo->roll; - } - else { - ebo->temp_f = ebo->roll - ED_rollBoneToVector(ebo, z_axis, false); - } - td->ival = ebo->roll; -} - static void createTransArmatureVerts(TransInfo *t) { EditBone *ebo; @@ -1217,7 +1196,8 @@ static void createTransArmatureVerts(TransInfo *t) ED_armature_ebone_to_mat3(ebo, td->axismtx); if ((ebo->flag & BONE_ROOTSEL) == 0) { - createTransArmatureVerts_init_roll_fix(td, ebo); + td->extra = ebo; + td->ival = ebo->roll; } td->ext = NULL; @@ -1239,7 +1219,8 @@ static void createTransArmatureVerts(TransInfo *t) ED_armature_ebone_to_mat3(ebo, td->axismtx); - createTransArmatureVerts_init_roll_fix(td, ebo); + td->extra = ebo; /* to fix roll */ + td->ival = ebo->roll; td->ext = NULL; td->val = NULL; |