Mesh Knife Tool
Blender's interactive cutting tool exposed as a node in Avatar Graph
- BPY_OBJ
- BPY_OBJ
This is the oddest node in Avatar Graph's Blender set, and worth understanding before you try to use it: Mesh Knife Tool wraps Blender's Knife tool - the one you normally drive live with the mouse, clicking through faces to cut new edges into a mesh interactively. Every parameter exposed here configures how that interactive session behaves, not what it cuts, because the cut path itself is normally something a human traces in the viewport in real time.
How it works
Blender's mesh.knife_tool operator is a modal tool - it takes over input while running, waiting for click-by-click mouse events that define the cut. That's fundamentally different from most of this pack's nodes, which are one-shot operators that run to completion and hand back a result. Exposing this in a headless, node-graph context is genuinely unusual, and how it resolves without a live mouse feeding it points is not something the schema itself makes clear. If you're reaching for this node, know going in that it's exposing settings for an interactive tool the pack's own workflow templates don't demonstrate using - treat it as experimental rather than a reliable step in an automated pipeline.
The inputs and outputs that matter
BPY_OBJ- the mesh to cut into.use_occlude_geometry(defaulttrue) - whether the knife respects hidden/occluded geometry (won't cut through to the far side of the mesh) or ignores occlusion.only_selected(defaultfalse) - restricts cutting to already-selected geometry rather than the whole mesh.xray(defaulttrue) - see-through mode, letting the cut register on geometry behind what's facing you.visible_measurements-NONE,BOTH,DISTANCE, orANGLE; controls the on-screen HUD showing cut length/angle during an interactive session.angle_snapping-NONE,SCREEN, orRELATIVE; snapping behavior for cut angles.angle_snapping_increment(default ~30°, in radians) - the snap increment when angle snapping is active.wait_for_input(defaulttrue) - whether the operator waits for interactive input before proceeding, which is the setting most likely to matter for whether this behaves usefully at all in a non-interactive graph.
Output is a single BPY_OBJ.
How to install it
ComfyUI Manager, search "Avatar Graph" and install, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
then pip install -r requirements.txt and restart. Needs Blender's bpy module, pinned to Python 3.10.x - dedicated conda environment on macOS/Linux, or Avatech's prebuilt Python-3.10 ComfyUI zip on Windows with the pack installed through Manager afterward.
Common issues & troubleshooting
If a run using this node hangs or times out rather than completing, wait_for_input defaulting to true is the first thing to try changing - a modal operator waiting on mouse input that never arrives in a headless execution context is a plausible explanation for a stall, though this pack's README doesn't document scripted, headless use of the knife tool specifically, so treat this as an educated starting point for debugging rather than a confirmed fix. If you need a deterministic cut in an automated pipeline, an operator built for scripted use - Mesh Fill Holes, Mesh Dissolve Faces, or bisecting with a defined plane elsewhere in Blender's toolset - is the more reliable choice than trying to script the interactive knife.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| use_occlude_geometryopt | BOOLEAN | true | — |
| only_selectedopt | BOOLEAN | false | — |
| xrayopt | BOOLEAN | true | — |
| visible_measurementsopt | COMBO | 4 options: NONE, BOTH, DISTANCE, ANGLE | |
| angle_snappingopt | COMBO | 3 options: NONE, SCREEN, RELATIVE | |
| angle_snapping_incrementopt | FLOAT | 0.520–3.141592741012573 | — |
| wait_for_inputopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |