Object Lineart Clear
Clearing one object's line art
- BPY_OBJ
- BPY_OBJ
Object_LineartClear wraps Blender's bpy.ops.object.lineart_clear - the undo button for baked line art strokes on a single object. It's the inverse of Object_LineartBakeStrokesAll: instead of turning a Line Art modifier into grease pencil strokes, it deletes the strokes that were baked onto the active object, so you can re-bake after changing your mesh or your modifier settings.
It's a small node, and that's fine. Avatar Graph ships around a hundred of these Object_* wrappers, each one just a thin pipe from the ComfyUI graph into a headless Blender 3.6 instance via the bpy pip package. The node takes an optional BPY_OBJ, clears the line art on it, and returns the same object so your chain keeps flowing. No parameters, no secrets.
Why you'd actually use it
You're iterating on an outlined character. You bake strokes, then tweak the underlying mesh or the Line Art modifier's settings, and suddenly your outlines are stale. Instead of rebuilding the whole pipeline, drop a LineartClear in front of the re-bake. That's the workflow rhythm this pack is built around: everything is a re-runnable graph, so "clear then re-bake" becomes a repeatable subgraph instead of a manual Blender step.
Inputs and output
BPY_OBJ(optional) - the object to clear. Leave it unwired and the operator acts on whatever's active in the shared Blender scene.- Output:
BPY_OBJ, the same object, so you can wire it straight into the bake node.
One note on scope: this clears one object's baked line art. If you baked with LineartBakeStrokesAll and want everything wiped, use Object_LineartClearAll instead - clearing per-object when you have a dozen layers gets tedious fast.
Installation
The pack needs Python 3.10.x (that's the only Python version bpy==3.6.0 ships for), then:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt
Easier still: search "Avatar Graph" in ComfyUI Manager. First start downloads the SAM model (~2.4 GB) and mediapipe landmarkers automatically, so give it a minute. If nothing happens on this node, it's almost always because there were no baked strokes to clear - a no-op, not a bug.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |