Return overall scene dimensions

Hi All,

I'm looking for a script which can return the overall dimensions of a scene.

In this case we want to apply it to our tree library of over 1000 trees. It can be tricky to gauge by eye how large a tree is. Obviously theres room to scale to a degree but only so far. An accurate starting point would be helpful.

I was hoping to be able to batch run this script and get an excel doc/csv reporting the file names and the overall dimensions (in this scenario Z scale or height is most important).

We'd then use that sheet to apply keywords for filtering trees by height in our library.

I saw someone have a go at this a few years back but didnt seem to get it resolved.
Any ideas??
Thanks!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jahman's picture

.

objects.max - objects.min
mogamma's picture

Re object/scene total height

Hi Jahman,

Sorry only just seen this reply.
I know nothing about scripting.
I use Project Manager which apparently can allow me to batch run scripts on a load of nested files/folders.

So do you know how I could wrap up a script which would measure the total scene height and then put it into a csv/spreadhseet next to the file name?

So I end up with a sheet of my 1000+ trees with their heights in the next cell?

Thanks!

jahman's picture

.

(dotNetClass "system.io.file").AppendAllText @"C:\temp.csv" ((pathConfig.appendPath maxFilePath maxFileName) + "," + ((objects.max - objects.min).z as string + "\n"))

run this snippet for each scene file

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.