Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Extendscript naming Dropdown Menu effect

  • Extendscript naming Dropdown Menu effect

  • Willem de Rue

    February 25, 2020 at 10:10 am

    Hello,

    I’m writing a simple script where I add a dropdown menu effect to a layer, but I can’t seem to rename the Dropdown Menu effect like with for instance a slider effect.


    var dropdownItems = [
    "Left",
    "Center",
    "Right"
    ];
    boxLayerDropdown = boxLayer.Effects.addProperty("ADBE Dropdown Control");
    boxLayerDropdown.property(1).setPropertyParameters(dropdownItems);
    boxLayerDropdown.name = "Align";

    What am I doing wrong here?

    Regards,

    Wim

    this throws “Object is invalid, while this is fine:


    boxLayerslider= boxLayer.Effects.addProperty("ADBE Slider Control");
    boxLayerslider.name = "Rounded corners";

  • Alex Munteanu

    February 25, 2020 at 8:04 pm

    I haven’t tested ‘Dropdown’ controls much.
    When I try to get their matchName they also showup as a Pseudo-effect, which is a bit weird.
    Anyways… what you could do instead is to rename the last added effect.

    boxLayer.Effects.property(boxLayer.Effects.numProperties).name = "Align";

  • Dan Ebberts

    February 25, 2020 at 8:13 pm

    The dropdown control is an unusual implementation. You could try this:


    var dropdownItems = [
    "Left",
    "Center",
    "Right"
    ];
    var boxLayerDropdown = boxLayer.Effects.addProperty("ADBE Dropdown Control");
    var temp = boxLayerDropdown.property(1).setPropertyParameters(dropdownItems);
    temp.propertyGroup(1).name = "Align";

    Dan

  • Willem de Rue

    February 27, 2020 at 8:43 am

    Thanks Dan, that did the trick (of course)!

Viewing 1 - 4 of 4 posts

Log in to reply.

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