Mesh Separate
Split part of a mesh into its own object
- BPY_OBJ
- BPY_OBJ
Three different ways to break one mesh into several objects, bundled into one node. It wraps Blender's real bpy.ops.mesh.separate operator, part of Avatar Graph, the pack that runs actual Blender inside ComfyUI's process (via the bpy Python package) to build interactive 2D-to-3D avatars, auto-generating a node for every mesh operator Blender has.
How it works
Pick a mode and it splits geometry off the current mesh into a new object:
SELECTED- whatever's currently selected becomes a new, separate object; everything else stays in the original.MATERIAL- the mesh gets split into one object per material slot.LOOSE- every disconnected, "loose" part of the mesh (pieces with no shared geometry connecting them) becomes its own object.
That last one is the most likely to matter here: a mesh auto-generated from a segmented image layer can easily end up as several visually distinct but technically connected regions baked into one object - say, both eyes on a single mesh - and LOOSE is the clean way to split them apart for independent rigging.
Inputs and output
BPY_OBJ- the mesh coming in.type-SELECTED,MATERIAL, orLOOSE, as above.
Worth being honest about the output here: real Blender's Separate can produce multiple new objects at once - one per material, or one per loose island. This node's output is a single, non-list BPY_OBJ, so treat it as a passthrough reference for chaining rather than something that individually exposes every split-off piece at this point in the graph.
Installing it
ComfyUI Manager: search "avatar-graph-comfyui", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/avatechai/avatar-graph-comfyui, then cd avatar-graph-comfyui && python -m pip install -r requirements.txt, then restart.
Python 3.10.x is the requirement to nail down first - the bpy package this pack is built on needs that exact minor version, and the README recommends a dedicated conda environment on macOS/Linux (conda create --name comfyui python=3.10) rather than trusting an existing Python install. Windows users get a prebuilt ComfyUI + Python 3.10 zip linked in the README to unzip over their install before adding the pack via Manager. Restart with --enable-cors-header (macOS also wants --force-fp16) for the live 3D preview - without it, the graph still runs fine, you just save the model manually from the pack's Avatar Main Output node instead.
Common issues
Rule out the Python version first if this pack's nodes aren't loading. On this node specifically: SELECTED with nothing actually selected is a silent no-op, not an error - double-check a real selection is landing on this node before assuming it's broken. LOOSE behaves the same way on a mesh that's fully connected end to end (one continuous surface with no genuinely disjoint parts) - there's nothing "loose" to split, so nothing happens. And because the output here is a single passthrough object rather than a list, if your downstream graph is expecting to individually address every piece Separate just created, you'll want to re-select or re-query the mesh after this step rather than assuming the node itself hands you each new object.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| typeopt | COMBO | 3 options: SELECTED, MATERIAL, LOOSE |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |