I'm looking for a way to access the bounding box of a layer from the extendscript toolkit. I want to create a center pivot script for after effects that could work with a mask, but from using the sourceRectAtTime method I'm only getting the coordinates of the layer size. If you draw a mask, and then select it, After Effects generates the bounding box that would be ideal to center the pivot to (It's not a real center pivot, but it's much better that what I've achieved with the sourceRectAtTime).
If the mask is open, or if it is not in ADD mode, it won't work though.
Few times i also would have liked to access the mask bounding box/default anchor point too and it has no corresponding script property. Recalculating it from mask data is possible but requires some knowledge on bezier things.