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/space_view3d | |
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/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 9a94ca8624c..967fbfd26af 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -103,6 +103,24 @@ void view3d_set_viewcontext(bContext *C, ViewContext *vc) vc->obedit= CTX_data_edit_object(C); } +void view3d_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); + } +} + /* ********************** view3d_select: selection manipulations ********************* */ /* XXX to solve *************** */ |