Skip to content

Instantly share code, notes, and snippets.

@mediochrea
Created May 8, 2017 23:40
Show Gist options
  • Select an option

  • Save mediochrea/f50c74503bfa6f61e75dd0c3ac6bc2b6 to your computer and use it in GitHub Desktop.

Select an option

Save mediochrea/f50c74503bfa6f61e75dd0c3ac6bc2b6 to your computer and use it in GitHub Desktop.
Layer names to text layer #expression #aftereffects
source_footage_name = "";
for (i = 2; i <= 30; i++){
if (i == index) continue;
my_layer = thisComp.layer(i);
if ( (my_layer.hasVideo && my_layer.active)) continue;
if (time >= my_layer.inPoint && time < my_layer.outPoint){
try{
source_footage_name = my_layer.source.name;
}catch(err1){
source_footage_name = my_layer.name
}
break;
}
}
source_footage_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment