Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How can i do this kind of Script selector?

  • Dan Ebberts

    August 24, 2015 at 9:01 pm

    My guess is that the LeftPanel and RightPanel comps have a full complement of team precomps, with each teams opacity (and possibly audio) linked to the appropriate dropdown in the pseudo effect.

    Dan

  • Adrián Wulfrath

    August 24, 2015 at 9:09 pm

    But how can i do a dropdown pseudo effect with an script to call different comps?

  • Adrián Wulfrath

    August 24, 2015 at 10:40 pm

    I actually added my 2 Layer Pseudo Effects, but didnt have a keyframe clock tag, so how can i call an specific Comp to my layer dropdown menu?

  • Dan Ebberts

    August 25, 2015 at 12:08 am

    Instead of a Layer control, I would use a Popup (dropdown list), which you can keyframe. The drawback is that you need to know the names of the layers at the time you build the pseudo effect. If you need it to work for whatever layers are in the precomp, you’ll probably need to build a custom script panel UI, because a script could populate dropdown lists on the fly, using the names of whatever layers happen to be in the target precomp.

    Dan

  • Adrián Wulfrath

    August 25, 2015 at 12:25 am

    I tried with this: But actually my pop up dropdown menu have 6 numbers: 1, 2, 3, 4, 5, 6. How can i turn on/off each comp calling with the correct pop up name?

    My Control is a null object Called “Control” and the effect is “Wul Control” The PopUp Dropdown Menu is “Equipo 1” and each selection is a number.

    try{
    L = thisComp.layer("Control").effect("Wul Control")("Equipo 1");
    if (L.index == index) 100 else 0
    }catch (err){
    0
    }

  • Dan Ebberts

    August 25, 2015 at 12:44 am

    If it’s a dropdown, I think it would be more like this:


    try{
    L = thisComp.layer("Control").effect("Wul Control")("Equipo 1");
    if (L.value == index) 100 else 0
    }catch (err){
    0
    }

    Dan

  • Adrián Wulfrath

    August 25, 2015 at 12:53 am

    That expression call the layer order in my comp but how can i call the name of my Popup?

  • Dan Ebberts

    August 25, 2015 at 2:45 am

    I don’t think you can do that. I think all you can get is the dropdown index of whatever is selected.

    Dan

  • Adrián Wulfrath

    August 25, 2015 at 4:57 am

    The Index is the number of the Layer order, isnt it?.
    So how the people can select comps with that popup control?

    But how can i get the dropdown index of whatever i select? Can you share me an expression example?

    In advance Thank you very much for your help you are really good with all this kind of AE Scripts.

  • Dan Ebberts

    August 25, 2015 at 5:35 am

    You would put your precomp names in the popup definition:

    …popup_string=”$$$/…/Popup=Comp 1|Comp 2|Comp 3″…

    you would stack your precomps in the same order:

    Comp 1
    Comp 2
    Comp 3
    etc.

    Each precomp would have an opacity expression containing something like this:

    L = thisComp.layer(“Control”).effect(“Wul Control”)(“Equipo 1”);
    if (L.value == index) 100 else 0

    Dan

Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy