Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Animate opacity using data in text file

  • Animate opacity using data in text file

    Posted by Mike Driz on February 3, 2017 at 1:36 am

    I’m trying to write a simple expression to animate the opacity (on/off) of a solid
    according to data in a text file. The text file simply contains one line for each frame and will
    specify if solid should be on/off.

    Can anyone help me out? thanks for any help you could give.

    Mike Driz replied 9 years, 3 months ago 2 Members · 4 Replies
  • 4 Replies
  • Emre Anil

    February 3, 2017 at 11:15 am

    Why don’t you just copy the variables to a text layer and use that layer’s sourceText for your expression?

  • Mike Driz

    February 3, 2017 at 12:38 pm

    Can you give me any insight on writing that expression?

    Either way, thanks for replying! 🙂

  • Emre Anil

    February 3, 2017 at 1:45 pm

    Here’s an example:
    Pick-whip your solid layer’s opacity to the text layer’s Source Text property to change *thisComp.layer(“source”).text.sourceText*

    values = thisComp.layer("source").text.sourceText.split("\r");
    f = timeToFrames(time);
    if( f < values.length) values[f]; else 0;

  • Mike Driz

    February 3, 2017 at 3:10 pm

    Emre, thanks for much for your help! I got it to work.

    It is much appreciated!

    Have a great day 🙂

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