Nodes/Avatar Graph/Object Collection Unlink
ComfyUI Node

Object Collection Unlink

Pull an object back out of a Collection

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Collection Unlink
  • BPY_OBJ
  • BPY_OBJ

The undo to Object Collection Link - a direct wrap of bpy.ops.object.collection_unlink(). It removes an object from a Collection it belongs to. Notice there's no collection field on this node the way there is on Link: it operates on the active Collection context, not an explicitly chosen one, so where the object actually gets removed from depends on whatever Collection is "current" at the point this node runs in the graph - the same as it would if you ran the operator from Blender's own outliner.

Where it fits in Avatar Graph

Avatar Graph (avatechai/avatar-graph-comfyui) rigs a flat character image into a real-time interactive avatar - segmentation, mesh layers, a "Shape Flow" runtime graph, exported through Avatar Main Output. The README documents a small set of nodes for that pipeline; this one isn't among them. It's part of the much larger family the pack generates by exposing most of Blender's Object operators directly as nodes - scene-organization plumbing for anyone scripting a more elaborate Blender setup around their rig, not something the core rigging tutorial touches.

How it works

Since Collections are just organizational membership (an object can belong to several at once, independent of parenting or geometry), unlinking doesn't delete or hide the object - it simply removes it from that one Collection's membership list. If the object isn't in any other Collection afterward, it effectively falls out of the scene's outliner structure entirely, though it still exists as a datablock in the file.

Inputs and outputs

  • BPY_OBJ (optional) - the object to unlink. Unwired, it falls back to Blender's currently active object.

Output: BPY_OBJ - the same object, passed through, matching every other node in this family.

How to install it

Via ComfyUI Manager: search "avatar-graph-comfyui", install, restart. Manual clone:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt

bpy needs Python 3.10.x specifically - the requirement that actually causes install failures. Windows users get a prebuilt Python 3.10 ComfyUI zip from the README; on Mac/Linux, build a dedicated conda env (conda create --name comfyui python=3.10). Restart with --enable-cors-header if you want the live avatar preview panel talking to editor.avatech.ai - plain exports work without it.

Common issues & troubleshooting

Most install pain traces back to Python version - a 3.11/3.12 environment, the default on most current ComfyUI installs, can't load bpy. There's also a real report of Avatar Graph leaving a ComfyUI Desktop install badly broken after install (an oversized UI logo, a stray audio-permission popup) severe enough that a full reinstall didn't fully clear it - test in a spare, portable ComfyUI instance first if you're not already on a dedicated 3.10 setup.

For this node specifically: because it has no explicit collection input, "which Collection did it actually unlink from" is determined by context rather than something you set directly on the node - if the object disappears from a Collection you didn't intend to touch, that's the mechanism to check first, not a bug in the node.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ