Nodes/Avatar Graph/Object Parent Inverse Apply
ComfyUI Node

Object Parent Inverse Apply

Freeze a parented object's offset so it stops snapping back

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Parent Inverse Apply
  • BPY_OBJ
  • BPY_OBJ

Object_ParentInverseApply applies an object's parent inverse matrix - Blender's way of remembering "how far the child was offset from the parent when parenting happened." Apply it and that offset becomes permanent: the parent relationship stays, but the child stops getting pulled back to its original parented position. It's the wrapper for bpy.ops.object.parent_inverse_apply().

What that actually means

When you parent object A to B in Blender, A keeps a hidden inverse matrix recording where it sat relative to B at that moment. That's why a child doesn't instantly snap to its parent's origin. ParentInverseApply bakes that offset into the child, so the inverse matrix is no longer compensating for anything.

Concrete scenario: you parented a mouth layer to a head, then moved the mouth to where you wanted it. Normally the parent inverse fights you by trying to restore the offset from parenting time. Applying the inverse makes your current position the "official" relationship, and from then on the mouth moves with the head from its current spot. In avatar terms, it's how you re-seat a layer after moving it.

How it works

The simplest node in the family: just BPY_OBJ in and out, no options. The node sets the object active in the shared headless Blender scene, runs the operator, returns the same object. Output is the same BPY_OBJ.

When you'd use it

Whenever a parented layer moves and then refuses to behave. If you're restructuring a rig and a child keeps snapping back to its pre-move offset, applying the inverse is the fix. It's one of those nodes that looks pointless until you hit the exact problem it solves - then it's a lifesaver.

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

And the pack-wide gotcha: bpy==3.6.0 requires Python 3.10. On anything newer you'll get "no module named bpy" and the pack won't load. Windows users: the README's bundled ComfyUI_3.10.7z + run_nvidia_gpu_3.10.bat. Everyone else: conda with python=3.10.

Gotchas

  • It only does something meaningful on an object that's already parented. On an un-parented object it's a harmless no-op.
  • The scene resets each graph run, so parent + child must both be built upstream in the same run.
  • If you want to actually sever the relationship instead of baking the offset, use Object_ParentClear (CLEAR or CLEAR_KEEP_TRANSFORM) instead.
Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ