


If you must modify or animate the Shape Layer's anchor point also, you'll need to compensate for the change by multiplying the scale by anchor point, then subtracting the Anchor Point value from the position like this:Īp = * s, ref.anchorPoint * s] If there is more than one shape with a stroke, they all need to have the stroke width to return any corner of the stroked layer.

If your shape layer has a stroke, you don't need to make any adjustments to return the center, but if you want a corner, you'll need to add the stroke value for the shape layer. If you want to calculate the center of a shape or text layer, you have to add the width and height divided by 2 like this: If all you need is to grab the top left corner of any shape layer or text layer, then all you need is something like this: SourceRectAtTime() has Left, Width, Top, and Height properties that it can read from Text and Shape layers.
