diff options
author | Matt Ebb <matt@mke3.net> | 2010-01-12 04:50:34 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-01-12 04:50:34 +0300 |
commit | e6c61acb68927519d869d150444e1a58798976d3 (patch) | |
tree | e45a8f5180cb09235916dbd9f4e5bdd0755cf999 /source/blender/editors/mesh/editmesh_add.c | |
parent | 44068d96aa16f7561dfec224776bb16b7f694551 (diff) |
Fix [#20644] new curve sets itself to the origin, but the pivot to the cursor
+ Cleaned up the nurbs spin operator and gave it properties rather than
relying on context
Diffstat (limited to 'source/blender/editors/mesh/editmesh_add.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 572cf214c6a..3a80d7c69bb 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -1270,36 +1270,6 @@ static void make_prim(Object *obedit, int type, float mat[4][4], int tot, int se BKE_mesh_end_editmesh(obedit->data, em); } - -/* uses context to figure out transform for primitive */ -/* returns standard diameter */ -static float new_primitive_matrix(bContext *C, float *loc, float *rot, float primmat[][4]) -{ - Object *obedit= CTX_data_edit_object(C); - View3D *v3d =CTX_wm_view3d(C); - float mat[3][3], rmat[3][3], cmat[3][3], imat[3][3]; - - unit_m4(primmat); - - eul_to_mat3(rmat, rot); - invert_m3(rmat); - - /* inverse transform for initial rotation and object */ - copy_m3_m4(mat, obedit->obmat); - mul_m3_m3m3(cmat, rmat, mat); - invert_m3_m3(imat, cmat); - copy_m4_m3(primmat, imat); - - /* center */ - VECCOPY(primmat[3], loc); - VECSUB(primmat[3], primmat[3], obedit->obmat[3]); - invert_m3_m3(imat, mat); - mul_m3_v3(imat, primmat[3]); - - if(v3d) return v3d->grid; - return 1.0f; -} - /* ********* add primitive operators ************* */ static void make_prim_ext(bContext *C, float *loc, float *rot, int enter_editmode, @@ -1319,7 +1289,7 @@ static void make_prim_ext(bContext *C, float *loc, float *rot, int enter_editmod } else DAG_id_flush_update(&obedit->id, OB_RECALC_DATA); - dia *= new_primitive_matrix(C, loc, rot, mat); + dia *= ED_object_new_primitive_matrix(C, loc, rot, mat); make_prim(obedit, type, mat, tot, seg, subdiv, dia, depth, ext, fill); |