diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-09 18:48:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-09 18:48:34 +0300 |
commit | f082c7be05cdcf0de8e3140eb0d5ee8013fba576 (patch) | |
tree | 3497638dc51db810941824ea72d9fe07f09bc27c /source/blender/editors | |
parent | ce38137449790daa5395045b06d029bf4fd71cf7 (diff) |
add access to edge select tagging from mesh toolbar (tagging seams on Ctrl+RMB)
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh_mods.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 717b725387a..b69f189287b 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -2133,7 +2133,7 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2]) { ViewContext vc; EditMesh *em; - EditEdge *eed; + EditEdge *eed, *eed_act= NULL; int dist= 50; em_setup_viewcontext(C, &vc); @@ -2153,7 +2153,6 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2]) EditSelection *ese = em->selected.last; if(ese && ese->type == EDITEDGE) { - EditEdge *eed_act; eed_act = (EditEdge*)ese->data; if (eed_act != eed) { if (edgetag_shortest_path(vc.scene, em, eed_act, eed)) { @@ -2167,14 +2166,20 @@ static void mouse_mesh_shortest_path(bContext *C, short mval[2]) int act = (edgetag_context_check(vc.scene, eed)==0); edgetag_context_set(vc.scene, eed, act); /* switch the edge option */ } - - EM_selectmode_flush(em); /* even if this is selected it may not be in the selection list */ - if(edgetag_context_check(vc.scene, eed)==0) + if(edgetag_context_check(vc.scene, eed)==EDGE_MODE_SELECT) EM_remove_selection(em, eed, EDITEDGE); - else + else { + /* other modes need to keep the last edge tagged */ + if(eed_act) + EM_select_edge(eed_act, 0); + + EM_select_edge(eed, 1); EM_store_selection(em, eed, EDITEDGE); + } + + EM_selectmode_flush(em); /* force drawmode for mesh */ switch (vc.scene->toolsettings->edge_mode) { |