-
Checkbox Controlled Opacity Easing… But With Easing Before The Other Keyframe?
Hi, this is my first time posting here. I have been looking over many of the posts on this blog and would like to pose my own question.
I saw a post by the amazing Dan Ebberts about “Checkbox Controlled Opacity Easing” from 2014 and I thought the code provided a great solution to my project but here’s the thing.
I would like help with figuring easing before/into the keyframe as well as easing after/out of the keyframe.
My current attempt looks like this:
fadeTime = .5;
cb = thisComp.layer("Controller").effect("Timer ON")("Checkbox");if (cb.numKeys > 0)
{
n = cb.nearestKey(time).index;
if (cb.key(n).time > time ) n--;
if (n >0)
{
t = time - cb.key(n).time;
if (cb.key(n).value > 0)
ease(t,0,fadeTime,-100,0);
else if (time - cb.key(n).time <= fadeTime)
{
ease(t,0,fadeTime,0,-100);
}
}
else
{
0
}
}
else
if (cb.value > 0) 100 else 0