Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to find the selected vertices point?

  • How to find the selected vertices point?

    Posted by Rahadyan Hendrasta on August 28, 2023 at 1:37 am

    Hi, I’m Rahadyan

    I’m making code to display the vertices coordinates of each path point.

    var selectedShape = app.project.activeItem.selectedProperties[0].path.value.vertices;
    var alertMessage = "";
    for (var i = 0; i < selectedShape.length; i++) {
        var vertex = selectedShape[i];
        alertMessage += "Vertex " + (i + 1) + " = X: " + vertex[0] + ", Y: " + vertex[1] + "\n";


    Well, I want to modify my code to know which pathpoint I’m currently selecting with the mouse and displaying in an alert. How’s the script?

    Thank you for your help

    Filip Vandueren replied 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    August 29, 2023 at 9:45 am

    Hello Rahadyan,

    I don’t think the selected vertex/vertices is available in scripting. I can’t find it in the official scripting reference.

    If the object .vertices would have been an array of “Vertex” objects, than each of those could have had a “selected” property. But .vertices is just a list of number coordinate-pairs.

    The property .vertices itself also doesn’t have a sub-property like selection / selectedVertices,…

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy