Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Select path of a shape layer via script

  • Select path of a shape layer via script

  • Avinash Ramanath

    January 29, 2020 at 7:01 am

    Is it possible to select the Path 1 content of a shape layer via scripting so that I don’t have to twirl down to find it every time?

    var activeItem = app.project.activeItem;
    if (activeItem == null || !(activeItem instanceof CompItem)) {
    alert("Please select or open a composition first.");
    } else {
    var selectedLayers = activeItem.selectedLayers;
    if (activeItem.selectedLayers.length == 0) {
    alert("Please select at least one layer in the active comp first.");
    } else {

    var activeComp = activeItem;

    var myLayers = activeItem.selectedLayers;

    for (i = 0; i <= myLayers.length - 1; i++) {
    currentLayer = myLayers[i];
    var compName = myLayers[i].name;
    //alert(currentLayer.name);
    currentLayer.content("Shape 1").content("Path 1").setActive; // how to set this to active so that I may move the points
    }
    }
    }

  • Andrei Popa

    January 29, 2020 at 8:08 am

    I don’t think you need a script for that. You have 2 options:

    1. Select the pen tool(G) and then select your layer. It also work if your layer is selected and you press G.
    2. With your Selection tool(V) double click on your path in the viewer.

    Andrei
    My Envato portfolio.

  • Avinash Ramanath

    January 29, 2020 at 8:59 am

    Thanks for the reply Andrei Popa, But it’s not doing what I wanted.

Viewing 1 - 3 of 3 posts

Log in to reply.

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