Nodes/Avatar Graph/Object Shape Key Clear
ComfyUI Node

Object Shape Key Clear

The reset button for a deformed pose

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Shape Key Clear
  • BPY_OBJ
  • BPY_OBJ

Messy shape keys are the #1 way an Avatar Graph rig ends up with a permanently deformed face - you tweak a key, forget to reset it, and now the mesh ships with a half-open mouth baked in. Object Shape Key Clear wraps bpy.ops.object.shape_key_clear and zeroes out the active shape key's value, returning the mesh to its rest pose.

It's the reset button for whatever shape key is currently active. If your rig's mouth is stuck partially open because a mouth-open key is sitting at 0.4, this is the node that snaps it back to neutral.

How it works

Auto-generated wrapper, standard for the pack: your incoming BPY_OBJ becomes the active object, the operator runs, and the same object passes back out for continued wiring. No extra parameters - it clears the active key, full stop.

The inputs that matter

Just BPY_OBJ. That's it. No key name, no value, no "which key" selector. The node operates on whatever shape key is active on the object at that point in the graph - which means order matters in your workflow. If you have several keys, the "active" one is whatever the previous nodes left active, so sequence your graph so the right key is active before this node runs.

Output is one BPY_OBJ, unchanged.

Install

Shared with the whole pack - one install covers it. 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

The pack pins bpy==3.6.0 (Python 3.10 effectively required; the README suggests a conda env) and the first launch downloads the ~2.5 GB SAM checkpoint plus MediaPipe landmarkers.

Common issues

The subtle trap here is that "clear" doesn't delete the key - it just sets its value to zero. People reach for this expecting ShapeKeyRemove, get a reset instead, and then "deleted" keys are still listed. If you want the key gone, that's Object ShapeKeyRemove. If you want the mesh back to neutral but keep the key for later animation, this is the one.

And remember the shared-scene gotcha that hits every node in this pack: clearing is a persistent mutation of the one embedded Blender scene. Run it once and the key stays cleared on the next run too, unless another node drives it again. For avatar builds that's usually what you want - it's the difference between "the face is back to rest" and "the face is permanently 40% mouth-open."

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ