Nodes/Avatar Graph/Transform Bend
ComfyUI Node

Transform Bend

Bending mesh into smile shapes and curly props — the shape-key maker

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Transform Bend
  • 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 Bend is the node you reach for when a character's face needs to actually deform. It wraps Blender's bpy.ops.transform.bend, which bends the selected vertices of a mesh around a pivot axis - exactly the kind of operation you use to build morph targets by hand. In Avatar Graph's world, that means creating the shape keys an avatar later animates: a neutral mouth bending up into a smile, a brow arching, a stray mesh layer curling into a prop.

It's a small, sharp tool. Blender veterans will recognize it as the bend from the transform toolbar; newcomers just need to know it moves vertices, not objects - the whole mesh bends around a center, and if you want a gentle curve you pair it with proportional editing so the bend tapers off smoothly instead of being a hard fold.

How it works

This is an EditOps node: the wrapper deselects everything, sets your BPY_OBJ active, enters edit mode, runs the operator, exits back to object mode, and returns the same BPY_OBJ. The value input is the bend angle in radians - a B_VECTOR1, so a single float does the job. Push it positive and the mesh bows one way; negative bends the other.

The controls that make it usable headlessly are the proportional-editing ones, and they matter more here than on any other transform node:

  • use_proportional_edit - turn this on so vertices farther from the pivot bend less.
  • proportional_edit_falloff - SMOOTH, SPHERE, ROOT, INVERSE_SQUARE, SHARP, LINEAR, CONSTANT, RANDOM. SMOOTH is the friendly default; SHARP gives a tighter curve.
  • proportional_size - how far the falloff reaches. This is the dial you'll tune.
  • center_override - a B_VECTOR3 that lets you move the bend pivot off the object center. Essential for bending just one corner of a mouth instead of the whole thing.

There's also mirror (handy for symmetric features like brows) and the usual release_confirm / use_accurate booleans that you can safely ignore.

Inputs that matter

The short list: BPY_OBJ (what to bend), value (angle in radians), center_override (where to bend from), and the proportional trio if you want a soft curve.

Output: BPY_OBJ - the modified mesh, ready for the next node in your chain.

Installing it

Ships in 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-wide gotchas: bpy==3.6.0 needs Python 3.10.x (a 3.11+ env fails to install the pack), and the first launch downloads the SAM ViT-H checkpoint (~2.5 GB) to ComfyUI/models/sams plus two MediaPipe landmarker files - slow first boot is normal.

Common issues

  • "No module named bpy" → Python version mismatch; the pack pins 3.10.x.
  • Bend looks like a harsh fold, not a curve → you left proportional editing off. Enable use_proportional_edit and bump proportional_size.
  • It bends the wrong part of the mesh → set center_override, or make sure the vertices you intend are actually the selected ones - the wrapper operates on the object's current selection.
  • Nothing persists between runs - the pack resets the shared Blender scene per execution, so your bend and the shape key it feeds have to live in one graph.

If you're making the smile and frown shape keys that drive Avatar Graph's lipsync, this is one of the few transform nodes you'll genuinely use. Learn center_override and you'll bend with intent, not luck.

Categoryblender

Inputs (13)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptB_VECTOR1
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