Mesh Select Linked Pick
Blender's click-to-select-connected-geometry, scripted
- BPY_OBJ
- delimit
- BPY_OBJ
In Blender, hovering over a mesh and hitting L selects every vertex connected to whatever's under your cursor - the whole island, not just what you clicked. Mesh Select Linked Pick is that exact operator (bpy.ops.mesh.select_linked_pick) wired into a ComfyUI graph, with the "where's the cursor" part replaced by explicit indices so it works without a mouse.
How it works
Meshes generated or joined programmatically - which is most of what Avatar Graph does, building character parts from segmented image layers - often end up as several disconnected islands sharing one mesh datablock: an eye, a mouth, a body outline, all separate "linked" pieces. This node grabs one whole connected piece at a time instead of forcing you to hand-pick vertices, which is exactly the kind of thing you want before running an operation (a subdivide, a normals fix) on just the mouth and not the whole face.
The inputs and outputs that matter
index- the vertex/edge/face index to start the selection from, replacing the mouse position an interactive click would normally supply.object_index- which object to pick from, for graphs juggling multiple linked objects at once (-1is the default "just use the active one").deselect- instead of selecting the linked island, deselects it. Handy for subtracting one piece from an existing selection rather than building one from scratch.delimit- a set of boundary types (things like material, seam, or sharp-edge boundaries) that stop the selection from spreading past them, so "linked" doesn't accidentally mean "the entire mesh" when everything happens to be topologically connected.
Output is the same BPY_OBJ, now carrying the new selection state for whatever operator runs next.
How to install it
ComfyUI Manager: search "Avatar Graph" and install. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, cd avatar-graph-comfyui && pip install -r requirements.txt, then restart. The pack pins to Python 3.10.x because bpy only publishes wheels for that version - a newer Python and the install either fails outright or the blender-category nodes (this one included) never register. macOS/Linux: dedicated conda env at 3.10. Windows: Avatech's prebuilt Python-3.10 ComfyUI zip, pack installed via Manager afterward.
Common issues & troubleshooting
The delimit field looks unhelpful in the UI. Unlike the mode dropdowns on other nodes in this pack, delimit is a raw enum set with no choices listed in the node's schema - you may need to know Blender's exact boundary-type strings (SEAM, MATERIAL, NORMAL, SHARP, UV) rather than picking from a friendly list. Leaving it empty just means nothing stops the flood-fill selection at internal boundaries.
Selection spreads further than expected. If your mesh pieces are actually welded together at a seam (leftover from a mesh-join step that ran Remove Doubles a little too aggressively), "linked" geometry can include more than you think. Check for unwanted merges upstream before assuming this node picked wrong.
Nothing gets selected. index defaults to -1, which in Blender's own convention usually means "no explicit index provided" - if downstream logic expects a real starting index and never sets one, you'll select nothing. This node also, like the rest of the pack's Blender operators, needs a BPY_OBJ with actual mesh data already in Edit Mode context upstream; run it after a mesh-building step, not standalone.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| deselectopt | BOOLEAN | false | — |
| delimitopt | B_ENUM_SET | — | |
| object_indexopt | INT | -1-1–2147483647 | — |
| indexopt | INT | -1-1–2147483647 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |