UV Align Rotation
Rotating UV islands straight so textures stop sitting at an angle
- BPY_OBJ
- BPY_OBJ
UV Align Rotation rotates UV islands so they sit square to the texture. It wraps bpy.ops.uv.align_rotation, Blender's tool for rotating each selected island so its edges line up with a chosen axis instead of hanging at whatever angle the unwrap left them. In an avatar pipeline where textures are character art that has to read correctly - eyes level, mouth horizontal, features not skewed - a rotated island is the difference between a face that looks straight and one that looks vaguely canted.
It's a cleanup node with real payoff. Cube projection and smart unwraps don't care about your aesthetic; they tile faces onto the texture with zero regard for which way is "up" in the character art. This node fixes that in one pass, which is why it pairs naturally with UV_CubeProject - project, then rotate islands straight, then the texture reads the way you drew it.
How it works
A UV_* EditOps node: enter edit mode, run the operator on the current UV selection, exit, return the object. Two inputs matter:
- method - how Blender decides what to rotate against:
- AUTO - pick the best alignment automatically. The usual choice.
- EDGE - align islands to a specific edge you've selected.
- GEOMETRY - align based on the underlying 3D geometry's orientation.
- axis - X, Y, or Z, the reference axis to rotate islands to. With AUTO method you mostly won't touch this.
The combination that actually works headlessly: method = AUTO, let Blender figure out the dominant edge of each island, and rotate them all to the same reference. The EDGE and GEOMETRY methods are more manual and expect a specific selection state, which is fiddly in a graph where you can't click on an island.
Output: BPY_OBJ - the mesh, islands rotated, for the next node.
Inputs that matter
BPY_OBJ, method (AUTO is your friend), axis when you need a specific reference.
Installing it
Part of the Avatar Graph pack (Avatech AI). 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 needs Python 3.10.x or the whole pack fails to 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. Standard for this pack.
- Islands didn't rotate → no UV selection, or the method you chose needs specific selection state you can't easily create in a graph. Stick with AUTO.
- Texture still looks angled after running → align_rotation straightens to a dominant axis but doesn't guarantee "the character's face is upright." You may need a manual
UV_Alignor a full re-unwrap after. - Scene resets between runs - project, rotate, and export in a single graph pass.
If you're converting generated character art into mesh layers, this is the node that keeps your features level. Small, one-shot, and quietly essential.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| methodopt | COMBO | 3 options: AUTO, EDGE, GEOMETRY | |
| axisopt | COMBO | 3 options: X, Y, Z |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |