Mesh Select Mode
Switch between vertex, edge, and face selection
- BPY_OBJ
- BPY_OBJ
Every other Mesh_Select* node in this pack - Select Similar, Select Nth, Select Mirror, all of it - operates on something: vertices, edges, or faces. This is the node that decides which. It wraps Blender's real bpy.ops.mesh.select_mode operator, part of Avatar Graph, the pack that runs actual Blender inside ComfyUI's process (via the bpy Python package) to build interactive 2D-to-3D avatars, auto-generating a node for every mesh operator Blender has.
How it works
Blender's Edit Mode always has an active selection mode - you're either working with vertices, edges, or faces at any given moment, and it changes which element type gets highlighted, selected, and acted on by everything downstream. This node sets that mode explicitly instead of relying on whatever state the mesh happened to be left in. If you've ever wondered why a chain of select nodes in this pack behaves oddly - selecting faces when you expected edges, say - the missing piece is almost always that nothing upstream ever pinned the mode.
Inputs and outputs
BPY_OBJ- the mesh coming in.type-VERT,EDGE, orFACE. This is the field you actually set; it's the mode everything downstream will operate in.use_extend/use_expand(both defaultfalse) - advanced controls for combining multiple modes at once rather than switching cleanly to one (Blender supports having, say, both vertex and edge select modes active simultaneously). Leave both off unless you specifically need that layered behavior.action-DISABLE,ENABLE, orTOGGLE(Blender's default). Governs whether the mode you specified intypegets forced on, forced off, or flipped from its current state, which mostly matters in combination withuse_extend/use_expand. If you just want "switch cleanly to this mode," you can mostly ignore this and let it default.
Output is a single BPY_OBJ - the same object, now in the selection mode you specified.
Installing it
ComfyUI Manager: search "avatar-graph-comfyui", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, then cd avatar-graph-comfyui && python -m pip install -r requirements.txt, then restart.
Python 3.10.x is non-negotiable - bpy doesn't publish wheels for anything newer, so a standard current-gen ComfyUI environment (3.11/3.12) will fail this install outright. Use a dedicated conda env on macOS/Linux, or the README's prebuilt Python 3.10 ComfyUI zip on Windows. This is a heavier install overall, dragging in segment-anything, mediapipe, and OpenCV alongside bpy - a fair chunk of dependency surface for one pack, and worth expecting some friction if your environment already has conflicting versions of any of those (a pattern the wider ComfyUI custom-node ecosystem is notorious for: no isolation between packages, so a version pinned by one node can silently break another). Restart with --enable-cors-header (macOS also --force-fp16) for the live avatar preview; skip it and the graph still runs, you just export manually from Avatar Main Output.
Common issues
If a Mesh_Select* node further down the chain seems to be selecting the wrong kind of element, or an operator throws a "poll() failed, context is incorrect" error, check whether a Select Mode node ran first and actually set what you assumed - several downstream nodes (Select Similar in particular, whose valid type choices depend on the active mode) will misbehave or error if the mesh is sitting in a mode you didn't expect. If nothing's loading at all, it's almost certainly the Python version, not this node.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| use_extendopt | BOOLEAN | false | — |
| use_expandopt | BOOLEAN | false | — |
| typeopt | COMBO | 3 options: VERT, EDGE, FACE | |
| actionopt | COMBO | 3 options: DISABLE, ENABLE, TOGGLE |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |