Object Shaderfx Copy
The clone button for Grease Pencil effects
- BPY_OBJ
- BPY_OBJ
If you've poked around an Avatar Graph workflow you've seen the wall of Object_* nodes and wondered what they do. This one is a Blender operator with a fancy hat: it wraps bpy.ops.object.shaderfx_copy, the same thing as hitting the copy button in a Grease Pencil object's effect stack.
Shader effects (shader FX) are the post-processing stack that lives on Grease Pencil objects in Blender - Outline, Glow, Blur, Pixelate, Rim, Shadow, Wave, that family. You build a nice cartoon outline on one character layer and you want the identical effect on the other layers without re-adding and re-tuning each one. That's this node: duplicate an existing effect onto the object.
How it works
Every Object_* node in this pack is auto-generated. The pack reads Blender's operator list and mints a node per bpy.ops.object.* entry, then registers them all under the blender category. At runtime it sets your incoming BPY_OBJ as the active object in the embedded headless Blender, calls the operator, and hands the same object back out. That last part is the whole trick: the output is a pass-through, so you can keep chaining mesh operations downstream.
The inputs that matter
BPY_OBJ- the Blender object you're operating on, straight from an earlier node in the graph (Create Mesh Layer, Join Meshes, whatever produced the object).shaderfx- a string. This is the name of the effect you want to copy. It has to match an effect that already exists on the object, case-sensitively. No name means no copy.
Output is a single BPY_OBJ, same object you fed in, ready to wire onward.
Install
This is a shared install across the whole Avatar Graph pack - every Object_* node lives in the same repo. Easiest path is ComfyUI Manager: search for 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
Two gotchas before you rage-quit. First, the pack pins bpy==3.6.0, and bpy wheels basically only exist for Python 3.10 - if your ComfyUI runs 3.11 or 3.12 the Blender half of the pack won't import. The README recommends a python=3.10 conda env. Second, on first startup the pack downloads the SAM ViT-H checkpoint (~2.5 GB) into models/sams/ plus MediaPipe face/pose landmarkers, whether you use them or not. Watch the console; it's not hung, it's downloading.
Common issues
The classic failure is silent: shaderfx points at an effect that isn't on the object, and the copy just doesn't happen (Blender logs a warning to the console). If the object isn't a Grease Pencil object with a shader FX stack at all, there's nothing to copy. So check the name first, then check the object type.
One thing worth knowing about this whole pack: the Blender scene is a single shared in-memory instance, and these nodes mutate it in place. Run the same queue twice and state carries over. These are build-once rig operations - set up your effects, then let the Shape Flow runtime drive the animation.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| shaderfxopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |