ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Combine Range mapper with If Else statement

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jason Hearne
Combine Range mapper with If Else statement
on May 13, 2020 at 4:56:51 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


Return to posts index

Tomas Bumbulevičius
Re: Combine Range mapper with If Else statement
on May 16, 2020 at 2:51:40 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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]