Mesh Faces Select Linked Flat
Growing a selection across a flat patch of mesh
- BPY_OBJ
- BPY_OBJ
If you've got one face selected on a mesh built from several coplanar triangles - a flat eye plane, a card-style mouth, anything Avatar Graph assembled from a segmented image - this node grows that single selection to cover the whole flat patch it belongs to. It's the "select the whole panel, not just the one triangle I clicked" move.
How it works
This wraps Blender's mesh.faces_select_linked_flat operator. Starting from whatever faces are already selected on the incoming mesh, it walks outward across connected faces and keeps adding them to the selection as long as each new face's angle relative to its neighbor stays under the sharpness threshold. Cross a hard enough angle - an actual corner, not just triangulation noise - and the growth stops there. It's selection by flatness, not by material, UV island, or loose-part boundary.
The inputs and outputs that matter
BPY_OBJ(optional) - the mesh, with at least one face already selected to grow from.sharpness- the angle threshold, in radians, though it's easier to think in degrees: the default (~0.0175 rad) is 1°, meaning only genuinely flat, nearly-coplanar faces count as "linked." The allowed range runs from about 0.01° up to 180°. Raise it if a mesh that's technically flat but slightly noisy (common on anything generated rather than hand-modeled) is stopping the selection early at a false edge; lower it if the selection is bleeding across a corner you wanted it to respect.
Output is the same BPY_OBJ, now carrying the expanded face selection, ready to hand off to something that acts on a selection - Mesh Faces Shade Flat, Mesh Delete, Mesh Inset, whatever the next step in your graph needs.
How to install it
Search avatar-graph-comfyui (listed as "Avatar Graph") in ComfyUI Manager, or install manually:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
then pip install -r requirements.txt and restart. The blocker to know about up front: the pack pins Blender's bpy package, which only builds on Python 3.10.x - a dedicated conda environment (conda create --name comfyui python=3.10) on macOS/Linux, or Avatech's prebuilt Python-3.10 ComfyUI zip on Windows, with the pack layered on afterward via Manager.
Common issues & troubleshooting
If nothing gets selected beyond the single face you started with, the most likely cause isn't sharpness - it's that nothing was selected coming in. This node only grows a selection; it doesn't create one from scratch the way an angle-based edge finder does. Make sure whatever runs before it actually leaves a face selected on the BPY_OBJ it hands off.
If the selection stops earlier than expected on a mesh you're sure is visually flat, raise sharpness a few degrees - meshes assembled from generated or segmented geometry rarely have perfectly identical face normals even when they read as flat to the eye, and the default 1° threshold is tight enough to catch that noise as a "corner."
A bpy import failure at ComfyUI startup is the pack's Python-version pin biting you, not this node specifically - check the console at launch and confirm a clean Python 3.10.x environment with requirements.txt installed without errors.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| sharpnessopt | FLOAT | 0.020.0001745329209370539–3.141592741012573 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |