Mesh Knife Project
Cutting a traced outline straight into your mesh
- BPY_OBJ
- BPY_OBJ
Worth understanding before you reach for it: Blender's Knife Project normally takes whatever shape you have selected in the viewport - usually a curve, or another mesh's outline - and projects it through the current view onto a target mesh, cutting new edges wherever that silhouette lands. It's how you cut a precise, artwork-matching shape (an eye outline, a mouth boundary) into a surface instead of hand-placing edges to approximate it.
How it works
This wraps Blender's mesh.knife_project operator. In interactive Blender, it uses whatever's currently selected as the "cutter" and the active 3D viewport's current camera angle to decide how that shape projects onto the target. That view-dependence is the detail that matters here: the node schema only exposes a BPY_OBJ and a cut_through flag - there's no explicit second input for the cutter shape and no camera/view parameter. How the pack's headless bpy context supplies a cutter object and a projection view for a scripted call isn't something the schema itself makes clear, and it's not demonstrated in any of the pack's own workflow templates. If you're reaching for this node, treat it as one of the pack's more experimental low-level wrappers rather than a reliably documented step - the interactive version of Knife Project is well understood in Blender itself; this headless node version is less so.
The inputs and outputs that matter
BPY_OBJ(optional) - the target mesh to cut into.cut_through(defaultfalse) - whether the projected cut goes all the way through the mesh (both the near and far sides) or only cuts the surface visible from the projection angle. Off cuts just the near side, matching what you'd get from a normal, non-X-ray Knife Project in Blender.
Output is a single BPY_OBJ.
How to install it
ComfyUI Manager: search "Avatar Graph" and install. 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 - a 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
Nothing gets cut, or the result doesn't match what you expected. Given the view- and selection-dependent nature of the underlying Blender operator, this is the node in the pack most likely to behave unpredictably in a headless graph. If a cut you can achieve interactively in Blender isn't reproducing through this node, it's worth trying a more deterministic alternative for the same goal - Mesh Loopcut for a straight cut across a ring of quads, or Mesh Bisect elsewhere in the pack's node set for a cut along a defined plane - rather than fighting a tool built around live mouse and camera input.
A bpy import failure at ComfyUI startup is the pack's Python-version pin, not this node - confirm a clean Python 3.10.x environment with requirements.txt installed without errors.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| cut_throughopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |