Skip to content

Instantly share code, notes, and snippets.

@dokluch
Created February 17, 2016 15:00
Show Gist options
  • Save dokluch/388e57466a51e7069ccf to your computer and use it in GitHub Desktop.
Save dokluch/388e57466a51e7069ccf to your computer and use it in GitHub Desktop.
Interpolates hold keyframes in After Effects
n = 0;
t = 0;
if (thisProperty.numKeys > 0){
n = thisProperty.nearestKey(time).index;
if (thisProperty.key(n).time > time) n--;
}
if(n < thisProperty.numKeys){
linear(time, thisProperty.key(n).time, thisProperty.key(n+1).time, thisProperty.key(n).value, thisProperty.key(n+1).value)
}
else value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment