Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Combine Range mapper with If Else statement

  • Combine Range mapper with If Else statement

  • Jason Hearne

    May 13, 2020 at 4:56 pm

    I’m using the following expression to keep the 1st and 4th keyframe the same but modify the 2nd and 3rd with a slider.

    Lpos = thisComp.layer("FX - Landing POS").effect("Comp Control")("TuneIn 2")//slider;

    if (time < key(2).time)
    y = ease(time,key(1).time,key(2).time,key(1).value[1],Lpos)
    else if (time < key(3).time)
    y = Lpos
    else
    y = ease(time,key(3).time,key(4).time,Lpos,key(4).value[1]);
    [value[0],y]

    Currently my slider reads 0 for full On and 100 for full Off

    I’m having trouble combining a Range mapper so my slider will produce the opposite. Any ideas?

    Jason Hearne
    Portfolio
    Lead Artist/Animator

  • Tomas Bumbulevičius

    May 16, 2020 at 2:51 pm

    Jason, any chance your ‘slider’ is non-slider type? Or is it a pseudo effect?

    Lpos = thisComp.layer("FX - Landing POS").effect("Comp Control")("TuneIn 2")//slider;

    this means:
    Layer Name: ‘FX – Landing POS’
    Effect Name in layer: ‘Comp Control’
    “Slider name” : ‘TuneIn 2’

    Thus, does it have numeric value? Because below, works as expected, so just to make sure.
    Lpos = thisComp.layer("FX - Landing POS").effect("Comp Control")("Slider")

    Find out more:
    Motion Graphics Design & After Effects Tutorials
    On YT
    On VH

Viewing 1 - 2 of 2 posts

Log in to reply.

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