3 Replies Latest reply on May 17, 2011 5:19 PM by Todd_Kopriva

    Scripting Shape Layers

    matthew5384

      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:

       

      app.project.activeItem.selectedLayers[0].width

       

      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?

       

      Thanks!