Nodes/Avatar Graph/Object Shape Key Move
ComfyUI Node

Object Shape Key Move

Keep your blendshape stack in order

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

Shape keys on a mesh aren't a bag - they're an ordered list, and the order is part of the rig. Stacked keys combine top-down, so a key sitting above another key's deformation applies on top of it. Object Shape Key Move wraps bpy.ops.object.shape_key_move and repositions the active shape key in that list.

Why you'd bother: retiming or combining facial keys often demands a specific order. If your "mouth open" key needs to apply before "cheek puff" so the puff deforms the already-open mouth, you reorder. It's also how you clean up after automated rigging, which tends to append keys in whatever order the generator felt like.

How it works

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

The inputs that matter

  • BPY_OBJ - the mesh whose key stack you're reordering.
  • type - an enum with four choices:
    • TOP - jump the active key to the very top of the stack (applies first... or last, depending on how you read the stack).
    • UP - nudge it up one slot.
    • DOWN - nudge it down one slot.
    • BOTTOM - jump it to the bottom (right above Basis).

The enum is the entire control surface - no index, no name. It always acts on whatever key is currently active.

Output is one BPY_OBJ, unchanged.

Install

Standard Avatar Graph install - one repo for the whole pack. 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; conda env per the README) and the first launch downloads the ~2.5 GB SAM checkpoint plus MediaPipe landmarkers.

Common issues

The recurring theme of the shape-key family: it operates on the active key, not a named one. If you've got twelve keys and a previous node left the wrong one active, your reorder hits the wrong key. Track which key is active through the graph or you'll be chasing phantom ordering bugs.

And honestly - for most avatar work you won't touch this. Blink and mouth keys rarely fight over order. You reach for it when keys start layering wrong (a key that should bend after another key keeps being overridden) or when you're merging rigs and the incoming key order is chaos. The shared-scene persistence note applies too: reorders stick around across queue runs.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
typeoptCOMBO4 options: TOP, UP, DOWN, BOTTOM

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ