Nodes/Avatar Graph/Object Set Show Only Shape Key
ComfyUI Node

Object Set Show Only Shape Key

Preview one shape key in isolation

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Set Show Only Shape Key
  • BPY_OBJ
  • BPY_OBJ
valuefalse

Shape keys drive everything in Avatar Graph - the blink, the mouth open, the smile are all shape keys on your mesh layers. Object Set Show Only Shape Key toggles show_only_shape_key, the Blender flag that makes the viewport show only the active shape key's deformation, ignoring the rest of the shape key stack. It's the debugging flag you turn on when a single shape key looks wrong and you want to see its raw contribution without other keys muddying it.

How it works

Standard auto-generated setter: setattr(object, "show_only_shape_key", value) on the embedded bpy instance, returning the same BPY_OBJ. The value input is a BOOLEAN with default false. Set true and the object's viewport display switches to the active shape key's target state alone - like soloing a track in a mixer.

In the Avatar Graph workflow this is a genuinely useful troubleshooting tool. If your "mouth open" key looks like it's dragging half the face along, flip this on and the viewport isolates exactly what that key does; the rest of the stack is ignored. It works hand-in-hand with active_shape_key_index (its own setter node) - that one picks which key is active, this one says "show only it." When you're done debugging, set it back to false so the full shape key blend displays again.

The inputs

  • BPY_OBJ - the mesh layer with shape keys, from Create Mesh Layer or a modified mesh.
  • value - boolean, default false.

Output: the same BPY_OBJ for chaining.

Install & gotchas

Part of the Avatar Graph pack:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt

Or ComfyUI Manager → "Avatar Graph". Pack-level requirement: bpy==3.6.0 needs Python 3.10 - no wheel for 3.11+, so the pack won't load on newer runtimes (conda python=3.10 per the README). First launch auto-downloads the ~2.5 GB SAM ViT-H model and mediapipe landmarker files.

The trap: this is viewport-only, and it's a debugging display, not a mode you ship with. Leave it true and you'll export avatars that look fine in the editor but lose the shape key blend when you think you're seeing the final mix - actually worse, you'll just confuse yourself. Also note the pack's Mesh Modify Shape Key and Create Shape Flow nodes are what actually build and drive shape keys; this setter only changes how they're displayed. Wire it downstream of creation, and remember the live preview needs --enable-cors-header.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ