ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

select all the layers with the same name

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Israel Diaz
select all the layers with the same name
on Dec 20, 2017 at 10:10:50 am

Hello.

I will like select all the layer with the same name..

var aDoc = app.project.activeItem.layer("Blackmagic Production Camera 4K").selected = true;

If you dont mind help me.

Thank you


Return to posts index

Dan Ebberts
Re: select all the layers with the same name
on Dec 20, 2017 at 2:20:45 pm

Try this:


var myComp = app.project.activeItem;
for (var i = 1; i <= myComp.numLayers; i++){
myComp.layer(i).selected = (myComp.layer(i).name == "Blackmagic Production Camera 4K");
}



Dan



Return to posts index

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