Nodes/Avatar Graph/Transform Trackball
ComfyUI Node

Transform Trackball

Rotate the Whole Head in 3D

By avatechai·Created 3 years ago·Updated 2 years ago· 266
Transform Trackball
  • BPY_OBJ
  • value
  • center_override
  • BPY_OBJ
◄mirrorfalse►
◄use_proportional_editfalse►
◄proportional_edit_falloff▾►
◄proportional_size1.00►
◄use_proportional_connectedfalse►
◄use_proportional_projectedfalse►
◄snapfalse►
◄gpencil_strokesfalse►
◄release_confirmfalse►
◄use_accuratefalse►

Transform Trackball is the avatar equivalent of grabbing an object and spinning it in your hand. It wraps Blender's transform.trackball - the "virtual trackball" rotation that turns a 2D drag into a free 3D rotation around the mesh's center. In the Avatar Graph pipeline it's the node you reach for when a mesh layer is facing the wrong way, or when you want the head tilted back slightly, or when a part needs to sit at an angle before you bake it into the character.

How it works

The node takes a BPY_OBJ, enters edit mode, and calls bpy.ops.transform.trackball(value=...), where value is a B_VECTOR2 - the two-component drag that the trackball math converts into a rotation. It rotates around the mesh's bounds center (or center_override if you feed one). Because it's a rotation about a center, not an axis-by-axis affair, it's the most natural way to tumble a head mesh into a new pose.

Inputs worth touching:

  • value - the 2D trackball drag. This is the one you'll actually tune; think of it as "drag direction and distance."
  • center_override - a 3-value vector. Move the rotation pivot off the geometric center, e.g., to rotate around the neck line instead of mid-skull.
  • use_proportional_edit + proportional_size - use a small falloff radius and the rotation becomes a gentle bend rather than a rigid spin.

The rest - mirror, snap, falloff curve, release_confirm, use_accurate - is operator plumbing you can leave alone. Output is BPY_OBJ, so you chain it straight into the next transform or into Join Meshes.

A warning about rotation and textures

Avatar meshes are image-textured planes from Create Mesh Layer. Rotating a flat plane 90° around its side will make the texture effectively vanish (you're looking at the plane edge-on). That's not a bug - that's geometry. Trackball shines on parts with actual volume (a sphere-morphed head, an extruded piece); for flat layers, prefer the per-node orient_type on Transform Translate or just rebuild the layer at the right angle. Also remember: whole mesh, no selection socket. Rotate the head layer, not the joined character.

Installing

Trackball ships with the Avatar Graph pack (avatechai/avatar-graph-comfyui), pinned to bpy==3.6.0 and therefore Python 3.10:

conda create --name comfyui python=3.10
conda activate comfyui

Install via 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 with python main.py --enable-cors-header for the live preview. No per-node downloads - the only pack model download is SAM for the segmentation stage.

Categoryblender

Inputs (13)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ—
valueoptB_VECTOR2—
mirroroptBOOLEANfalse—
use_proportional_editoptBOOLEANfalse—
proportional_edit_falloffoptCOMBO8 options: SMOOTH, SPHERE, ROOT, INVERSE_SQUARE, SHARP, LINEAR, +2
proportional_sizeoptFLOAT1.009.999999974752427e-7–999999995904—
use_proportional_connectedoptBOOLEANfalse—
use_proportional_projectedoptBOOLEANfalse—
snapoptBOOLEANfalse—
gpencil_strokesoptBOOLEANfalse—
center_overrideoptB_VECTOR3—
release_confirmoptBOOLEANfalse—
use_accurateoptBOOLEANfalse—

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ—