ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Select path of a shape layer via script

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Avinash Ramanath
Select path of a shape layer via script
on Jan 29, 2020 at 7:01:58 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 &lt;= 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
}
}
}


Return to posts index

Andrei Popa
Re: Select path of a shape layer via script
on Jan 29, 2020 at 8:08:36 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.


Return to posts index

Avinash Ramanath
Re: Select path of a shape layer via script
on Jan 29, 2020 at 8:59:42 am

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]