diff options
author | Geoffrey Bantle <hairbat@yahoo.com> | 2006-05-11 23:46:26 +0400 |
---|---|---|
committer | Geoffrey Bantle <hairbat@yahoo.com> | 2006-05-11 23:46:26 +0400 |
commit | 3e3b1cc1641223a9925c1611a9e616d281f02973 (patch) | |
tree | 022f5e05ccfd54d005a2640c7908e4deb1e5f7d0 /source/blender/src | |
parent | ede20c166a4fcaedaaf5c5392d00e3a99ecc8ad2 (diff) |
-> New menu and toolbox entries
Added the following to the 'select' menu of 3d header and toolbox while in mesh editmode: '
-Path Select
-Edge Loop Multi-Select
-Edge Ring Multi-Select
-Loop to Region
-Region to Loop
Also added Collapse Faces and Collapse Edges to menu and toolbox as well as made them available in selection modes other than face exclusive and edge exclusive.
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/edit.c | 18 | ||||
-rw-r--r-- | source/blender/src/editmesh_mods.c | 2 | ||||
-rw-r--r-- | source/blender/src/header_view3d.c | 35 | ||||
-rw-r--r-- | source/blender/src/toolbox.c | 7 |
4 files changed, 47 insertions, 15 deletions
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index fdfbfcd643d..6587cc301dd 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -1562,22 +1562,16 @@ void mergemenu(void) short event; int remCount = 0; - if(G.scene->selectmode == SCE_SELECT_VERTEX) + if(G.scene->selectmode & SCE_SELECT_VERTEX) if(G.editMesh->selected.first && G.editMesh->selected.last && ((EditSelection*)G.editMesh->selected.first)->type == EDITVERT && ((EditSelection*)G.editMesh->selected.last)->type == EDITVERT) - event = pupmenu("Merge %t|At First %x6|At Last%x1|At Center%x3|At Cursor%x4"); + event = pupmenu("Merge %t|At First %x6|At Last%x1|At Center%x3|At Cursor%x4|Collapse Edges%x2|Collapse Faces%x5"); else if (G.editMesh->selected.first && ((EditSelection*)G.editMesh->selected.first)->type == EDITVERT) - event = pupmenu("Merge %t|At First %x6|At Center%x3|At Cursor%x4"); + event = pupmenu("Merge %t|At First %x6|At Center%x3|At Cursor%x4|Collapse Edges%x2|Collapse Faces%x5"); else if (G.editMesh->selected.last && ((EditSelection*)G.editMesh->selected.last)->type == EDITVERT) - event = pupmenu("Merge %t|At Last %x1|At Center%x3|At Cursor%x4"); - else event = pupmenu("Merge %t|At Center%x3|At Cursor%x4"); - - else if(G.scene->selectmode == SCE_SELECT_EDGE) - event = pupmenu("Merge %t|Collapse Edges%x2|At Center%x3|At Cursor%x4"); - - else if(G.scene->selectmode == SCE_SELECT_FACE) - event = pupmenu("Merge %t|Collapse Faces%x5|At Center%x3|At Cursor%x4"); - else event = pupmenu("Merge %t|At Center%x3|At Cursor%x4"); + event = pupmenu("Merge %t|At Last %x1|At Center%x3|At Cursor%x4|Collapse Edges%x2|Collapse Faces%x5"); + else event = pupmenu("Merge %t|At Center%x3|At Cursor%x4|Collapse Edges%x2|Collapse Faces%x5"); + else event = pupmenu("Merge %t|At Center%x3|At Cursor%x4|Collapse Edges%x2|Collapse Faces%x5"); switch (event) { case -1: diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index 848026c4764..84738bfbb0f 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -1438,7 +1438,7 @@ static void edgering_select(EditEdge *startedge, int select){ } } -static void loop_multiselect(int looptype) +void loop_multiselect(int looptype) { EditEdge *eed; EditEdge **edarray; diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 7728d318026..7ca4b4b1a55 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -871,6 +871,22 @@ void do_view3d_select_meshmenu(void *arg, int event) select_linked_flat_faces(); break; + case 16: /* path select */ + pathselect(); + BIF_undo_push("Path Select"); + break; + case 17: /* edge loop select */ + loop_multiselect(0); + break; + case 18: /* edge ring select */ + loop_multiselect(1); + break; + case 19: /* loop to region */ + loop_to_region(); + break; + case 20: /* region to loop */ + region_to_loop(); + break; } allqueue(REDRAWVIEW3D, 0); } @@ -930,7 +946,13 @@ static uiBlock *view3d_select_meshmenu(void *arg_unused) menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Linked Vertices|Ctrl L", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, ""); - + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Path Select|W Alt 7", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Edge Loop Select|Ctrl E 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 17, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Edge Ring Select|Ctrl E 7", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 18, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Loop to Region|Ctrl E 8", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 19, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Region to Loop|Ctrl E 9", 0, yco-=20, menuwidth, 20, NULL, 0.0, 0.0, 1, 20, ""); + if(curarea->headertype==HEADERTOP) { uiBlockSetDirection(block, UI_DOWN); } @@ -2253,6 +2275,10 @@ void do_view3d_edit_mesh_edgesmenu(void *arg, int event) case 13: /* Edge Loop Delete */ EdgeLoopDelete(); break; + case 14: /*Collapse Edges*/ + collapseEdges(0); + BIF_undo_push("Collapse Edges"); + break; } allqueue(REDRAWVIEW3D, 0); } @@ -2295,7 +2321,7 @@ static uiBlock *view3d_edit_mesh_edgesmenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Slide Edge |Ctrl E", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Edge Loop|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, ""); - + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Collapse Edges", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 14, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 60); return block; @@ -2332,6 +2358,10 @@ void do_view3d_edit_mesh_facesmenu(void *arg, int event) mesh_set_smooth_faces(0); break; + case 8: /*Collapse Faces*/ + collapseFaces(0); + BIF_undo_push("Collapse Faces"); + break; } allqueue(REDRAWVIEW3D, 0); } @@ -2347,6 +2377,7 @@ static uiBlock *view3d_edit_mesh_facesmenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Edge/Face|F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Fill|Shift F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Beautify Fill|Alt F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Collapse Faces|Alt M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index dc57e325d13..c0700de8ad2 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -863,6 +863,11 @@ static TBitem tb_mesh_select[]= { { 0, "Less|Ctrl NumPad -", 8, NULL}, { 0, "SEPR", 0, NULL}, { 0, "Linked Vertices|Ctrl L", 4, NULL}, +{ 0, "Path Select|W Alt 7", 16, NULL}, +{ 0, "Edge Loop Select|Ctrl E 6", 17, NULL}, +{ 0, "Edge Ring Select|Ctrl E 7", 18, NULL}, +{ 0, "Loop to Region|Ctrl E 8", 19, NULL}, +{ 0, "Region to Loop|Ctrl E 9", 20, NULL}, { -1, "", 0, do_view3d_select_meshmenu}}; @@ -934,6 +939,7 @@ static TBitem tb_mesh_edit_vertex[]= { static TBitem tb_mesh_edit_edge[]= { { 0, "Make Edge/Face|F", 5, NULL}, +{ 0, "Collapse Edges|Alt M", 14, NULL}, { 0, "SEPR", 0, NULL}, { 0, "Bevel|W, Alt 2", 6, NULL}, { 0, "Loop Subdivide|Ctrl R", 4, NULL}, @@ -959,6 +965,7 @@ static TBitem tb_mesh_edit_face[]= { { 0, "Make Edge/Face|F", 5, NULL}, { 0, "Fill|Shift F", 0, NULL}, { 0, "Beautify Fill|Alt F", 1, NULL}, +{ 0, "Collapse Faces|Alt M", 8, NULL}, { 0, "SEPR", 0, NULL}, { 0, "Convert to Triangles|Ctrl T", 2, NULL}, { 0, "Convert to Quads|Alt J", 3, NULL}, |