Nodes/Avatar Graph/Mesh Vert Connect
ComfyUI Node

Mesh Vert Connect

Drawing your own edge across a face

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Vert Connect
  • BPY_OBJ
  • BPY_OBJ

If you've used Blender's viewport and hit J to connect two selected vertices with an edge, this node is that shortcut, exposed as a ComfyUI node. It's the manual, precise version of splitting a face - you pick exactly which two points get joined.

What it is and why you'd reach for it

Mesh_VertConnect wraps Blender's bpy.ops.mesh.vert_connect(). Avatar Graph runs actual Blender via the bpy package inside ComfyUI, and this node, like most of the Mesh_* family, is a thin passthrough to that operator: given two or more selected vertices that share a face, it draws an edge directly between them, splitting the face along that new edge.

You'd reach for this over the more automated Mesh_VertConnectConcave or Mesh_VertConnectNonplanar when you know exactly which cut you want - cleaning up an n-gon left over from an auto-generated mesh (from Create Mesh Layer) into two well-behaved quads or triangles, for instance, where an automated tool might pick a different diagonal than the one that actually looks right on your character's silhouette.

Inputs and outputs that matter

There's exactly one field:

  • BPY_OBJ (optional) - the mesh coming in, with the vertices you want connected already selected.

Output: a single BPY_OBJ, with the new edge (and the resulting split face) added.

This node is entirely dependent on selection - there's no vertex-index input here, so the only way to control what gets connected is which vertices are selected on the incoming mesh. If two or more vertices sharing a face aren't selected when this node runs, there's nothing for it to do.

Installing Avatar Graph

The pack depends on bpy, which only has wheels for Python 3.10.x - pin your ComfyUI environment to that before anything else.

ComfyUI Manager: search avatar-graph-comfyui, install, restart. Or by hand:

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

Restart with python main.py --enable-cors-header (--force-fp16 on Mac too). Windows gets a prebuilt Python 3.10 environment from the README; macOS/Linux is pointed at a dedicated conda create --name comfyui python=3.10.

Common issues

Nothing happens when you run it. By far the most common outcome, and it's almost always selection: fewer than two vertices selected, or the selected vertices don't share a face, means the operator has nothing valid to connect. Trace the selection state back through whatever node ran before this one.

Got a cut you didn't expect. If more than two vertices were selected on a face with multiple valid connection options, Blender's operator picks based on its own internal logic, not necessarily the diagonal you had in mind. Narrow the selection down to exactly the two vertices you want joined.

Nodes don't show up in ComfyUI. Check python --version reads 3.10.x - outside that range, bpy fails to import and the whole pack silently won't register.

No live preview. That needs --enable-cors-header on launch to bridge to the embedded editor.avatech.ai panel. Without it, the graph still runs fine; export the result via right-click → Save File on Avatar Main Output instead of watching it live.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ