Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to reference in time to a specific value

  • How to reference in time to a specific value

    Posted by Las Wen on April 12, 2021 at 12:48 am

    Hello,

    i have question, which, it hink, is pretty simple. I want to reference in layer B by expression to a simple animation like a scaling in layer A with inPoint at 00:00:00:00. But, layer B has its inPoint at 00:00:00:10 and should start taht animation there which starts in layer A at 00:00:00:00.

    How to do that?

    Thanks in advance, i always needed this in my life and i helped me out with precomping 🙂 this should have been overdone now by a script if possible 🙂

    Cheers

    Las Wen replied 5 years, 3 months ago 2 Members · 3 Replies
  • 3 Replies
  • Andrei Popa

    April 12, 2021 at 9:07 am

    I think what you need is valueAtTime(). To link the scale of layer A you can use

    thisComp.layer("A").scale.valueAtTime(time-inPoint);

    To be a little modular, so it works even if the inPoint of A is not 0, you could write it like this

    layerA = thisComp.layer("A");
    inA = layerA.inPoint;
    diff = inPoint-inA;
    layerA.scale.valueAtTime(time-diff);
  • Las Wen

    April 12, 2021 at 3:48 pm

    Hah, great… thanks a lot Andrei. Thats exactly what i was looking for, this can help so much 🙂

    Amazing! <3

  • Las Wen

    April 13, 2021 at 7:58 pm

    Oh and, as funny it is, i found yesterday after reading your post this on YT https://www.youtube.com/watch?v=xFT6W9uSwbY just because i was whatching this guys videos… what a random case ?

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

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