diff options
author | Ton Roosendaal <ton@blender.org> | 2004-10-01 11:51:12 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-10-01 11:51:12 +0400 |
commit | 19c2d34967fa64d5200e5ff381d198d12a3ba125 (patch) | |
tree | 4a91c8822c4add271f0a83572ac6cc10fcbd57f9 /source/blender/src/editmesh_mods.c | |
parent | 820a83dda835c172a59c1ee474dc7a1205f36151 (diff) |
- Improved memory system for pupmenu(), which now stores 255 entries max.
Meaning menus come back to previous selection almost always. Also fixed
annoying bug that caused Mirror menu (M in editmode) to start at 2nd item
- New hotkey (test :) CTRL+TAB in editmode gives (and shows!) current
selectmode. I prefer this over cycling, since the menu is informing you
what happens.
- To enforce pupmenus to start at specific item, use pupmenu_set_active()
- pupmenu_col() to be done
Diffstat (limited to 'source/blender/src/editmesh_mods.c')
-rw-r--r-- | source/blender/src/editmesh_mods.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index b2acd58d8a2..2d68fd3e503 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -1572,6 +1572,25 @@ void editmesh_deselect_by_material(int index) EM_selectmode_flush(); } +void EM_selectmode_menu(void) +{ + int val; + + if(G.scene->selectmode & SCE_SELECT_VERTEX) pupmenu_set_active(1); + else if(G.scene->selectmode & SCE_SELECT_EDGE) pupmenu_set_active(2); + else pupmenu_set_active(3); + + val= pupmenu("Select Mode%t|Vertices|Edges|Faces"); + if(val>0) { + if(val==1) G.scene->selectmode= SCE_SELECT_VERTEX; + else if(val==2) G.scene->selectmode= SCE_SELECT_EDGE; + else G.scene->selectmode= SCE_SELECT_FACE; + + EM_selectmode_set(); // when mode changes + allqueue(REDRAWVIEW3D, 0); + } +} + /* ************************* SEAMS AND EDGES **************** */ void editmesh_mark_seam(int clear) |