Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions how to read a value using an expression ?

  • how to read a value using an expression ?

    Posted by Sebastien Allain on July 5, 2007 at 10:35 am

    Let me explain,
    if you have something like the opacity driven by an expression:

    transform.opacity=value*100

    The result is the value of the opacity multiplied by 100, right.
    Now I would like in an other expression (transform.position) to read the original value of the opacity! if I link position to opacity, the result is the whole expression of opacity …

    Is there a way to directly read the original value of the opacity ?

    sebastien

    Sebastien Allain replied 18 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    July 5, 2007 at 7:53 pm

    If the pre-expression value isn’t animated, you can use a little trick where you use the opacity expression to stuff the pre-expression value into negative times, like this:

    if (time >= 0) value*100 else value

    Then you pick up that value like this:

    transform.opacity.valueAtTime(-1)

    If the pre-expression value is animated, you can still do it with something like this:

    if (time >= 0) value*100 else valueAtTime(-time)

    and pick up the value like this:

    transform.opacity.valueAtTime(-time)

    But you have to do a little extra work to pick up the pre-expression value at time = 0, if you need it. Anyway, that should give you the idea.

    Dan

  • Sebastien Allain

    July 5, 2007 at 8:00 pm

    the time reversed ! i love the idea…
    always, so effective way Dan !

    thanks

    sebastien

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