ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Bounding box and scripts

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mateo Mazzini
Bounding box and scripts
on Dec 12, 2012 at 1:08:24 am

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).

Does anybody know how to get to that property?

Thanks!


Return to posts index


Dan Ebberts
Re: Bounding box and scripts
on Dec 12, 2012 at 1:46:47 am

The only way I can think of would be to have the script temporarily apply sampleImage() expressions to determine the non-zero alpha extents of the layer. Messy, but do-able.

Dan



Return to posts index

Xavier Gomez
Re: Bounding box and scripts
on Dec 13, 2012 at 12:26:53 pm

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.

This could be a new scripting feature request.

Xavier


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]