# Mesh select mode pie menu

**URL:** <https://blenderartists.org/t/mesh-select-mode-pie-menu/624760>\
**Category:** Basics & Interface\
**Created:** [October 23, 2014, 10:44am UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760 "2014-10-23T10:44:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![olladitan](https://blenderartists.org/user_avatar/blenderartists.org/olladitan/32/14184_2.png) [@olladitan](https://blenderartists.org/u/olladitan)\
**Post date:** [October 23, 2014, 10:44am UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/1 "2014-10-23T10:44:57Z")

</div>

Hello. I was wondering if there was a way to make the mesh select mode menu in edit mode (ctrl+tab) a pie menu for blender 2.72? Thanks.

---

<div class="post-metadata">

**Author:** ![Stan\_Pancakes](https://blenderartists.org/user_avatar/blenderartists.org/stan_pancakes/32/22700_2.png) [@Stan\_Pancakes](https://blenderartists.org/u/Stan_Pancakes)\
**Post date:** [October 24, 2014, 10:35am UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/2 "2014-10-24T10:35:36Z")

</div>

Yes. Here’s how mine looks:

![](https://blenderartists.org/uploads/default/original/4X/a/3/5/a35f67aa3ce23462ebb2a51f41296cce38f951cc.png)

And here’s the code:

```auto

bl_info = {
    "name" : "Select Mode Pie Menu",
    "author" : "Stan Pancakes",
    "version" : (0, 1, 0),
    "blender" : (2, 72, 0),
    "description" : "Custom Pie Menus",
    "category" : "3D View",}

import bpy

class SelectModeCombined(bpy.types.Operator):
    bl_label = "Combined Select Mode"
    bl_idname = "edit.mesh_select_mode_combined"
    bl_options = {'INTERNAL'}    
    
    mode = bpy.props.BoolVectorProperty(size=3)
          
    def execute(self, context):
        context.tool_settings.mesh_select_mode[:] = self.mode
        return {'FINISHED'}

class MeshSelectMode(bpy.types.Menu):
    bl_label = "Select Mode"
    bl_idname = "edit.mesh_select_mode"
    
    def draw(self, context):
        layout = self.layout
        pie = layout.menu_pie()
        
        # left
        pie.operator("edit.mesh_select_mode_combined", text='Vertex', icon='VERTEXSEL').mode=(True, False, False)
        # right
        pie.operator("edit.mesh_select_mode_combined", text='Face', icon='FACESEL').mode=(False, False, True)
        # bottom
        pie.operator("edit.mesh_select_mode_combined", text='Vertex & Edge & Face', icon='UV_FACESEL').mode=(True, True, True)
        # top
        pie.operator("edit.mesh_select_mode_combined", text='Edge', icon='EDGESEL').mode=(False, True, False)
        # topleft
        pie.operator("edit.mesh_select_mode_combined", text='Vertex & Edge', icon='UV_EDGESEL').mode=(True, True, False)
        # topright
        pie.operator("edit.mesh_select_mode_combined", text='Edge & Face', icon='SPACE2').mode=(False, True, True)
        # bottomleft
        pie.prop(context.space_data, "use_occlude_geometry", text='Limit to Visible')
        # bottomright
        pie.operator("edit.mesh_select_mode_combined", text='Vertex & Face', icon='LOOPSEL').mode=(True, False, True)
        
def register():   
    bpy.utils.register_class(SelectModeCombined)   
    bpy.utils.register_class(MeshSelectMode)

def unregister():
    bpy.utils.unregister_class(MeshSelectMode)
    bpy.utils.unregister_class(SelectModeCombined)        

```

You can put it in some .py file in your addons directory, activate the addon in user preferences, and then just rebind the Ctrl+Tab key in Input -\> 3D View -\> Mesh like this:

![](https://blenderartists.org/uploads/default/original/4X/c/6/7/c67025bacb87596ad9311917c558fd9841463f34.png)

---

<div class="post-metadata">

**Author:** ![ericcjuan](https://blenderartists.org/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ericcjuan](https://blenderartists.org/u/ericcjuan)\
**Post date:** [August 25, 2019, 7:32pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/3 "2019-08-25T19:32:28Z")

</div>

could anyone rewrite this for 2.80  
or just hint what is 2.80 equivalent of:  
`pie.operator("edit.mesh_select_mode_combined", text='Vertex & Edge & Face', icon='UV_FACESEL').mode=(True, True, True)`

---

<div class="post-metadata">

**Author:** ![AFWS](https://blenderartists.org/user_avatar/blenderartists.org/afws/32/524395_2.png) [@AFWS](https://blenderartists.org/u/AFWS)\
**Post date:** [September 16, 2019, 11:36pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/4 "2019-09-16T23:36:09Z")

</div>

```auto

bl_info = {
    "name" : "Select Mode Pie Menu",
    "author" : "Stan Pancakes",
    "version" : (0, 1, 0),
    "blender" : (2, 80, 0),
    "description" : "Custom Pie Menus",
    "category" : "3D View",}

import bpy

class VIEW3D_OT_SelectModeCombined(bpy.types.Operator):
    bl_label = "Combined Select Mode"
    bl_idname = "edit.mesh_select_mode_combined"
    bl_options = {'INTERNAL'}    
    
    mode: bpy.props.BoolVectorProperty(size=3)
          
    def execute(self, context):
        context.tool_settings.mesh_select_mode[:] = self.mode
        return {'FINISHED'}

class VIEW3D_MT_MeshSelectMode(bpy.types.Menu):
    bl_label = "Select Mode"
    bl_idname = "VIEW3D_MT_MeshSelectMode"
    
    def draw(self, context):
        layout = self.layout
        pie = layout.menu_pie()

        shad = context.space_data.shading
             
        # left
        pie.operator("edit.mesh_select_mode_combined", text='Vertex', icon='VERTEXSEL').mode=(True, False, False)
        # right
        pie.operator("edit.mesh_select_mode_combined", text='Face', icon='FACESEL').mode=(False, False, True)
        # bottom
        pie.operator("edit.mesh_select_mode_combined", text='Vertex & Edge & Face', icon='UV_FACESEL').mode=(True, True, True)
        # top
        pie.operator("edit.mesh_select_mode_combined", text='Edge', icon='EDGESEL').mode=(False, True, False)
        # topleft
        pie.operator("edit.mesh_select_mode_combined", text='Vertex & Edge', icon='UV_EDGESEL').mode=(True, True, False)
        # topright
        pie.operator("edit.mesh_select_mode_combined", text='Edge & Face', icon='KEYFRAME_HLT').mode=(False, True, True)
        # bottomleft
        pie.prop(shad, "show_xray", text='Limit to Visible', icon='XRAY')
        # bottomright
        pie.operator("edit.mesh_select_mode_combined", text='Vertex & Face', icon='SELECT_SUBTRACT').mode=(True, False, True)     

classes = (
    VIEW3D_MT_MeshSelectMode,
    VIEW3D_OT_SelectModeCombined, 
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls) 

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)

if __name__ == " __main__":
    register()

```

---

<div class="post-metadata">

**Author:** ![horusscope](https://blenderartists.org/user_avatar/blenderartists.org/horusscope/32/598009_2.png) [@horusscope](https://blenderartists.org/u/horusscope)\
**Post date:** [September 16, 2019, 11:42pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/5 "2019-09-16T23:42:57Z")

</div>

uhmmm  
hold shift  
and press 1 2 3  
not even kidding

---

<div class="post-metadata">

**Author:** ![ericcjuan](https://blenderartists.org/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ericcjuan](https://blenderartists.org/u/ericcjuan)\
**Post date:** [October 2, 2019, 12:12pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/6 "2019-10-02T12:12:20Z")

</div>

great thanks for help  
thou I could not assign shortcut to the script so, actually I can’t get it to work  
I tried to set it up like I did in 2.79

2.79

 ![279](https://blenderartists.org/uploads/default/original/4X/f/6/7/f67d18d298d52424b7061e4aa8a18de3113e4360.png)

2.80

 ![280](https://blenderartists.org/uploads/default/original/4X/6/8/6/686824d43dea177b046a0c392f7d0680411d848e.png)

any advise?

---

<div class="post-metadata">

**Author:** ![ericcjuan](https://blenderartists.org/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ericcjuan](https://blenderartists.org/u/ericcjuan)\
**Post date:** [October 2, 2019, 12:19pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/7 "2019-10-02T12:19:35Z")

</div>

yes, I know I can do that but:

- I find it quicker to use pie menu (especially when you use them as quick gestures)
- it also gives you toggle for limit to visible (can’t live without it, well I can but don’t want to)
- frees up keys for more custom shortcuts (and god knows you need lots of them to work proficiently in blender, and there is alway one more you would like to add)

---

<div class="post-metadata">

**Author:** ![AFWS](https://blenderartists.org/user_avatar/blenderartists.org/afws/32/524395_2.png) [@AFWS](https://blenderartists.org/u/AFWS)\
**Post date:** [October 2, 2019, 1:20pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/8 "2019-10-02T13:20:27Z")

</div>

use `VIEW3D_MT_MeshSelectMode`

---

<div class="post-metadata">

**Author:** ![ericcjuan](https://blenderartists.org/letter_avatar_proxy/v4/letter/e/e56c9b/32.png) [@ericcjuan](https://blenderartists.org/u/ericcjuan)\
**Post date:** [October 2, 2019, 4:21pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/9 "2019-10-02T16:21:28Z")

</div>

thx, now it works  
thx again

---

<div class="post-metadata">

**Author:** ![Meta-Androcto](https://blenderartists.org/user_avatar/blenderartists.org/meta-androcto/32/3989_2.png) [@Meta-Androcto](https://blenderartists.org/u/Meta-Androcto)\
**Post date:** [October 21, 2019, 10:01am UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/10 "2019-10-21T10:01:29Z")

</div>

hi, this menu is built into the 3d viewport pie menus that comes with blender.

---

<div class="post-metadata">

**Author:** ![apprenti90](https://blenderartists.org/user_avatar/blenderartists.org/apprenti90/32/579700_2.png) [@apprenti90](https://blenderartists.org/u/apprenti90)\
**Post date:** [November 28, 2019, 7:12pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/11 "2019-11-28T19:12:16Z")

</div>

> [@AFWS](#):
>
> VIEW3D\_MT\_MeshSelectMode

Hello!  
I an coming late on this one…  
I used this addon and it works just fine, thanks a lot!  
But I wanted to know if there was a way to expend this script (or make another one) to allow the pie menu to work also in the UV Editor, to switch between Vert / UVs, Edges, and faces.

Thanks in advance if anyone is still following this 🙂

---

<div class="post-metadata">

**Author:** ![sonic\_maelstrom](https://blenderartists.org/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@sonic\_maelstrom](https://blenderartists.org/u/sonic_maelstrom)\
**Post date:** [May 15, 2021, 9:33pm UTC](https://blenderartists.org/t/mesh-select-mode-pie-menu/624760/12 "2021-05-15T21:33:35Z")

</div>

I am trying to implement this but I am still a newbie, can you please explain where that line should be used in the code? Thank you for your help, much appreciated.
