Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scale in/out – Frames

  • Scale in/out – Frames

    Posted by Alexander Weil on November 11, 2014 at 11:38 am

    Hello Creative Cows,

    I want to write an expression where my layer scales in and out at the start and end of my Layer Duration just like the “Fade In+Out – frames” from the After Effects Preset Behaviors. So i tooked the expression from the Preset and tried my best. it works but only for in or for the out fade. I know i need to add a last line of code to make them both work. maybe you can give me a hint or the solution

    thanks
    -alex

    fadeInDuration = thisComp.frameDuration *effect("Fade In+Out - frames")("Fade In Duration (frames)");
    fadeOutDuration = thisComp.frameDuration * effect("Fade In+Out - frames")("Fade Out Duration (frames)");

    startScale = [0,100];
    endScale = [15,100];

    fadeInScale = ease(time, inPoint, inPoint+fadeInDuration+0.001, startScale, endScale);
    fadeOutScale = ease(time, outPoint-fadeOutDuration-0.001, outPoint, endScale, startScale);

    Alexander Weil replied 11 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    November 11, 2014 at 4:56 pm

    Try replacing the last two lines with this:

    if (time < (inPoint+outPoint)/2)
    ease(time, inPoint, inPoint+fadeInDuration+0.001, startScale, endScale)
    else
    ease(time, outPoint-fadeOutDuration-0.001, outPoint, endScale, startScale);

    Dan

  • Alexander Weil

    November 18, 2014 at 9:03 am

    Thanks Dan,
    that saved me a lot of time 🙂
    greetings from germany
    -alex

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