Tuesday, September 6, 2011

Set pivot to centre


macroScript ToWorldZero
category:"Lukes' Tools"
toolTip:"To World Zero"
buttonText:"Zero"
(
--Sets the pivot to the lowest point in a mesh, then centres the object to world zero
if $ != undefined then  
    (
        ResetPivot $
        CenterPivot $
        for i in selection do
            (
                i.pivot = [i.pivot.x, i.pivot.y, i.min.z]
            )      
        $.pos = [0,0,0]
    )
else
    (
        messageBox "Select an object then run this script again." title:"Computer says no!" beep:true
    )
)

No comments:

Post a Comment