Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-04-24 23:15:43 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-04-24 23:25:28 +0400
commit16443b1ae0f79e853ce13f17a3513a12c5cd8883 (patch)
tree878c2f0a52a3d824e8acaca60800529ed61161f5 /source/blender/editors/armature/armature_edit.c
parent030ae5cadf21239cdd96087fd2bb401e8cf3fe8c (diff)
Fix T39874: Bone roll resets if bones are moved in edit mode
Own stupid typo in rBee387c6addb2, sigh...
Diffstat (limited to 'source/blender/editors/armature/armature_edit.c')
-rw-r--r--source/blender/editors/armature/armature_edit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 24d941e822b..c5aa81c3a37 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -217,7 +217,7 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const bool
vec_roll_to_mat3(nor, 0.0f, mat);
/* check the bone isn't aligned with the axis */
- if (is_zero_v3(align_axis) || dot_v3v3(align_axis, mat[2]) <= (1.0f - FLT_EPSILON)) {
+ if (dot_v3v3(align_axis, mat[2]) >= (1.0f - FLT_EPSILON)) {
return roll;
}
@@ -226,7 +226,7 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const bool
sub_v3_v3v3(align_axis_proj, align_axis, vec);
if (axis_only) {
- if (angle_v3v3(align_axis_proj, mat[2]) > (float)(M_PI / 2.0)) {
+ if (angle_v3v3(align_axis_proj, mat[2]) > (float)(M_PI_2)) {
negate_v3(align_axis_proj);
}
}
@@ -236,9 +236,8 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const bool
cross_v3_v3v3(vec, mat[2], align_axis_proj);
if (dot_v3v3(vec, nor) < 0.0f) {
- roll = -roll;
+ return -roll;
}
-
return roll;
}