[Bf-blender-cvs] [ae32adc] blender-v2.72-release: Fix for align bone to cursor (missing normalize)

Campbell Barton noreply at git.blender.org
Tue Oct 21 12:14:42 CEST 2014


Commit: ae32adc05b97cf5dd6af1c1091307d307c1fb167
Author: Campbell Barton
Date:   Fri Oct 17 22:11:14 2014 +0200
Branches: blender-v2.72-release
https://developer.blender.org/rBae32adc05b97cf5dd6af1c1091307d307c1fb167

Fix for align bone to cursor (missing normalize)

===================================================================

M	source/blender/editors/armature/armature_edit.c

===================================================================

diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 1e4d9ba..d426ee9 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);
+				}
 			}
 		}
 	}




More information about the Bf-blender-cvs mailing list