Skip to content

Instantly share code, notes, and snippets.

@animoplex
Last active June 29, 2020 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save animoplex/b426933ae6c896c79ea98a50855ff62e to your computer and use it in GitHub Desktop.
Save animoplex/b426933ae6c896c79ea98a50855ff62e to your computer and use it in GitHub Desktop.
Try Catch Statement - After Effects Expression by Animoplex
// Try Catch - Created by Animoplex: www.animoplex.com
// Checks to see if a property, effect, layer, comp, or object exists.
// Note: Works like if/then statement, except if the try fails, it does not break the expression.
// Full Tutorial: https://www.youtube.com/watch?v=SG3NyHmfc0s&t=475s
try {
thisComp.layer(index + 1).value;
} catch(err) {
1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment