Animation In/Out separately
Hi guys,
I am currently trying to add an expression to my animations and use two different Checkbox for enable/disable In and Out animations, separately.
This is what I tried, but is not working:
var animationOnOff = thisComp.layer("control").effect("Animation In")("Checkbox");
if (animationOnOff == 1) {
value;
}else{
if(numKeys>1){
t1 = key(1).time;
t2 = key(2).time;
v1 = 100
v2 = 100
} else {value}
;
}
var animationOnOff = thisComp.layer("control").effect("Animation Out")("Checkbox");
if (animationOnOff == 1) {
value;
}else{
if(numKeys>2){
t3 = key(3).time;
t4 = key(4).time;
v3 = 100
v4 = 100
if (time < t2){
easeOut(time, t1, t2, v1, v2);
} else {
if(time < t3){
ease(time,t2, t3, v2, v3);
}else{
easeIn(time, t3, t4, v3, v4);
}
}
}else value
I will try to explain my project a bit:
I have 4 keyframes, 2 for the 'In Animation' and 2 for 'Out Animation'.
I want to link them to their Checkboxs so I can turn On/Off the animations separately.
I hope you can help me fix the expression
Thanks!