UV Cursor Set
Parking the 2D cursor in UV space — the invisible pivot nobody sets
- BPY_OBJ
- location
- BPY_OBJ
UV Cursor Set moves the 2D cursor in the UV editor. It wraps bpy.ops.uv.cursor_set, which is exactly what it sounds like: put the little crosshair somewhere in UV space. That's the whole node - a BPY_OBJ in, a location (B_VECTOR2, two floats), the cursor moves, the object passes through.
Why would a ComfyUI node for "move an invisible cursor" exist? Because the UV cursor is a pivot, and pivot-using UV operations read it. When you use UV tools that rotate, scale, or snap around the cursor (the pack's UV wrap, stitch, or any tool whose pivot is set to "cursor"), where the cursor sits decides the result. In a headless graph you can't click to place it, so this node is how you tell the scene where the pivot should be before a cursor-relative UV operation runs. It's setup plumbing - invisible, unexciting, occasionally the only thing standing between you and a UV operation spinning around the wrong point.
How it works
A UV_* EditOps node: enter edit mode, run bpy.ops.uv.cursor_set with your location, exit, pass the object back. The single meaningful input is location, a B_VECTOR2 - the (U, V) coordinate, i.e., the x/y position in UV space where the cursor lands. There's no "use 3D cursor" or "snap" option exposed; this wrapper only sets an explicit position.
The honest take: on its own it does nothing visible, and most avatar workflows never touch it. Its value is entirely contextual - it matters the moment you chain it ahead of a UV operation that uses the cursor as its center. If you never run cursor-relative UV tools, you'll never miss it.
Inputs that matter
- BPY_OBJ - optional; the mesh whose UV space you're in.
- location - the
B_VECTOR2cursor position. This is the only real knob.
Output: BPY_OBJ - unchanged, passed through.
Installing it
Part of the Avatar Graph pack. ComfyUI Manager → search "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
Restart after. Pack gotchas: bpy==3.6.0 requires Python 3.10.x (a 3.11+ env breaks the pack's import), and first launch downloads the SAM ViT-H model (~2.5 GB) to ComfyUI/models/sams plus two MediaPipe landmarker files.
Common issues
- "No module named bpy" → Python 3.10.x. The pack's one repeated answer.
- "I set the cursor and nothing happened" → correct. The cursor has no visible output in the graph; its effect shows up in whatever cursor-relative UV operation you run next.
- A UV operation pivots around the wrong spot anyway → the operator it feeds may use a different pivot (like median or individual origins). The cursor only matters when the pivot is set to cursor - make sure the downstream tool is actually cursor-based.
- Scene resets between runs - set the cursor in the same graph run that uses it.
A one-purpose utility for a niche corner of a niche pack. File it under "know what it is," skip it until a UV rotation spins the wrong way, then remember this node exists.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| locationopt | B_VECTOR2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |