Question

I'm trying to check the width of an object in another scene. The object in the other scene will be imported as an reference, but I need to know the width/height/depth (x/y/z bounding box) of the object in order to match a number of them into my scene according to parameters set by a script of mine.

The only way I've figured so far is to reference the object into the scene, check the bounding box with the xform command and then remove the reference and then proceed as normal. That solution seems both a bit slow (for large objects) and a bit awkward.

Was it helpful?

Solution

There's no way to interact with a Maya scene without it already in Maya. I think your method is correct.

What do you mean by "match a number of them into my scene"? Do you mean you want to make multiple references, based on the size? I.E. you want to fill up a given volume using the bounding box to determine how many will be needed? It seems that could be done after making one reference as easily as not.

OTHER TIPS

There's no other way to check than opening the file.

You could do an an offline batch process to collect all of the information once and save it to a database or simple file such as a CSV for faster access if speed is really an issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top