Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions self referencing valueAtTime Problem

  • self referencing valueAtTime Problem

    Posted by Ludwig Tomaschko on July 28, 2018 at 1:01 pm

    Hi!

    I have an object and its scale is driven by expressions.

    i have the scale value at second 4 ———— .valueAtTime(4),
    then I’m doing some calculations with it and i’m adding it to itself at second 6.

    because the expression is influencing the scale at second 4 too, AE is making trouble.

    is there a way to say AE: don’t affect values in the past?

    thanks in advance!

    Ludwig Tomaschko replied 8 years ago 2 Members · 2 Replies
  • 2 Replies
  • Andreas Brand

    July 28, 2018 at 2:36 pm

    Hello Ludwig

    I’m not pretty sure if I understand you right.

    I think you can’t reference with the same expression to the valueAtTime from another second. Because AE reads the expression every frame new.

    I would do it like this:

    if(time>=6){
    //var scale4seconds = calculations which should affect only the scale before second six
    // scale4seconds + newCalculations
    }else{
    // do the calculations which should only affect the scale before second 6
    }

  • Ludwig Tomaschko

    July 28, 2018 at 7:56 pm

    Hi Andreas!

    I can not test it right now, but i think this will make it.
    It didn’t come to mind to put in in an if/else statement.

    I’ll give it a try when I’m on the computer,

    THANK YOU!!!

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