I'm new to scripting for AE (but not new to programming) and I think I have discovered a bug in After Effects, or maybe I am just too ignorant to understand my problem. Please point me in the right direction.
In my script I have called the following:
where the selected layer is a shape layer. It always returns "1920" (the comp width), not the actual width of the shape. I've tested this with other layers, and they all return their correct widths.
How do I get the correct width of the shape layer, or better yet the size of rectangles and the radii of ellipses?
Shape layers aren't like other layers. As continuously rasterized vector graphics, they don't really sit on rectangular layers with width and height properties like other layers have.
If you want access to the dimensions of shape objects through scripting, you can submit a feature request.
Doesn't sourceRectAtTime() work on shape layers?
> Doesn't sourceRectAtTime() work on shape layers?
Not to get, for example, the width of the ellipse, as the original poster was asking.