diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-10-18 00:11:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-10-21 14:14:26 +0400 |
commit | ae32adc05b97cf5dd6af1c1091307d307c1fb167 (patch) | |
tree | 7ce9de594e5b4848ceabd9c8e45f52d126cc36d2 /source | |
parent | ff0311714aded7c95a0eaf95cab1cc9fa6bed459 (diff) |
Fix for align bone to cursor (missing normalize)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/armature/armature_edit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 1e4d9bac246..d426ee94327 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -296,7 +296,9 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op) float cursor_rel[3]; sub_v3_v3v3(cursor_rel, cursor_local, ebone->head); if (axis_flip) negate_v3(cursor_rel); - ebone->roll = ED_rollBoneToVector(ebone, cursor_rel, axis_only); + if (normalize_v3(cursor_rel) != 0.0f) { + ebone->roll = ED_rollBoneToVector(ebone, cursor_rel, axis_only); + } } } } |