Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions dynamic variable that tells a TEXT layer what its 'source text' value is….

  • dynamic variable that tells a TEXT layer what its 'source text' value is….

  • John Gardner

    April 8, 2021 at 5:07 pm

    On a text layer, I want to “build” some variables via sliders to equal a know text layer that already exists. This is just an example of how I think it would work.

    xCopy=effect(“Data controls”)(“Copy #”);
    xResolution=effect(“Data controls”)(“Resolution”);
    xOutput=xCopy+xResolution;
    comp(“Data”).layer(xOutput).text.sourceText

    The variable xCopy is equal to these possibilities: Copy1, Copy2, Copy3, Copy4, Copy5

    The variable XResolution is equal the following possibilities: 300×250, 300×600, 640×480, 728×90, 970×90.

    Then I have a Pseudo Effect associated with this text layer where I can build the possible outcomes of what text layer I want it to be associated with.

    To simplify the issue, here is what works. I am just linking text in one comp to text in another comp through this expression, and it works fine. I just want to setup a situation where people don’t have to go into expressions to edit what layer it should point towards.

    comp(“Data”).layer(“Copy1_970x250”).text.sourceText

    Any solutions?

    Thanks,

    John

  • Filip Vandueren

    April 12, 2021 at 1:27 pm

    I think you’ve added the resolution options to an expression control pop-up selector ?

    Those return a number, the index of the selection, and not the actual string of theboption you selected

Viewing 1 - 2 of 2 posts

Log in to reply.

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