Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Using linear expression twice in one layer

Tagged: 

  • Using linear expression twice in one layer

  • Danyl Bernard

    December 22, 2020 at 9:43 pm

    Hi all,

    I have two linear expressions like this

    compLength = thisComp.duration;
    linear(time, inPoint, 1.2, [-1035.6667], [-2655.907]);
    linear(time, compLength + .2, compLength - 1, -2655.907, -7500);

    The first one changes the z parameter for the beginning of the comp, and the second one changes the end. But for some reason, only the second expression works.

    If I split them into two different layers and cut the layer midpoint in the comp, they both work fine. However, using them in the same comp doesn’t work.

    Also, how do I use a parameter like scale that has more than 1 parameter while using linear()

    Thank you



  • Dan Ebberts

    December 23, 2020 at 1:09 am

    Try it this way:

    compLength = thisComp.duration;

    if (time <= 1.2)

    linear(time, inPoint, 1.2, -1035.6667, -2655.907)

    else

    linear(time, compLength - 1, compLength + .2, -2655.907, -7500);

  • Danyl Bernard

    April 8, 2021 at 4:25 am

    Hi,

    It’s been a while, but this worked great.

    Thank you

Viewing 1 - 3 of 3 posts

Log in to reply.

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