Transform Bend
Bending mesh into smile shapes and curly props — the shape-key maker
- BPY_OBJ
- value
- center_override
- BPY_OBJ
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_VECTOR3that 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_editand bumpproportional_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.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| valueopt | B_VECTOR1 | — | |
| mirroropt | BOOLEAN | false | — |
| use_proportional_editopt | BOOLEAN | false | — |
| proportional_edit_falloffopt | COMBO | 8 options: SMOOTH, SPHERE, ROOT, INVERSE_SQUARE, SHARP, LINEAR, +2 | |
| proportional_sizeopt | FLOAT | 1.009.999999974752427e-7–999999995904 | — |
| use_proportional_connectedopt | BOOLEAN | false | — |
| use_proportional_projectedopt | BOOLEAN | false | — |
| snapopt | BOOLEAN | false | — |
| gpencil_strokesopt | BOOLEAN | false | — |
| center_overrideopt | B_VECTOR3 | — | |
| release_confirmopt | BOOLEAN | false | — |
| use_accurateopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |