Nodes/Avatar Graph/Object Collection Add
ComfyUI Node

Object Collection Add

Dropping a Blender object into its own collection

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

Part of Avatar Graph, avatech.ai's node pack for rigging flat character art into an interactive avatar without leaving ComfyUI. This one's small and organizational: it's a wrapper around Blender's collection-add operator, which takes an object and puts it into a brand-new collection of its own.

What a "collection" is doing in a ComfyUI graph

Collections are Blender's grouping mechanism - think of them as folders for objects in a scene, used for organization, visibility toggling, and letting export/tooling code address "everything in this group" instead of individual objects one at a time. In a graph-built avatar rig, where you're assembling a mesh out of many segmented parts (an eye mesh, a mouth mesh, a body mesh) purely through node connections, there's no Blender outliner to drag objects into folders by hand. This node is that missing step, done programmatically: run it on an object and Blender creates a fresh collection containing just that object. It's the kind of plumbing node you reach for when later steps - export, or the pack's own tooling - need objects addressable by collection rather than by scanning the whole scene.

Inputs and outputs

One optional input, BPY_OBJ, and the same type back out. No parameters to set - the object goes in, comes back out now belonging to its own new collection. BPY_OBJ is this pack's custom socket type carrying a live Blender object reference, the same pattern used across nearly all of Avatar Graph's blender-category nodes, so this chains cleanly with the mesh and object nodes elsewhere in the pack.

Installing it

Through ComfyUI Manager, search avatar-graph-comfyui. By hand:

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

The thing that actually decides whether this install goes smoothly is your Python version, not the pack's own dependencies. Every node here runs on bpy - Blender shipped as a pip package - and bpy will only install against Python 3.10.x. If your ComfyUI is already running a newer Python (very likely on a fresh setup), this pack simply won't install into it cleanly. The README's answer is a dedicated environment: a prebuilt Python 3.10 ComfyUI zip on Windows, or conda create --name comfyui python=3.10 on Mac/Linux before you touch pip. Once it's in, restart with --enable-cors-header if you want the live avatar preview panel talking to editor.avatech.ai; without that flag the graph still runs, you just export a .glb/.gltf at the end instead.

Troubleshooting

There isn't much that can go wrong with this specific node beyond it not being reached - if an upstream node in your chain failed silently (a common failure mode when BPY_OBJ inputs aren't wired the way you think), this one just passes nothing through. Worth knowing before you install: Avatar Graph launched with a splash in October 2023 and has been quiet since, so don't expect a lively support thread for a node this specific - the pack's Discord is the realistic place to ask. And if you're on ComfyUI Desktop specifically, install this pack through a manual git clone rather than the built-in manager if you can - there's at least one report of a Desktop install of this pack going sideways badly enough to require reinstalling ComfyUI Desktop entirely.

Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ