[Bf-blender-cvs] [2fe9e3c] master: more direct fix for last commit

Campbell Barton noreply at git.blender.org
Mon Feb 9 17:00:56 CET 2015


Commit: 2fe9e3c1f0fd968bb214e13763b58a35f637caa9
Author: Campbell Barton
Date:   Tue Feb 10 03:00:37 2015 +1100
Branches: master
https://developer.blender.org/rB2fe9e3c1f0fd968bb214e13763b58a35f637caa9

more direct fix for last commit

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

M	source/blender/editors/curve/editcurve_add.c
M	source/blender/editors/mesh/editmesh_add.c

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

diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
index 4e08ada..7c53896 100644
--- a/source/blender/editors/curve/editcurve_add.c
+++ b/source/blender/editors/curve/editcurve_add.c
@@ -479,7 +479,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
 	unsigned int layer;
 	float dia;
 	float loc[3], rot[3];
-	float mat[4][4], scale_mat[4][4];
+	float mat[4][4];
 
 	WM_operator_view3d_unit_defaults(C, op);
 
@@ -531,8 +531,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
 
 	ED_object_new_primitive_matrix(C, obedit, loc, rot, mat);
 	dia = RNA_float_get(op->ptr, "radius");
-	scale_m4_fl(scale_mat, dia);
-	mul_m4_m4m4(mat, scale_mat, mat);
+	mul_mat3_m4_fl(mat, dia);
 
 	nu = add_nurbs_primitive(C, obedit, mat, type, newob);
 	editnurb = object_editcurve_get(obedit);
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index a2160df..6ce5e8a 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -422,7 +422,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
 {
 	Object *obedit;
 	BMEditMesh *em;
-	float mat[4][4], scale_mat[4][4];
+	float mat[4][4];
 	float loc[3], rot[3];
 	float dia;
 	bool enter_editmode;
@@ -434,8 +434,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
 
 	obedit = make_prim_init(C, CTX_DATA_(BLF_I18NCONTEXT_ID_MESH, "Suzanne"), &dia, mat, &was_editmode, loc, rot, layer);
 	dia = RNA_float_get(op->ptr, "radius");
-	scale_m4_fl(scale_mat, dia);
-	mul_m4_m4m4(mat, scale_mat, mat);
+	mul_mat3_m4_fl(mat, dia);
 
 	em = BKE_editmesh_from_object(obedit);




More information about the Bf-blender-cvs mailing list