Nodes/Avatar Graph/UV Select Loop
ComfyUI Node

UV Select Loop

Pick a ring of UVs where avatar rigs actually flex

By avatechai·Created 3 years ago·Updated 2 years ago· 264
UV Select Loop
  • BPY_OBJ
  • location
  • BPY_OBJ
extendfalse

The rings are where the rigging happens. On an avatar face, the edge loops around the eye and the mouth are what actually deform for blinks and smiles, and in UV space those same loops are rings of connected UVs. UV Select Loop is the node that grabs one of those rings in a single step.

It's another member of the Avatar Graph pack's auto-generated UV family - Blender's bpy.ops.uv.select_loop() wrapped up as a ComfyUI node. The pack embeds Blender 3.6 through bpy and exposes its UV editor operators so you can do mesh housekeeping inside the graph while building a 2D-image-to-3D-avatar pipeline. This node doesn't unwrap anything and doesn't create geometry. Its whole job is selection: click at a point, get the loop.

How it works

Like every UV_* node here, it runs in Blender edit mode. The shared wrapper deselects objects, sets your mesh active, enters edit mode, fires the operator, exits, and hands the same mesh back. A "loop" in Blender terms is a ring of connected edges that flows across the mesh following the topology - a loop stops or branches at junctions where more than four edges meet, which is exactly why the eye sockets and lips (clean, quad-heavy topology) are so loop-friendly.

You get three relevant knobs:

  • BPY_OBJ - the mesh, in and out.
  • location (B_VECTOR2) - the point in UV space you're "clicking" to pick the loop. Like the other pick nodes, this normally comes from the mouse in Blender's UI; here it's data. The pack doesn't ship a 2D vector helper (only 3D and 4D), so most people leave it at default and let extend do the work.
  • extend (bool) - add the picked loop to the existing selection rather than replacing it.

Why you'd chain it

For a blink or lipsync rig you don't want to animate the whole face - you want the ring around the eye to be movable and everything outside to stay put. Selecting that ring (loop, then maybe UV Select More to fatten it) is the setup step before pinning it or assigning it to a vertex group that a shape key will drive. Chain a few loops together with extend and you've got the entire "mobile" region of the face selected in one pass.

Installing it

Same story for every node in the pack - Avatar Graph pins bpy==3.6.0, so your ComfyUI Python environment must be 3.10. Install from ComfyUI Manager by searching "Avatar Graph," or:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
python -m pip install -r requirements.txt

Then restart ComfyUI. First launch downloads the SAM ViT-H model (~2.5 GB) and mediapipe face/pose landmarkers, so give it a minute. Running ComfyUI with --enable-cors-header unlocks the live avatar preview in editor.avatech.ai; skip it and you can still export a .GLB by right-clicking Avatar Main Output.

Troubleshooting

The classic "it did nothing" here is bad topology: on a mesh full of triangles and poles (common on auto-generated character meshes), loops don't extend far before hitting a junction, so the node picks a disappointingly short loop. That's not a bug - that's Blender telling you the loop literally isn't there. The other usual suspect is the missing UV map; a plane-unwrapped layer usually has one, but confirm before assuming the node is broken.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
extendoptBOOLEANfalse
locationoptB_VECTOR2

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ