Nodes/Avatar Graph/Object Origin Clear
ComfyUI Node

Object Origin Clear

Snap an object's origin back to the world, mesh stays put

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Object Origin Clear
  • BPY_OBJ
  • BPY_OBJ

Object_OriginClear moves an object's origin (the little dot every Blender object rotates and scales around) to the world origin at (0,0,0), leaving the mesh geometry right where it is. It's the generated wrapper for bpy.ops.object.origin_clear(), and it's one of the genuinely useful Object_* nodes for avatar work - because avatar meshes are built from images and tend to have origins all over the place.

Why origin matters in an avatar graph

Blender operations care about the origin, not just the mesh. Parenting, rotation pivots, shape flows, and export transforms all read the object's origin. If a mesh layer came off a segmentation and its origin is sitting somewhere random, downstream math can go sideways in ways that are maddening to debug. Setting a predictable origin early is the fix.

The key mental model: Object_OriginClear moves the origin to the world, not the object. If you want the opposite - move the mesh so it sits at the world origin - that's a different operator (Object_OriginSet with GEOMETRY_ORIGIN). This one just puts your pivot back at a known point.

How it works

Standard Object_* plumbing. Pass a BPY_OBJ, the node marks it active in the shared headless Blender scene, runs the operator, returns the same object. No options beyond the object itself:

  • BPY_OBJ (in/out) - the object to fix.

Output: the same BPY_OBJ, so you can chain straight into parenting or shape-flow nodes.

When to reach for it

Early in the pipeline, right after a mesh layer is created. Get the origin to a sane place before you parent, scale, or feed it into Create Shape Flow. It's cheap, it's destructive in a harmless way, and it saves you hours of "why is this rotating around a point in space" debugging.

Installing it

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

Remember the pack-wide constraint: bpy==3.6.0 runs only on Python 3.10. On newer Python you'll see "no module named bpy" and the pack won't load. Windows: the README's bundled ComfyUI_3.10.7z + run_nvidia_gpu_3.10.bat. Elsewhere: conda, python=3.10.

Gotchas

  • If you need the origin and the mesh moved together, this isn't it - see Object_OriginSet (ORIGIN_GEOMETRY moves the origin to the mesh center; GEOMETRY_ORIGIN moves geometry to the origin).
  • The shared scene resets each run, so the object must come from an upstream node in the same graph.
Categoryblender

Inputs (1)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ