Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to get first “Path” Property from selected objects.

  • How to get first “Path” Property from selected objects.

    Posted by BayarUgrakh Batzorig on January 12, 2023 at 4:08 pm

    I’m making a script that does things to Path on a ShapeLayer. But can’t single out the Path from multiple selectedProperties because it can be nested inside PropertyGroups. if Path’s PropertyGroups has group outside AE auto select that group too, some groups can have “Path” as name and user can accidently select multiple PropertyGroups and Paths or other Property.

    var shapeLayer = app.project.activeItem.selectedLayers[0];

    var props = shapeLayer.selectedProperties;

    var find = cars.getElementsByName(“Path”)[0];

    I have tried like this but it’s not working. Pls help.🙏

    BayarUgrakh Batzorig replied 1 year, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 12, 2023 at 4:25 pm

    Like this maybe:

    var shapeLayer = app.project.activeItem.selectedLayers[0];
    var props = shapeLayer.selectedProperties;
    for (var i = 0; i < props.length; i++){
    if (props[i].matchName == "ADBE Vector Shape"){
    // do stuff
    }
    }
  • BayarUgrakh Batzorig

    January 12, 2023 at 6:11 pm

    Thank you Dan🙏, Dan 1 – ChatGPT 0

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