Object Parent Clear
Un-parent an object, with three ways to handle the transform
- BPY_OBJ
- BPY_OBJ
Object_ParentClear removes the parenting relationship on a Blender object - the wrapper for bpy.ops.object.parent_clear(). Parenting is how you make one avatar layer (say, a mouth) move with another (the head), so un-parenting is the operation that undoes that link when your rig needs restructuring.
The one input that matters
Beyond BPY_OBJ (in/out - the child object to un-parent), there's type, with three choices that differ in what happens to the child's position:
- CLEAR - clear the parent, keep the object's world position. The child stays exactly where it was in world space.
- CLEAR_KEEP_TRANSFORM - also clears the parent, and additionally keeps the object's full transform as it was. Same idea as CLEAR in most cases, but preserves any transform state the parenting introduced.
- CLEAR_INVERSE - the subtle one. This doesn't un-parent; it clears the parent inverse matrix while keeping the relationship. In practical terms it detaches the child from the parent's motion without moving anything - the parenting is effectively broken but the object's offset is untouched.
For a beginner: CLEAR is the one you almost always want. Reaching for CLEAR_INVERSE by accident is how people end up with children that no longer follow their parent but still "look" parented.
How it works
Standard Object_* plumbing. You pass the child object as BPY_OBJ, the node sets it active in the shared headless Blender scene, runs the operator with your type, and returns the same object for continued chaining. Output is the same BPY_OBJ.
One wrinkle worth knowing: Blender's parenting operators work on selection order (active object = child, last-selected = parent). This node only receives one BPY_OBJ, so it un-parents that object regardless of what its parent is - which makes it simpler in a graph than the parent set nodes.
When to use it
Restructuring time. If a mesh layer was parented upstream and you need it independent before a shape flow or export, CLEAR gives you back a free object at its current world position. It's also handy for cleaning up templates that parented things you wanted standalone.
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 constraint: bpy==3.6.0 runs only on Python 3.10. On newer Python, "no module named bpy" kills the whole pack at startup. Windows: use the README's bundled ComfyUI_3.10.7z + run_nvidia_gpu_3.10.bat. Elsewhere: conda, python=3.10.
Gotchas
- Pick
CLEARunless you know you need something fancier.CLEAR_INVERSElooks like "un-parent" but isn't. - The shared Blender scene resets each run, so the object has to come from upstream nodes in the same graph.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| typeopt | COMBO | 3 options: CLEAR, CLEAR_KEEP_TRANSFORM, CLEAR_INVERSE |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |