-
100 to 0 Expression based on layer length
I’ve been using this code for a while as a way to fade in and out my layers based on length, so I don’t have to keep moving keyframes when adjusting composition length:
// Fade in and outfadeInTime = .25;
fadeOutTime = .25;Math.min(linear(time,inPoint,inPoint + fadeInTime,0,100),linear(time,outPoint - fadeOutTime,outPoint,100,0));
I tried to adapt the code and use it on the effect “Gradient Wipe” but it doesn’t seem to work:
TransitionInTime = 1;
TransitionOutTime = 1;Math.min(linear(time,inPoint,inPoint + TransitionInTime,100,0),linear(time,outPoint - TransitionOutTime,outPoint,0,100));
I’m trying to have the transition go from 100 to 0 in one second at the beginning, and then 0 to 100 in one second at the end.
I’m not sure why it isn’t working.