ScriptSpot

Script

Select By Mass

By allanmckay · Credited author: Allan McKay · 2009-10-13

Version
3dsmax 2009
Date updated
2009-09-13
Votes
11
Download
Download
Description

Simple script, if people find it useful I'll make a gui and add a bit more to it. But the whole premise was to just quickly build a tool I could differentiate big objects from small objects in my scene based on VolSize variable in the script.

What I used it for was to fracture objects for a big landslide for a film, and then I wanted to use this script to tell me which objects were big so I would then work on making them procedurally break more, whereas I didn't want the small pieces to sub-fracture because that would be overkill.

So its a simple script but probably useful when dealing with thousands of objects on the fly.

Tags: scale, size, mass, pflow

Comments (3)

titane357 · 2009-10-14

hello Ruben, I think a lot of people can be interrested in your nice script !!! :-)))

Anubis · 2009-10-13

Hi, Allan. This is not measure of mass, but BoundingBox.
Never mind, its working. There is a quick code by me, by the way:

-- Function -------------
fn SelectBig objArray Size = (
	select (for i in objArray where (distance i.max i.min) >= Size collect i )
)
-- Setup -------------
sel = selection as array ; size = 50
-- Action -------------
if sel.count > 0 do (
	sel.wireColor = yellow
	SelectBig sel size -- call function
	selection.wireColor = blue
) -- done!