<p>As of 2019 you can access a path of a shape or a mask like so:</p>

<pre class="lang-js prettyprint-override"><code>myShape = thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path;
</code></pre>

<p>The <code>path</code> property is an object containing collections of points, inTangents and outTangents. It has three methods for obtaining the vertex details, <code>points()</code> returns the vertices, and <code>inTangents()</code> and <code>outTangents()</code> return the tangent handle positions if they have any. Each method optionally takes a time parameter to specify what time the data is retrieved. e.g.:</p>

<pre><code>myPoints = myShape.points(); //you can optionally specify the time, e.g. .point(t=123)
myPoints[0]

myInTangents = myShape.inTangents();
myInTangents[0]
</code></pre>

<p>In addition there are other methods for getting an arbitrary point on a path not at a vertex, and for finding out if the path is closed. It's a world of fun! Read the docs <a href="http://expressions.aenhancers.com/path-property.html#pathproperty-points-t-time" rel="nofollow noreferrer">here</a></p>

CC BY-SA 4.0
2019-11-15T08:50:59.330Z
that is wonderful ! thanks.
gordie
CC BY-SA 4.0
2019-11-08T01:20:12.627Z
2019-11-08T01:20:12.627Z
stib
<p>Is it possible to get the position of a specific vertex of an After Effect shape ?</p>

<p>something like</p>

<pre><code>var shape = parent.content("Shape 1").content("Path 1").path.value;
var vertexes = shape.vertices;
var startVertex = vertexes[0];

...

[x,y]
</code></pre>

<p>But this code does not work...</p>

<p>Thanks.</p>

<after-effects><after-effects-expressions>
get the position of a specific vertex in an After Effects shape
gordie
# get the position of a specific vertex in an After Effects shape

(Asked by: username_0 on 2019-11-07)

Is it possible to get the position of a specific vertex of an After Effect shape ?
something like
var shape = parent.content("Shape 1").content("Path 1").path.value;
var vertexes = shape.vertices;
var startVertex = vertexes[0];

...

[x,y]

But this code does not work...
Thanks.

**Tags:** after-effects, after-effects-expressions


---

## 1 answers

### Answer by username_1 on 2019-11-08. Score: 0 | Accepted answer

As of 2019 you can access a path of a shape or a mask like so:
myShape = thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path;

The path property is an object containing collections of points, inTangents and outTangents. It has three methods for obtaining the vertex details, points() returns the vertices, and inTangents() and outTangents() return the tangent handle positions if they have any. Each method optionally takes a time parameter to specify what time the data is retrieved. e.g.:
myPoints = myShape.points(); //you can optionally specify the time, e.g. .point(t=123)
myPoints[0]

myInTangents = myShape.inTangents();
myInTangents[0]

In addition there are other methods for getting an arbitrary point on a path not at a vertex, and for finding out if the path is closed. It's a world of fun! Read the docs here

> **Comments:**
> **username_0**: that is wonderful ! thanks.  

---

