Mesh Blend From Shape
The actual mechanic behind mixing shape keys
- BPY_OBJ
- shape
- BPY_OBJ
This one sits closer to the actual point of Avatar Graph than most of its Mesh_* siblings. The pack's whole pitch is rigging shape-key-driven avatars - blink, lip-sync, expressions - and shape keys only become useful once you can combine them. Mesh Blend From Shape wraps Blender's real bpy.ops.mesh.blend_from_shape operator, and it's the core mechanic for mixing one shape key into another (or into the base mesh).
How it works
Give it the name of an existing shape key (shape) and it blends that shape's vertex offsets into your current mesh (or currently active shape key) by a factor (blend). At blend = 1, you get the full shape; fractional values give you a partial mix - this is exactly how you'd build, say, a half-open mouth from a "mouth closed" base and a "mouth open" shape key, or combine two independent expressions into a new blended one. add controls the blend mode: True adds the shape's offset on top of what's there, False blends toward the shape's absolute position instead of stacking.
The inputs and output that matter
BPY_OBJ(optional) - the mesh object, which needs to already have shape keys defined on it - this node blends between existing shapes, it doesn't create them.shape- the name of the shape key to blend in. This has to match a shape key that actually exists on the mesh; there's no dropdown validation happening at the ComfyUI level, Blender will just fail if it doesn't find a match.blend(default 1, range -1000 to 1000) - the mix factor. Values outside 0–1 are valid in Blender (you can overshoot or invert a shape) but 0–1 covers the intuitive "how much of this shape" range most people want.add(default true) - whether the blend adds on top of the current shape or moves toward the target shape's absolute values.
Output is the same BPY_OBJ, passed through for chaining.
How to install it
Via ComfyUI Manager: search "Avatar Graph" (avatar-graph-comfyui), install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt
The pack's hard blocker: bpy==3.6.0 is pinned in requirements.txt and only builds on Python 3.10.x. Windows users get a bundled Python 3.10 ComfyUI zip from the README; Mac/Linux users should build a dedicated conda environment (conda create --name comfyui python=3.10) rather than fighting an existing 3.11/3.12 setup. Expect a heavier install overall - segment-anything, mediapipe, and OpenCV all come along.
Common issues & troubleshooting
"Operator poll() failed" or the shape doesn't apply. The most likely cause specific to this node: shape doesn't match any shape key actually present on the mesh. Since there's no validation before it hits Blender, a typo or a shape key that was never created upstream will surface as an operator failure rather than a friendly "shape not found" message.
Result looks doubled or over-applied. Check add - if you expected an absolute blend toward the target shape and instead got the offset stacked on top of what was already there, you likely want add = False instead of the default True.
Blend doesn't look like a clean 0–100% mix. If blend is set outside the 0–1 range, you're intentionally overshooting or inverting Blender's normal blend behavior - that's not a bug, but it's easy to end up there by accident if you're dragging a slider without realizing the range extends to -1000/1000.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| shapeopt | B_ENUM | — | |
| blendopt | FLOAT | 1.00-1000–1000 | — |
| addopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |