Object Location Clear
Snap an avatar part back to the origin, cleanly
- BPY_OBJ
- BPY_OBJ
Object_LocationClear wraps Blender's bpy.ops.object.location_clear, which resets the active object's location back to (0, 0, 0) - the origin of the world. It's one of the simplest nodes in Avatar Graph and one of the most quietly useful, because mesh layers created from images tend to wander. You rescale a texture, recenter a jaw, rotate a piece into place, and suddenly everything is at weird coordinates.
In the avatar rigging flow, location matters more than you'd think. Shape keys and the Shape Flow runtime that drives the final animation assume a coherent rig coordinate system. A mouth mesh sitting at (2.1, -0.4, 3.8) because a resize transform nudged it isn't broken - it's just uncentered, and it will show up as a piece that animates around the wrong point. Clear its location and it's back at the origin, ready to be repositioned deliberately.
The input that matters
BPY_OBJ(optional) - the object to reset. Unwired, it acts on whatever's active in the shared headless Blender scene.clear_delta- also clear the object's delta transform (the extra location offset on top of the base transform). Off by default; flip it on if you want a truly pristine reset.
Output is the same BPY_OBJ, so you can chain LocationClear straight into a Transform_Translate or a parenting step. That pattern - clear, then reposition deliberately - is the idiomatic way to use it.
Gotchas
Clearing location only zeroes translation; rotation and scale are untouched (the pack has separate Object_RotationClear and Object_ScaleClear wrappers for those). And note this operates on the object's own transform - it doesn't move the object to where the origin is if the mesh is modeled off-center. For that you'd reach for origin operations. If you're doing a clean recenter on a mesh layer, combine this with a transform apply so your shape-key work starts from a sane frame.
Installation
Avatar Graph requires Python 3.10.x - bpy==3.6.0 only ships 3.10 wheels. Install via ComfyUI Manager (search "Avatar Graph") or:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
pip install -r requirements.txt
First launch auto-downloads the SAM ViT-H model (~2.4 GB) and mediapipe landmarkers, so give it time. Run with --enable-cors-header for the live avatar preview, or skip it and check your export in real Blender instead.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| clear_deltaopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |