Expression fade in/out with marker
Hello,
Can someone help me with changing the expression below, I tried some things but didn't work:
so the expression below is to do a fade in/out on based on markers on the layer itself. Can someone tell me how to customize to fade in/out on another layer?
fadeFrames = 30; m = 0; t = time;
if (marker.numKeys > 0) {
m = marker.nearestKey(time).index;
tag = marker.key(m).comment;
if (tag == "In") { t = marker.key(m).time - time }
else if (tag == "Out") { t = time - marker.key(m).time }
linear(t, 0, framesToTime(fadeFrames), value, 0)
} else {
value
}
