Skip navigation
Home/Support/

Forums

221 Views 1 Reply Latest reply: Nov 5, 2009 11:56 AM by Dan Ebberts RSS
benfrankdesign Calculating status... 1 posts since
Nov 4, 2009
Currently Being Moderated

Nov 4, 2009 10:35 AM

Referencing the expression of another layer

i have a somewhat lengthy expression that will be applied to all transform properties of all layers in a project. i would like to be able to easily update this expression and have that update ripple through all elements using it. my question is: is there a way to dynamically copy the expression of another layer? does the expression field itself have a name that i can use to copy it?

 

i want to do something like this:

thisComp.layer("layer_name").transform.position.expression;

 

where "expression" at the end is whatever the name of the expression field is. any help would be greatly appreciated.
  • Dan Ebberts Participant 277 posts since
    Aug 11, 2002
    Currently Being Moderated
    1. Nov 5, 2009 11:56 AM (in response to benfrankdesign)
    Re: Referencing the expression of another layer

    You can't access one expression from another, but you could construct your expression in a text layer and the evaluate that from your other expressions. So, you could put something like this a text layer:

     

    x = 100;

    y = 100;

    [x,y]

     

     

    And then put something like this in another layer's position expression:

     

    eval(thisComp.layer("Text Layer 1").text.sourceText.value);

     

     

     

    Dan

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points