Array of all comp layers into items of a Dropdown menu expression
Hello!
I encountered at first glance a simple task in one of the projects.
I have a small comp with icons (100 x 100 pixels), it has a bunch of layers with different icons.
This composition is in another composition and has the DropDown Menu Controller effect applied to it.
How can I make the items in this controller take an array of layers from inside this composition with names and, depending on the selected item, show only selected icon?
I don't know expression language very well and tried the help of ChatGPT but the results don't work.
ChatGPT provided me this solution for the list of layers:
names = [];
for (i = 1; i <= thisComp.numLayers; i++) {
if (i != index) {
names.push(thisComp.layer(i).name);
}
}
names;But there's an error in line 1 (coldn't turn result into numeric value)
