Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scripting Question

  • Scripting Question

    Posted by Nicholas Petersen on May 31, 2013 at 12:18 pm

    I know that this is not strictly a question about expressions, but given that there is no dedicated scripting forum, I reasoned that this would be the most appropriate forum. Apologies if I am mistaken.

    I’m curious about editing expression controls within the scripting language, specifically how to change the name of each expression control. Here’s where I’m stuck…

    app.project.activeItem.layer(4).effect.addProperty(“Slider Control”);
    app.project.activeItem.layer(4).effect.(“Slider Control”).name = “Raise/Lower Arm”;

    I’ve been pawing through the scripting guide, but I have not been able to find anything about changing an expressions name. I tried this, thinking that it might work, and obviously it didn’t, as I got the following error message:

    “Function (predicate expression) cannot work with this class””

    What do I need to do to change the name of an expression control using the scripting language?

    Thanks for your help!

    Nic

    app.project.activeItem.layer(4).effect.addProperty("Slider Control");
    app.project.activeItem.layer(4).effect.("Slider Control").name = "Raise/Lower Arm";

    Nicholas Petersen replied 12 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 31, 2013 at 2:10 pm

    I’d do it this way:

    var myEffect = app.project.activeItem.layer(4).effect.addProperty(“Slider Control”);
    myEffect.name = “Raise/Lower Arm”;

    Dan

  • Nicholas Petersen

    June 1, 2013 at 10:14 pm

    Thanks! Worked like a charm!

    Nic

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