-
Find selected Layers with part of name.
Is it possible to get to all selected layers that have, for example, the name scale in its name.
So the layer would be called something like: Frame1_Icon1_Scale
And i want to find all layers with the ending Scale or with Scale in its name anywhere (whatever is possible) to animate it through a script.
I write this but it just finds the exact name:
var comp = app.project.activeItem;
var layers = comp.selectedLayers;
for (var i = 0; i < layers.length; i++) {
if (layers[i].name = “scale”) {
var scalelayerkeys = layers[i].property(“Transform”).property(“Scale”)
scalelayerkeys.setValueAtTime(0,[0,0]);
scalelayerkeys.setValueAtTime(0.4,[110,110]);
scalelayerkeys.setValueAtTime(0.7,[100,100]);
}
}