Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 1004 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 1004 Bytes

OriginPivot

This is a Python script designed to move a mesh and its pivot to the origin.

Demo Video

I made the script after a request came in from level designers that the pivots of all the 3d models were always different. Modelers can be inconsistent with how they finalize and prep a mesh before being imported into a game engine.

The way it works is that script accesses the bounding box information of the selected mesh, gets the center of the overall selection, moves the pivot to the bottom of the bounding box, determines the difference between the new pivot location and the origin, and moves the mesh to the origin. The script adapts and determines the boudning box based on the up axis being Y or Z.

The function to call to execute the script is originPivot.originPivot()