Object Gpencil Modifier Add
Give your grease pencil strokes superpowers, one at a time
- BPY_OBJ
- BPY_OBJ
Object_GpencilModifierAdd slaps a modifier onto a grease pencil object - the pack's node for Blender's bpy.ops.object.gpencil_modifier_add. Where the base Object_GpencilAdd node gives you a blank drawing canvas, this node gives that canvas its behavior: an outline modifier that traces your avatar's mesh, a build modifier that draws strokes in over time, a noise modifier that makes them wobble like real hand drawing. If you're doing any grease-pencil work in the Avatar Graph pack, this is the node you'll spend the most time in.
The modifier menu, decoded
The single input that matters is type, and it's a 26-entry enum. Here's the landscape in plain terms:
GP_LINEART- the crowd favorite. Generates line art strokes from the edges of mesh geometry, which is how you get a cartoon outline around your avatar.GP_BUILD- draws strokes in progressively over time. The classic "sketch draws itself" effect.GP_ARRAY,GP_MIRROR,GP_SUBDIV- duplication, mirroring, and smoothing, mirroring their mesh-modifier cousins.GP_NOISE- adds jitter to strokes for a hand-drawn, imperfect feel.GP_OUTLINE- wraps strokes in a border, good for cel-style pop.GP_THICK,GP_LENGTH,GP_SMOOTH,GP_SIMPLIFY- thickness, length, and smoothing refinements.GP_TIME- time-based trimming of which parts of a stroke show.GP_HOOK,GP_ARMATURE,GP_LATTICE- deformation modifiers that bend strokes with bones or lattices.- The rest -
GP_TEXTURE,GP_DASH,GP_ENVELOPE,GP_WEIGHT_ANGLE,GP_WEIGHT_PROXIMITY,GP_MULTIPLY,GP_COLOR,GP_OPACITY,GP_TINT,SHRINKWRAP- are finer color/weight/effect tools.
How it works
Like every object-level node here, it's an auto-generated wrapper over the matching bpy.ops.object.gpencil_modifier_add operator. It makes your BPY_OBJ active, adds the chosen modifier, and passes the object back through. Two things to keep in mind. First, modifiers stack in order, and the stack order changes the result - an outline added after a noise modifier behaves differently than one added before. Second, each call adds one modifier, so to build a layered stack you chain multiple Object_GpencilModifierAdd nodes in sequence.
Inputs and outputs
BPY_OBJ(optional) - the grease pencil object to modify.type- which modifier to add (26 choices).
Output: BPY_OBJ, the same object, with the modifier appended to its stack. The node doesn't name the modifier for you - you'll typically pick a name later via the string-input modifier nodes like Object_GpencilModifierCopy or Object_GpencilModifierRemove, which address modifiers by name.
Install and gotchas
Standard pack install - ComfyUI Manager (search "Avatar Graph") or:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui.git
cd avatar-graph-comfyui && python -m pip install -r requirements.txt
Python 3.10 for bpy==3.6.0, ~2.5GB SAM checkpoint + mediapipe models on first load, scene resets each run, and --enable-cors-header for live preview.
The one thing people stumble on: modifiers need a grease pencil object to attach to, and they don't do much until that object has actual strokes. Object_GpencilAdd first, then strokes, then modifiers - that's the order.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| typeopt | COMBO | 26 options: GP_TEXTURE, GP_TIME, GP_WEIGHT_ANGLE, GP_WEIGHT_PROXIMITY, GP_ARRAY, GP_BUILD, +20 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |