Friday, April 18, 2008

New Script: Group Overlapping Objects

GroupOverlappingObjects is a script that analyzes your selection and creates discrete groups for any objects that are touching each other.

I often need a script like this for less than 100 objects so it serves my purposes. It's almost instantaneous on objects less than 20, but I'm a little disappointed with the speed of this one when processing a larger number of objects.

I tried to rebuild the code using bitshifting to keep track of the overlaps, and the test code worked so much faster, but unfortunately it created a buffer overflow on 100 objects, so I'm posting this version, because it's more robust, and it's finished. :) I may re-address this code at a later date, but meanwhile if you're in a pinch to group a lot of objects, give it a shot.

No comments: