Object Shape Key Add
Where facial animation starts
- BPY_OBJ
- BPY_OBJ
This is the node your whole avatar's face lives on. Avatar Graph animates a still character by deforming its mesh with shape keys - the eye-blink, the mouth-open for lipsync, the subtle head tilt are all just different shape keys getting driven. Object Shape Key Add wraps bpy.ops.object.shape_key_add and is how you mint a new one.
If you've used Blender at all, this is the same button as "Add Shape Key" in the object data panel. The node version exists so the whole rig-building pipeline can run procedurally in the graph instead of you hand-editing an external .blend.
How it works
Auto-generated wrapper, standard for the pack. Your incoming BPY_OBJ becomes the active object, the operator runs, and the object passes back out unchanged for further wiring. The new shape key starts as a copy of the current shape - you then edit it (via the pack's mesh/shape-key editing nodes or by shaping it in Blender) into the open-mouth or closed-eye pose.
The inputs that matter
BPY_OBJ- the mesh getting a new shape key.from_mix- boolean, default true. This decides what the new key is created from.truemeans "copy the current mixed shape" - the current result of all keys combined.falsemeans "start from the basis (rest) pose." For a beginner building mouth shapes, leaving it true is usually right: it captures exactly what the mesh looks like right now, which is what you want to sculpt from.
Output is one BPY_OBJ, unchanged - but with a new shape key attached to its mesh data.
Install
Standard Avatar Graph install. ComfyUI Manager: search Avatar Graph, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
python -m pip install -r requirements.txt
Two setup realities: the pack pins bpy==3.6.0, so Python 3.10 is effectively mandatory (conda env recommended in the README), and the first launch downloads the ~2.5 GB SAM checkpoint plus MediaPipe landmarkers whether you need them or not.
Common issues
The one thing people hit: adding a shape key with from_mix off when they actually wanted the current pose, then wondering why the new key looks like the rest pose. And the reverse - from_mix true when the mesh is mid-animation captures that weird in-between state as your new key's base. Add keys when the shape is where you want it.
Also worth knowing: shape keys are added in sequence, and the pack's other shape-key nodes (Move, Remove, Transfer, Mirror) all assume you understand the order. Keep a mental model of Basis + your keys as a stack, because every shape-key node in this pack is manipulating that same stack, order included.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| from_mixopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |