Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Referencing the expression of another layer

New Here ,
Nov 04, 2009 Nov 04, 2009
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.
TOPICS
Expressions
894
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 05, 2009 Nov 05, 2009
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines