Nodes/Avatar Graph/Object Shape Key Remove
ComfyUI Node

Object Shape Key Remove

Actually delete the key, not just zero it

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Shape Key Remove
  • BPY_OBJ
  • BPY_OBJ
allfalse
apply_mixfalse

There's a real difference between "reset a shape key" and "get rid of a shape key." Object Shape Key Clear resets the value to zero and keeps the key; Object Shape Key Remove wraps bpy.ops.object.shape_key_remove and deletes it from the mesh for good. If a key is doing nothing but adding noise to your rig - say a broken experimental mouth shape from an earlier attempt - this is the node that makes it disappear.

It's the cleanup tool for the shape-key pipeline. Automated rigging and image-based mesh generation tend to leave orphan keys behind, and a face rig with twelve dead keys is a face rig you can't debug.

How it works

Auto-generated wrapper, standard for the pack. Your incoming BPY_OBJ becomes the active object, the operator removes the key, and the object passes back out for continued wiring.

The inputs that matter

  • BPY_OBJ - the mesh to clean.
  • all - boolean, default false. false removes only the active shape key. true removes every shape key on the object - a scorched-earth option for starting the shape-key stack from scratch.
  • apply_mix - boolean, default false. When on, the current deformed shape gets baked into the basis before removal, so deleting the keys doesn't snap the mesh back to rest - it keeps whatever pose the mix produced. Useful when you want to "flatten" a sculpted look into the mesh and drop the keys.

Output is one BPY_OBJ, unchanged.

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

The pack pins bpy==3.6.0, so Python 3.10 is effectively required, and first launch downloads the ~2.5 GB SAM checkpoint plus MediaPipe landmarkers before the pack finishes loading.

Common issues

The beginner trap is deleting more than intended: all is a boolean that defaults off, but one mistaken toggle wipes the entire key stack, and since these nodes mutate the shared embedded Blender scene, that's persistent - no undo across queue runs. If you blow away your face rig, you re-run the earlier build nodes.

Also watch apply_mix. It's genuinely handy for baking a pose, but leaving it on while deleting a driven key freezes whatever the animation value happened to be into the basis, which then fights the Shape Flow runtime. Use apply_mix only when you specifically want the current shape locked into the mesh. Otherwise delete with it off and keep your basis clean.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
alloptBOOLEANfalse
apply_mixoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ