<p>Assuming an irregular shape, here's a manual method to do it.</p>

<p>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</p>

<pre><code>Shape width = Composition width * 'X' scale % of solid layer
Shape height = Composition height * 'Y' scale % of solid layer
</code></pre>

<p>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.</p>

CC BY-SA 3.0
2015-11-15T06:35:27.967Z
2015-11-15T06:35:27.967Z
Gyan
<p>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 :)</p>

<p>EDIT: I found this solution that supposedly works <a href="https://video.stackexchange.com/questions/13095/layer-dimensions-in-after-effects">here</a>. 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.</p>

CC BY-SA 3.0
2015-11-15T05:59:47.633Z
See this: http://video.stackexchange.com/a/13096/1871
Gyan
CC BY-SA 3.0
2015-11-15T06:14:45.193Z
i dont really understand it? sorry i dont know much about 2d stuff in after effects, i mainly just use it for 3d
MTMaster
CC BY-SA 3.0
2018-01-01T21:46:19.853Z
w = thisLayer.sourceRectAtTime(time, includeExtents = false).width; h = thisLayer.sourceRectAtTime(time, includeExtents = false).height;
Hani Tiby
<after-effects>
How to find dimensions of a shape layer
MTMaster
# How to find dimensions of a shape layer

(Asked by: username_0 on 2015-11-15)

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](https://video.stackexchange.com/questions/13095/layer-dimensions-in-after-effects). 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.

**Tags:** after-effects

> **Comments:**
> **username_1**: See this: http://video.stackexchange.com/a/13096/1871  
> **username_0**: i dont really understand it? sorry i dont know much about 2d stuff in after effects, i mainly just use it for 3d  
> **username_2**: w = thisLayer.sourceRectAtTime(time, includeExtents = false).width; h = thisLayer.sourceRectAtTime(time, includeExtents = false).height;  

---

## 1 answers

### Answer by username_1 on 2015-11-15. Score: 2

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.


---

