Nodes/Avatar Graph/Object Parent No Inverse Set
ComfyUI Node

Object Parent No Inverse Set

Parent with no inverse, so the child snaps to the parent

By avatechai·Created 3 years ago·Updated 2 years ago· 265
Object Parent No Inverse Set
  • BPY_OBJ
  • BPY_OBJ
confirmtrue
keep_transformfalse

Object_ParentNoInverseSet parents one object to another without the parent inverse matrix. Which means: instead of the child keeping its current position offset, it snaps directly to the parent's origin. It's the wrapper for bpy.ops.object.parent_no_inverse_set(), and it's a deliberately blunt instrument.

What it's for

Normal parenting preserves where the child sits relative to the parent. No-inverse parenting says "forget the offset - the child's new location is the parent's origin, full stop." In Blender this is the operation that pops up the "Parent without inverse?" confirmation, which is exactly what the confirm input maps to (leave it true; a headless process has no dialog to click).

The keep_transform input is the escape hatch: when true, the child keeps its world transform while being parented. That makes the node behave closer to normal parenting - so if you want the "snap" behavior, keep it false.

How it works

Standard Object_* plumbing - the node sets your BPY_OBJ active in the shared headless Blender scene and runs the operator. Here's the catch that bites people: Blender's parenting operators parent the active object to the last-selected object. This node only receives one BPY_OBJ (the child), so the intended parent has to already exist and be selected in the shared scene. In a fresh graph with nothing selected, the operator can error or do nothing. This is the fiddliest part of the whole parent family - the graph just can't express "which object is the parent" with one input.

The inputs

  • BPY_OBJ (in/out) - the child object.
  • confirm - true by default; the headless stand-in for Blender's confirmation popup.
  • keep_transform - false by default; true keeps the child's world position instead of snapping.

Output: the same BPY_OBJ.

When you'd use it

Rarely, and deliberately. Snap-parenting is for cases where you genuinely want the child glued to the parent's origin - zeroing a layer onto its parent before adding its own offset. If that's not what you want, Object_ParentSet with default options is the normal-parenting route.

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: bpy==3.6.0 only runs on Python 3.10. Newer Python = "no module named bpy" = pack won't load. Windows: README's bundled ComfyUI_3.10.7z + run_nvidia_gpu_3.10.bat. Elsewhere: conda, python=3.10.

Gotchas

  • If nothing is selected as a parent in the shared scene, the operator won't have a target. Check your upstream selection state first.
  • The scene resets each run, so everything must be built in the same graph.
Categoryblender

Inputs (3)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
confirmoptBOOLEANtrue
keep_transformoptBOOLEANfalse

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ