Skip to content

Instantly share code, notes, and snippets.

@animoplex
Created December 25, 2018 02:22
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/6d3277b26da9b508b259ac03f70695be to your computer and use it in GitHub Desktop.
Save animoplex/6d3277b26da9b508b259ac03f70695be to your computer and use it in GitHub Desktop.
For Loop Example - After Effects Expression by Animoplex
// JavaScript For Loop Example - Created by Animoplex: www.animoplex.com
// The JavaScript For Loop and how it can be used in After Effects.
// Full Tutorial: https://www.youtube.com/watch?v=SG3NyHmfc0s&t=91s
myArray = [];
for (i = 0; i < thisComp.numLayers; i++) {
myArray[i] = thisComp.layer(i+1).name;
}
myArray.slice(0, thisComp.numLayers).join("\r")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment