Sign up ×
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It's 100% free, no registration required.

Is it possible to switch to vertex mode (and edge, face mode) via python. I know I can toggle between object mode and edit mode in python with


But how can I explicitly say I want to go in vertex mode?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

Look up the operator in the api documentation.

share|improve this answer

I prefer to not use operators, if they can be avoided. You may use:


Assign a tuple of 3 booleans to set Vertex, Edge, Face selection.

To activate vertex selection mode, use:

bpy.context.tool_settings.mesh_select_mode = (True, False, False)

For edge + face multi-selection mode, use:

bpy.context.tool_settings.mesh_select_mode = (False, True, True)


When working with the BMesh Module (bmesh), there's also


For edge selection, do:

bm.select_mode = {'EDGE'}

For vertex and face selection multi-mode, do:

bm.select_mode = {'VERT', 'EDGE', 'FACE'}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.