Nodes/Avatar Graph/Mesh Select Less
ComfyUI Node

Mesh Select Less

Shrink your selection by one ring

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Select Less
  • BPY_OBJ
  • BPY_OBJ
use_face_steptrue

The counterpart to growing a selection outward one ring at a time is shrinking it back in, and that's exactly what this node does - it's Blender's real bpy.ops.mesh.select_less operator, exposed as a ComfyUI node. It's 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. On its own it's a small utility, but it's genuinely useful anywhere you need a selection that's a controlled ring or two smaller than what you started with - softening the edge of a hard selection, or backing off from a boundary by a fixed, repeatable amount instead of eyeballing it.

How it works

It takes the current selection and contracts its boundary inward by one step: anything sitting right at the edge of the selection gets deselected, leaving a slightly smaller region than before. Run it multiple times in a row (chain several of these nodes) to shrink the selection further, one ring per node.

Inputs and outputs

  • BPY_OBJ - the mesh coming in, with a selection already established upstream.
  • use_face_step (default true) - controls whether the shrink is measured in face-connectivity steps or a stricter vertex/edge-based one. Leave it on unless you're working with a specific edge case where face-based stepping isn't giving you the boundary you expect - the default matches how most people mentally model "shrink the selection."

Output is a single BPY_OBJ - the same object, with a smaller selection than it came in with.

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 the requirement to nail down first - the bpy package this pack is built on needs that exact minor version, and the README recommends a dedicated conda environment on macOS/Linux (conda create --name comfyui python=3.10) rather than trusting an existing Python install. Windows users get a prebuilt ComfyUI + Python 3.10 zip linked in the README to unzip over their install before adding the pack via Manager. Restart with --enable-cors-header (macOS also wants --force-fp16) for the live 3D preview - without it, the graph still runs fine, you just save the model manually from the pack's Avatar Main Output node instead.

Common issues

Rule out the Python version first if this pack's nodes aren't loading - anything other than 3.10.x leaves bpy without a working build. On this node, the thing that surprises people most is that a selection can shrink to nothing: run it too many times, or on an already-small selection, and you'll end up with an empty selection rather than an error - which then quietly breaks whatever operation you chain after it, since there's nothing left to act on. If your downstream node is behaving as though nothing's selected, count how many Select Less nodes are stacked up before it and check whether you've shrunk past zero. As with every mesh node in this pack, feeding it something other than a real mesh BPY_OBJ from earlier in the same graph surfaces as a Blender-side error.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
use_face_stepoptBOOLEANtrue

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ