Nodes/Avatar Graph/Object Select Hierarchy
ComfyUI Node

Object Select Hierarchy

Grabbing a whole parent/child chain at once

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Select Hierarchy
  • BPY_OBJ
  • BPY_OBJ
direction
extendfalse

Another Blender operator wrapper from Avatar Graph, avatech.ai's ComfyUI pack for building rigged, interactive avatars out of flat character art. This one walks a Blender object hierarchy - parents, children, or both - and selects everything it finds along the way.

Why hierarchy selection matters for a rig

An avatar built in this pack ends up as a real Blender scene graph: eye meshes, mouth meshes, and body parts parented to empties or bones that drive them. Once that hierarchy exists, you frequently want to grab an entire branch of it in one shot - every child of the head empty, say, so a downstream transform or export node acts on the whole face rig instead of one mesh at a time. Selecting each part individually in a node graph would mean a separate node per object; this node walks the tree from whatever's currently selected/active and expands the selection up or down automatically.

Inputs that matter

  • direction - an enum, and the field that decides which way this walks: PARENT climbs up toward the object's ancestors, CHILD walks down into its descendants. Which one you want depends entirely on where in the hierarchy your current selection sits and what you're trying to grab.
  • extend (default false) - whether the hierarchy selection adds to whatever's already selected, or replaces it. Leave it off for a clean, fresh selection each time; turn it on if you're building up a selection across multiple selection nodes in sequence.

Input and output are both the pack's BPY_OBJ socket, carrying a live Blender object reference - this node doesn't change what the object is, it changes what's selected within the scene around it, then passes the same object reference forward.

Installing it

ComfyUI Manager: search avatar-graph-comfyui. Manual install:

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

Every node in this pack depends on bpy, Blender packaged as a plain Python module, and bpy only works with Python 3.10.x - nothing newer. This is the single biggest install gotcha for the whole pack, this node included. The README's Windows instructions point to a dedicated prebuilt Python 3.10 ComfyUI zip for exactly this reason; on Mac/Linux, spin up a fresh conda environment (conda create --name comfyui python=3.10) before installing rather than trying to make it coexist with a newer Python you're already running. Restart with --enable-cors-header afterward if you want the live avatar preview panel talking to editor.avatech.ai.

Troubleshooting

If the selection this node produces isn't what you expected, check direction first - it's easy to want "everything under this object" and accidentally leave it set to climb toward parents instead. Second, remember Blender hierarchy relationships (parenting) are a separate thing from vertex groups or collections elsewhere in this pack - this node only walks parent/child object relationships, nothing else. Beyond that, general Avatar Graph caveats apply: the pack made its splash back in October 2023 and has been largely quiet since, so there's no active community thread specific to this node - the pack's Discord is realistically where you'd ask. If the whole pack fails to load, it's almost always the Python version, not this node.

Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
directionoptCOMBO2 options: PARENT, CHILD
extendoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ