I was curious how I can find the dimensions of a shape layer. The reason I need to know is because I need to scale a shape layer, but I want it to scale from the left, not from the middle. I know how to do that part, all I have to do is divide the length of the shape layer in half, and add that keyframe the position. However, the problem is that I can't actually find out how to get the dimensions. If someone could help, that would be great. Thank you :)

EDIT: I found this solution that supposedly works here. But I don't actually know how to insert that expression, If someone could either find a different solution or tell me how to insert that one, it would be so helpful.

  • See this: video.stackexchange.com/a/13096/1871
    – Gyan
    Commented Nov 15, 2015 at 5:59
  • i dont really understand it? sorry i dont know much about 2d stuff in after effects, i mainly just use it for 3d
    – MTMaster
    Commented Nov 15, 2015 at 6:14
  • w = thisLayer.sourceRectAtTime(time, includeExtents = false).width; h = thisLayer.sourceRectAtTime(time, includeExtents = false).height;
    – Hani Tiby
    Commented Jan 1, 2018 at 21:46

1 Answer 1


Assuming an irregular shape, here's a manual method to do it.

Create a solid layer of any color, stacked above the shape layer. Change its opacity to around 30%, enough to see the shape layer underneath. Unlink the scale controllers (X and Y) so that they can be scaled independently. Move and rescale the solid so that it can serve as a bounding box for the shape layer. Your original solid size should have been the same as your comp size, so the dimensions of your shape layer are

Shape width = Composition width * 'X' scale % of solid layer
Shape height = Composition height * 'Y' scale % of solid layer

Of course, this is a crude method for one-time polling. There's probably an expression for dynamically updated values if the shape is animated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.