Reset pivot point for selected objects
Hi guys!
Some time ago I made a simple script to automate the workflow of resetting a pivot point of an object. Simple stuff. Now I wanted to alter the script in such a way that it does the same thing for each consecutive object in my selection. So let's call this script "reset pivot of selection".
The script:
(
activeSelection = selection as Array
for s in activeSelection do
(
macros.run "PolyTools" "CenterPivot"
macros.run "PolyTools" "ResetXForm"
)
)
Well, the script works fine for a couple objects, and executes really fast.
The problem arises when I try to apply the script to let's say more than 200 objects at a time. For some reason my PC just freezes and doesn't come back alive. You guys have any idea how I could improve the script to make it such that it doesn't crash at any larger number of objects.
Comments
.
Both functions are mapped, so this have to work:
Tools and Scripts for Autodesk 3dsMax
`
ha, good to know, thanks :)
I always used longer:
for o in selection do resetPivot o