Max Center Object to 0 World Coordinates

I was wondering if anyone knows of a script or a script that already exists in a package to center any object to the 0, 0, 0 world coordinates. I find myself modeling and always having to do it manually. Would be nice to have a shortcut.

doesn’t right mouse clicking the XYZ in the move dialog work for you? Or did you want to combine that in a one click menu item?

One-click keyboard shortcut haha. I’m an old man. Arthritis is setting in. :wink:

you and be both :slight_smile:

On it’s alignment too?

for only position use:

for i in selection do i.pos = [0,0,0]

For position and rotation use


for i in selection do (
i.pos = [0,0,0]
i.rotation = (quat 0 0 0 0)
)

Bear in mind this is based on it’s pivot and not the volume centre of the object. For that use


for i in selection do (
i.center= [0,0,0]
i.rotation = (quat 0 0 0 0)
)

Thanks Jo, that is extremely helpful. :slight_smile:

damn old age

The shortest way, I think:

all objects:
objects.pos=[0,0,0]

selected objects:
selection.pos=[0,0,0]

I really must look into learning some proper programming but where to start? It’d be great to use proper c++ stuff and actually be able to write simple shaders or the likes. How far have you gone with it mark and how did you learn?

If you want the center of the selected objects at 0,0,0 instead of the pivot:
$.center = [0,0,0]