Object Shaderfx Move To Index
Park an effect exactly where you want it
- BPY_OBJ
- BPY_OBJ
The Move Up and Move Down shader FX nodes are fine for nudging an effect one slot at a time. This one is for when you want to slam an effect into a precise position in the stack and be done with it. Object Shaderfx Move To Index wraps bpy.ops.object.shaderfx_move_to_index and moves a named Grease Pencil shader effect to an explicit stack position.
It's the same family as the other Shaderfx nodes in the pack, but with one extra input that makes it dramatically more useful in an automated workflow: index. Rather than a relative nudge, you get absolute placement.
How it works
Auto-generated wrapper, like the whole Object_* family in Avatar Graph. The pack reads Blender's operator list, mints a node per bpy.ops.object.* entry, and at runtime sets your incoming BPY_OBJ as the active object before calling the operator. Output is the same object passed back through, so you can keep wiring the graph.
The inputs that matter
BPY_OBJ- the object whose effect stack you're reordering.shaderfx- the name of the effect to move, case-sensitive, must already be on the object.index- an integer, default 0. Stack position in Blender is zero-based, so 0 is the top of the list, first in the draw order. If you want your Outline at the very top, that'sindex: 0; Glow just under it,index: 1.
Output is one BPY_OBJ, unchanged.
Install
Standard Avatar Graph install - one repo, every node shares 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
Remember the pack pins bpy==3.6.0, so Python 3.10 is effectively required (the README's conda suggestion is the painless path), and the first launch downloads the ~2.5 GB SAM checkpoint plus MediaPipe landmarkers before it's done loading.
Common issues
The usual suspects: a shaderfx name that doesn't match an effect on the object (silent no-op), and an index beyond the current stack length, which Blender just clamps. The zero-based thing trips people up - an effect moved to index 0 isn't "the first below the top," it is the top. And since these nodes mutate the shared embedded Blender scene, the stack state you see on a second queue run includes everything the first run did. Reordering is meant to be a setup step, not something you do per-frame - put the stack in order once, then let the Shape Flow runtime animate the actual values.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| shaderfxopt | STRING | — | |
| indexopt | INT | 00–2147483647 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |