Continuing along Ross’ lines, here’s what I apply to Opacity:
fade=this_comp.layer(“fade null”).effect(“fade length”).param(“Slider”);
if (time < in_point+fade){
ease(time, in_point, in_point+fade, 0, 100)
}else{
ease(time,out_point-fade, out_point, 100, 0)
}
This one requires a null layer called "fade null" with a slider control renamed "fade length". The slider changes the length of the fade.
When we apply these expressions to layers, the fade automatically adjusts when we adjust the in/out point. If we used keys, we'd have to adjust in/out points and keyframes for each layer. These kinds of expressions can be timesavers when faced with a lot of layers spread throughout the comp.
Don't forget to use "copy expression only" and "paste" to paste the expression where you need it. 🙂