Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions ExtendScript – Items in my dropdown list are repeating – Help

Tagged: 

  • ExtendScript – Items in my dropdown list are repeating – Help

  • Ronan De Lacy

    January 12, 2021 at 2:19 pm

    Hello forum…

    Wondering if anyone on here can explain where I’m going wrong here. I have a dockable UI which contains a dropdown list that pulls in all layer names from a specific comp. I kinda have it working, however, the item names in the dropdown are duplicating and combining on each line.

    See screenshot and Scrips snippet.

    Thanks in advance, any help appreciated!

    var proj = app.project;

    var sytleFull = proj.item(5);

    var myList = new Array();

    for(var i=1; i <= sytleFull.numLayers; i++){

    myList[myList.length] = sytleFull.layer(i).name;

    pal.grp.groupTwo.asignGrid.add("item", myList);

    }

    pal.grp.groupTwo.asignGrid.selection = 0;

  • Andrei Popa

    January 12, 2021 at 2:59 pm

    You are adding the entire array each time, Try this instead on line 6

    pal.grp.groupTwo.asignGrid.add(“item”, sytleFull.layer(i).name);

  • Ronan De Lacy

    January 12, 2021 at 3:04 pm

    Hi Andrei. That worked, thanks so much!!

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