Skip to content

Instantly share code, notes, and snippets.

@animoplex
Created December 22, 2018 00:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save animoplex/8611bf480e2ef63be27d7870430b4a3d to your computer and use it in GitHub Desktop.
Save animoplex/8611bf480e2ef63be27d7870430b4a3d to your computer and use it in GitHub Desktop.
Simple Trigger Fade - After Effects Expression by Animoplex
// Simple Trigger Fade - Created by Animoplex: www.animoplex.com
// Repeat a fade animation multiple times using markers to trigger the animation.
// Full Tutorial: https://www.youtube.com/watch?v=B_3XS2-VWOM
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment