Created
June 18, 2017 09:42
-
-
Save fk128/47637b400b57f60c40a0bed7acb4ee88 to your computer and use it in GitHub Desktop.
After Effects Expressions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Autofade: Add to opacity | |
// If there are two markers on the layer, then they are used to set the duration; otherwise, a default value is used. | |
transition = 15; // transition time in frames | |
var v = transform.opacity; | |
if (marker.numKeys<2){ | |
tSecs = transition / ( 1 / thisComp.frameDuration); // convert to seconds | |
ease(time, inPoint, inPoint + tSecs, 0, v) - ease(time, outPoint - tSecs, outPoint, 0, v) | |
}else{ | |
ease(time, inPoint, marker.key(1).time, 0, v) - ease(time, marker.key(2).time, outPoint, 0, v) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Autofade: Add to opacity | |
// If there are two markers on the layer, then they are used to set the duration; otherwise, a default value is used. | |
//linear | |
transition = 15; // transition time in frames | |
var v = transform.opacity; | |
if (marker.numKeys<2){ | |
tSecs = transition / ( 1 / thisComp.frameDuration); // convert to seconds | |
linear(time, inPoint, inPoint + tSecs, 0, v) - linear(time, outPoint - tSecs, outPoint, 0, v) | |
}else{ | |
linear(time, inPoint, marker.key(1).time, 0, v) - linear(time, marker.key(2).time, outPoint, 0, v) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment