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:
authorCampbell Barton <ideasman42@gmail.com>2015-02-09 18:38:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-09 18:50:59 +0300
commitc4e8d74563e234e6a2cb6ce77f42452b5577fe38 (patch)
treebdbb06c8798c22581d2973554512a31a289c900c /source/blender/editors/curve/editcurve_add.c
parent3c755fd6a542ae2a0f3a2fb7788d277449045023 (diff)
Fix T43498: New curves fails /w radius & rotation
Scaling matrix assumed no rotation, also remove unused apply_diameter arg.
Diffstat (limited to 'source/blender/editors/curve/editcurve_add.c')
-rw-r--r--source/blender/editors/curve/editcurve_add.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c
index c9a961d1a4d..4e08ada9738 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];
+ float mat[4][4], scale_mat[4][4];
WM_operator_view3d_unit_defaults(C, op);
@@ -529,11 +529,10 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf)
if (newob && enter_editmode)
ED_undo_push(C, "Enter Editmode");
- ED_object_new_primitive_matrix(C, obedit, loc, rot, mat, false);
+ ED_object_new_primitive_matrix(C, obedit, loc, rot, mat);
dia = RNA_float_get(op->ptr, "radius");
- mat[0][0] *= dia;
- mat[1][1] *= dia;
- mat[2][2] *= dia;
+ scale_m4_fl(scale_mat, dia);
+ mul_m4_m4m4(mat, scale_mat, mat);
nu = add_nurbs_primitive(C, obedit, mat, type, newob);
editnurb = object_editcurve_get(obedit);