diff options
author | Matt Ebb <matt@mke3.net> | 2006-06-19 07:31:30 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2006-06-19 07:31:30 +0400 |
commit | 92522f420214d0db9a4b69833917685e093f4d59 (patch) | |
tree | df271a978f53c85ccc572d7dcec1f98673939353 /source | |
parent | b2dd3db414352ef309bbb4326b1412a69d9c4d0a (diff) |
* Added and tweaked some missing menu items
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/include/BIF_editgroup.h | 2 | ||||
-rw-r--r-- | source/blender/src/editgroup.c | 17 | ||||
-rw-r--r-- | source/blender/src/editobject.c | 4 | ||||
-rw-r--r-- | source/blender/src/header_buttonswin.c | 13 | ||||
-rw-r--r-- | source/blender/src/header_view3d.c | 47 | ||||
-rw-r--r-- | source/blender/src/toolbox.c | 7 |
6 files changed, 77 insertions, 13 deletions
diff --git a/source/blender/include/BIF_editgroup.h b/source/blender/include/BIF_editgroup.h index 63399be30d8..21665e47e85 100644 --- a/source/blender/include/BIF_editgroup.h +++ b/source/blender/include/BIF_editgroup.h @@ -36,4 +36,4 @@ struct Base; void add_selected_to_group(struct Group *group); void rem_selected_from_group(void); void group_operation_with_menu(void); - +void group_operation(int mode);
\ No newline at end of file diff --git a/source/blender/src/editgroup.c b/source/blender/src/editgroup.c index 4b699b719ab..f26eaa0f4e3 100644 --- a/source/blender/src/editgroup.c +++ b/source/blender/src/editgroup.c @@ -110,9 +110,21 @@ void group_operation_with_menu(void) break; if(group) - mode= pupmenu("Groups %t|Add to existing Group %x3|Add to New Group %x1|Remove from all Groups %x2"); + mode= pupmenu("Groups %t|Add to Existing Group %x3|Add to New Group %x1|Remove from All Groups %x2"); else - mode= pupmenu("Groups %t|Add to New Group %x1|Remove from all Groups %x2"); + mode= pupmenu("Groups %t|Add to New Group %x1|Remove from All Groups %x2"); + + group_operation(mode); +} + +void group_operation(int mode) +{ + Group *group= NULL; + + /* are there existing groups? */ + for(group= G.main->group.first; group; group= group->id.next) + if(group->id.lib==NULL) + break; if(mode>0) { if(group==NULL || mode==1) group= add_group(); @@ -136,4 +148,3 @@ void group_operation_with_menu(void) else if(mode==2) rem_selected_from_group(); } } - diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 44d2447c354..f6bb8eac466 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -2087,7 +2087,7 @@ void special_editmenu(void) } else if(G.obedit->type==OB_MESH) { - nr= pupmenu("Specials%t|Subdivide%x1|Subdivide Multi%x2|Subdivide Multi Fractal%x3|Subdivide Smooth%x12|Merge%x4|Remove Doubles%x5|Hide%x6|Reveal%x7|Select Swap%x8|Flip Normals %x9|Smooth %x10|Bevel %x11|Set Smooth %x14|Set Solid %x15|Blend From Shape%x16|Propagate To All Shapes%x17| Path Select%x18"); + nr= pupmenu("Specials%t|Subdivide%x1|Subdivide Multi%x2|Subdivide Multi Fractal%x3|Subdivide Smooth%x12|Merge%x4|Remove Doubles%x5|Hide%x6|Reveal%x7|Select Swap%x8|Flip Normals %x9|Smooth %x10|Bevel %x11|Set Smooth %x14|Set Solid %x15|Blend From Shape%x16|Propagate To All Shapes%x17|Select Vertex Path%x18"); switch(nr) { case 1: @@ -2163,7 +2163,7 @@ void special_editmenu(void) break; case 18: pathselect(); - BIF_undo_push("Path Select"); + BIF_undo_push("Select Vertex Path"); break; } diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c index a525a088c73..0d9f05672f0 100644 --- a/source/blender/src/header_buttonswin.c +++ b/source/blender/src/header_buttonswin.c @@ -483,7 +483,15 @@ static uiBlock *buts_view_alignmenu(void *arg_unused) static void do_buts_viewmenu(void *arg, int event) { + SpaceButs *sbuts= curarea->spacedata.first; + switch(event) { + case 1: /* zoom in */ + view2d_zoom(&sbuts->v2d, 0.06f, curarea->winx, curarea->winy); + break; + case 2: /* zoom out */ + view2d_zoom(&sbuts->v2d, -0.075f, curarea->winx, curarea->winy); + break; case 3: /* View All */ do_buts_buttons(B_BUTSHOME); break; @@ -547,6 +555,11 @@ static uiBlock *buts_viewmenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom In|NumPad +", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Out|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); if (!curarea->full) diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index de87b587e35..72a82bd3e81 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -89,6 +89,7 @@ #include "BIF_editconstraint.h" #include "BIF_editdeform.h" #include "BIF_editfont.h" +#include "BIF_editgroup.h" #include "BIF_editmesh.h" #include "BIF_editmode_undo.h" #include "BIF_editview.h" @@ -487,6 +488,9 @@ static void do_view3d_viewmenu(void *arg, int event) case 17: /* Set Clipping Border */ view3d_edit_clipping(v3d); break; + case 18: /* render preview */ + toggle_blockhandler(curarea, VIEW3D_HANDLER_PREVIEW, 0); + break; } allqueue(REDRAWVIEW3D, 1); } @@ -500,6 +504,7 @@ static uiBlock *view3d_viewmenu(void *arg_unused) block= uiNewBlock(&curarea->uiblocks, "view3d_viewmenu", UI_EMBOSSP, UI_HELV, curarea->headwin); uiBlockSetButmFunc(block, do_view3d_viewmenu, NULL); + uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Render Preview...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 18, ""); uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "View Properties...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 16, ""); uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Background Image...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 15, ""); @@ -952,10 +957,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, "Vertex Path|W Alt 7", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Edge Loop|Ctrl E 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 17, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Edge Ring|Ctrl E 7", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 18, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, + menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); - 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, ""); @@ -1588,7 +1596,8 @@ static uiBlock *view3d_transformmenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Shrink/Fatten Along Normals|Alt S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, ""); } uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "To Sphere|Ctrl Shift S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Shear|Ctrl Shift Alt S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); + if (G.obedit) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Shear|Ctrl S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); + else uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Shear|Ctrl Shift Alt S", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Warp|Shift W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Push/Pull|Shift P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, ""); @@ -1952,6 +1961,35 @@ static uiBlock *view3d_edit_object_parentmenu(void *arg_unused) return block; } +static void do_view3d_edit_object_groupmenu(void *arg, int event) +{ + switch(event) { + case 1: + case 2: + case 3: + group_operation(event); + break; + } + allqueue(REDRAWVIEW3D, 0); +} + +static uiBlock *view3d_edit_object_groupmenu(void *arg_unused) +{ + uiBlock *block; + short yco = 20, menuwidth = 120; + + block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_groupmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin); + uiBlockSetButmFunc(block, do_view3d_edit_object_groupmenu, NULL); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add to Existing Group|Ctrl G, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add to New Group|Ctrl G, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Remove from All Groups|Ctrl G, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + + uiBlockSetDirection(block, UI_RIGHT); + uiTextBoundsBlock(block, 60); + return block; +} + static void do_view3d_edit_object_trackmenu(void *arg, int event) { switch(event) { @@ -2120,6 +2158,7 @@ static uiBlock *view3d_edit_objectmenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBlockBut(block, view3d_edit_object_parentmenu, NULL, ICON_RIGHTARROW_THIN, "Parent", 0, yco-=20, 120, 19, ""); + uiDefIconTextBlockBut(block, view3d_edit_object_groupmenu, NULL, ICON_RIGHTARROW_THIN, "Group", 0, yco-=20, 120, 19, ""); uiDefIconTextBlockBut(block, view3d_edit_object_trackmenu, NULL, ICON_RIGHTARROW_THIN, "Track", 0, yco-=20, 120, 19, ""); uiDefIconTextBlockBut(block, view3d_edit_object_constraintsmenu, NULL, ICON_RIGHTARROW_THIN, "Constraints", 0, yco-=20, 120, 19, ""); diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index 9a3036f866b..a690b20cf5c 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -864,9 +864,10 @@ 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, "Vertex Path|W Alt 7", 16, NULL}, +{ 0, "Edge Loop|Ctrl E 6", 17, NULL}, +{ 0, "Edge Ring|Ctrl E 7", 18, NULL}, +{ 0, "SEPR", 0, 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}}; |