diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-10-18 00:11:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-10-18 00:11:41 +0400 |
commit | d74e3c44cc47849b5964915edde1b129256d121e (patch) | |
tree | 5f8bb4aa728819e082ead8f809e4445607a09765 /source/blender | |
parent | 09351c68e17474959f94c5ab403e1e3b878b28ea (diff) |
Fix for align bone to cursor (missing normalize)
Diffstat (limited to 'source/blender')
-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 b7ab7fe064d..8bcee52baab 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); + } } } } |