Object Parent Set
Parent layers together, Blender-style, from inside the graph
- BPY_OBJ
- BPY_OBJ
Object_ParentSet is the main parenting node in Avatar Graph's Object_* family - the wrapper for bpy.ops.object.parent_set(). Parenting is how a rig stays together: the mouth moves with the head, the head moves with the body. This node is how you build those links without leaving ComfyUI.
The inputs that matter
- BPY_OBJ (in/out) - the child object being parented.
- type - Blender's parent type, all 13 of them:
OBJECT,ARMATURE,ARMATURE_NAME,ARMATURE_AUTO,ARMATURE_ENVELOPE,BONE,BONE_RELATIVE,CURVE,FOLLOW,PATH_CONST,LATTICE,VERTEX,VERTEX_TRI. For avatar work you'll useOBJECT(simple object parenting) and possiblyBONE-family types if you're rigging to an armature. - xmirror - for armature/bone parenting, mirror the operation across X. False by default.
- keep_transform - keep the child's world position after parenting. False by default, which means the child keeps its offset via the parent inverse.
Output: the same BPY_OBJ.
The catch you need to know
Blender parents the active object to the last-selected object. This node only accepts one BPY_OBJ - the child - so it can't tell the operator who the parent is. The parent must already exist and be selected in the shared headless scene when the node runs. In a fresh graph with no selection, the operator has no target and will fail or no-op.
This is the least graph-friendly node in the parent family, honestly. In practice you'll get the most mileage from it in templates that set up selection state first (the pack's demo workflows wire the scene so selection works), rather than trying to hand-build parenting on a blank canvas.
How it works
Standard Object_* plumbing: set BPY_OBJ active, run parent_set with your props, return the same object. Output: the same BPY_OBJ.
Installing it
Ships in Avatar Graph:
- ComfyUI Manager: search "Avatar Graph", install, restart.
- Or:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui && python -m pip install -r requirements.txt
Pack-wide wall: bpy==3.6.0 requires Python 3.10. Anything newer and "no module named bpy" stops the pack from loading. Windows: the README's bundled ComfyUI_3.10.7z + run_nvidia_gpu_3.10.bat. Elsewhere: conda with python=3.10.
Gotchas
- Parent selection state is everything. If parenting "does nothing," check whether a parent exists and is selected in the scene.
keep_transformfalse vs true changes whether the child snaps or keeps position - know which you want before queueing.- Scene resets each run, so parent and child must both be built upstream in the same graph.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| typeopt | COMBO | 13 options: OBJECT, ARMATURE, ARMATURE_NAME, ARMATURE_AUTO, ARMATURE_ENVELOPE, BONE, +7 | |
| xmirroropt | BOOLEAN | false | — |
| keep_transformopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |