diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-02-13 20:37:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-02-13 20:37:01 +0300 |
commit | 47b9a44063fb3c98b3ca9cf8e5dff6ffa8136934 (patch) | |
tree | d3ae01207d51dd6858fc088f4bf293d101dd84ed /source/blender/editors/mesh | |
parent | 62494990e6d31d0efedd1a21015edb67eb2f4f68 (diff) |
2.5: Curve edit mode add vertex and add menus now work. Also
fixed an issue where sublevel menus did not get right operator
context.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index e16ec867e7c..969fceb41b0 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -118,24 +118,6 @@ static short icoface[20][3] = { /* *************** add-click-mesh (extrude) operator ************** */ -static void get_view_aligned_coordinate(ViewContext *vc, float *fp, short mval[2]) -{ - float dvec[3]; - short mx, my; - - mx= mval[0]; - my= mval[1]; - - project_short_noclip(vc->ar, fp, mval); - - initgrabz(vc->rv3d, fp[0], fp[1], fp[2]); - - if(mval[0]!=IS_CLIPPED) { - window_to_3d_delta(vc->ar, dvec, mval[0]-mx, mval[1]-my); - VecSubf(fp, fp, dvec); - } -} - static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) { ViewContext vc; @@ -182,7 +164,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) VECCOPY(min, cent); Mat4MulVecfl(vc.obedit->obmat, min); // view space - get_view_aligned_coordinate(&vc, min, mval); + view3d_get_view_aligned_coordinate(&vc, min, mval); Mat4Invert(vc.obedit->imat, vc.obedit->obmat); Mat4MulVecfl(vc.obedit->imat, min); // back in object space @@ -224,7 +206,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event) float *curs= give_cursor(vc.scene, vc.v3d); VECCOPY(min, curs); - get_view_aligned_coordinate(&vc, min, mval); + view3d_get_view_aligned_coordinate(&vc, min, mval); eve= addvertlist(vc.em, 0, NULL); |