Historical · current compatibility unverified Original context: PME version not stated; Blender version not stated; 2017.
Question
How can a PME button switch Edit Mode to vertex selection when the required Python command is not known?
Answer
The community answer used PME’s Operator Searcher rather than guessing the complete command:
- Search for Select Mode in the Operator Searcher.
- Add the result to the item.
- Set its Type property to Vertices.
- Apply and save the item.
The equivalent command shown in the forum answer began with:
bpy.ops.mesh.select_mode()PME’s generated operator controls were then used to choose the vertex variant instead of hand-writing its arguments.
Why it works
An operator name alone often does not describe the final action. The same operator can expose an enum or other properties for vertex, edge, and face modes. Finding the operator first, then configuring its properties, avoids searching for three unrelated commands.
The button still depends on Blender context: mesh selection mode is meaningful in Mesh Edit Mode. A menu intended for several modes should hide or disable the item outside that context.
Search by the UI action’s label before writing Python from memory. The operator and its properties together describe the action, so one operator can provide related variants such as vertex, edge, and face selection.