[Bf-blender-cvs] [16fbb47c886] master: Use normalized project functions

Campbell Barton noreply at git.blender.org
Wed Sep 6 17:16:10 CEST 2017


Commit: 16fbb47c8860b61694b2e08270d198f8d173b32a
Author: Campbell Barton
Date:   Thu Sep 7 01:19:37 2017 +1000
Branches: master
https://developer.blender.org/rB16fbb47c8860b61694b2e08270d198f8d173b32a

Use normalized project functions

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

M	source/blender/blenkernel/intern/constraint.c
M	source/blender/editors/armature/armature_edit.c
M	source/blender/editors/mask/mask_ops.c

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

diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index abf1c0905b5..7ad2ed91e87 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1019,7 +1019,7 @@ static void vectomat(const float vec[3], const float target_up[3], short axis, s
 	}
 
 	/* project the up vector onto the plane specified by n */
-	project_v3_v3v3(proj, u, n); /* first u onto n... */
+	project_v3_v3v3_normalized(proj, u, n); /* first u onto n... */
 	sub_v3_v3v3(proj, u, proj); /* then onto the plane */
 	/* proj specifies the transformation of the up axis */
 
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 67d5a038c78..51b76563c72 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -222,7 +222,7 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const bool
 	vec_roll_to_mat3_normalized(nor, 0.0f, mat);
 
 	/* project the new_up_axis along the normal */
-	project_v3_v3v3(vec, align_axis, nor);
+	project_v3_v3v3_normalized(vec, align_axis, nor);
 	sub_v3_v3v3(align_axis_proj, align_axis, vec);
 
 	if (axis_only) {
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 35de390274c..196285cf02a 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -999,7 +999,7 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event)
 
 				if (weight) {
 					sub_v2_v2v2(c, offco, p);
-					project_v2_v2v2(vec, c, no);
+					project_v2_v2v2_normalized(vec, c, no);
 
 					w = len_v2(vec);



More information about the Bf-blender-cvs mailing list