Reset pivot point for selected objects
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".
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.