Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Script apply variable value to expression

  • Script apply variable value to expression

    Posted by Kevin Snyder on April 20, 2022 at 10:34 pm

    I have a script that applies an expression to a selected property. When I apply the expression, I would like the layer name to reference a variable. In my example, I would like the value of var myCustom to be used for thisComp.layer in the expression. Is it possible?

    var myCustom = "Drive" + " " + "//" + " " + myControl;// Custom Layer Name

    var myExpr = 'temp = thisComp.layer(myCustom).effect("Drive")("Output 01"); dim = value instanceof Array ? value.length : 1; dim > 1 ? [temp,temp] : temp';

    Kevin Snyder replied 2 years, 9 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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