-
sourceRectAtTime() for shape layers?
Short version: is it not possible to get a pixel width from a shape layer using sourceRectAtTime?
I’ve been working on a script that, among other things, creates shape layers from imported illustrator layers. Once I’ve created these shape layers I’d like to get their position and their width so I can align other elements to their edges.
When I try and fetch the width of the shape layer with sourceRectAtTime() the value I get is not the pixel width. If I use sourceRectAtTime() on the footage layer that created the shape I get an entirely different, smaller value, that as far as I can tell is correct (based on manually measuring).
For example, for an illustrator footage layer “LayerOne” containing two paths:
LayerOne.sourceRectAtTime(1000,true).width returns 90
But if I convert LayerOne to paths using “Create Shapes from Vector Layer”:
LayerOneOutlines.sourceRectAtTime(1000,true).width returns 107.64068(…)
Any thoughts? I’m clearly missing something.