Nodes/Avatar Graph/Object Set Instance Type
ComfyUI Node

Object Set Instance Type

Making dozens of copies from one mesh, automatically

By avatechai·Created 3 years ago·Updated 2 years ago· 265
Object Set Instance Type
  • BPY_OBJ
  • BPY_OBJ
valueNONE

ObjectSet Instance Type is the Blender instancing switch, exposed as a node. Instancing is how you take one mesh and have it duplicate itself automatically all over another object - at every vertex, on every face, or as a whole collection - without building the copies by hand. For the avatar crowd this is mostly a curiosity; for anyone who's ever wanted hair, fur, or a field of identical props it's the actual feature.

The node sets Blender's instance_type property. The values you'll see, with the default NONE meaning no instancing at all:

  • NONE - no duplication (the default; almost always what you want in a rig)
  • VERTS - duplicate the mesh at every vertex of the parent object
  • FACES - duplicate it at every face, oriented to face normals
  • COLLECTION - instances of everything in a collection (via the collection instance)

Pair FACES with ObjectSet Instance Faces Scale to control the size of the duplicates, and you have a one-node fur/prop generator. In an avatar graph it's a fringe tool - the pack's own demo templates don't touch it - but it's the sort of thing that's great to know exists when you need a necklace of repeated beads or a patterned accessory on a character.

How it works

Same plumbing as the whole ObjectSet_* family: these nodes are auto-generated from a dump of Blender's bpy.types.Object properties, and each one does a single setattr on the BPY_OBJ passing through, then returns it unchanged so you can keep chaining.

Inputs that matter:

  • BPY_OBJ - the object whose instancing mode you're setting (this object gets instanced onto its parent)
  • value - string, default NONE

Output: the same BPY_OBJ.

Installing Avatar Graph

One install, all nodes:

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

Or ComfyUI Manager → Install Custom Nodes → search Avatar Graph → restart. Pack-level notes: bpy==3.6.0 pins you to Python 3.10 (bundled environment on Windows via the README; conda on macOS/Linux), and first launch pulls the SAM ViT-H model into ComfyUI/models/sams plus the mediapipe landmarkers.

Common issues

Instancing is a parent/child relationship - setting instance_type on an object that isn't a child of anything does nothing visible. If you set FACES and nothing happens, that's the first thing to check. Also note the copies are instances, not baked geometry: they render fine, but if you need the duplicates as real, editable meshes you'd have to convert/apply them, which this pack doesn't do for you. And remember the per-run scene reset - instancing has to be rebuilt from the graph every execution.

Categoryblender

Inputs (2)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
valueoptSTRINGNONE

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ