How many times have you gone to place a lattice around an object in Maya when modeling, only to find out that you have blown away that object’s transforms, leaving the lattice in a useless orientation? No matter how careful you plan, you will need to orient a lattice at some point. Technically, if you move a deformer (which a lattice is) and its base node together, you are able to orient it manually without deforming the object in the process.

take any object and create a bounding box (Cube or Lattice) around that object

The problem with that is that you are doing it by eye, rather than by precision. Wouldn’t it be great if you could orient a lattice or cube instantly and accurately? Certainly Maya script creator Chris Devito thought so.

His Oriented Bounding Box script will instantly orient a lattice on any object in Maya, regardless of its transforms. The script uses three different solve methods, based on points, triangles and hulls, and then uses a matrix attribute that can be applied to any transform in Maya. This includes deformers, meshes, and pretty much any other object.

When you install the script it will place two new shelf buttons to the current active shelf. Just select your object, and click the button. It could not be easier.

So far the script is Windows only for now. There are plans to increase its speed by making it a C++ plugin, and add features such as translate, rotate and scale attributes.