Skip to main content
Roland Kahlenberg
Legend
June 11, 2025
Question

AE Expressions Tip - Display Multiple Layer Names on a single Text Layer

  • June 11, 2025
  • 1 reply
  • 112 views

Occasionally, we want to display active timeline layer's names and if we don't know better, the solution is to use one Text Layer for each 'target' layer. 

BUT there's a better way - drop this Expression in a Text Layer, placed at the top of the Timeline hierarchy and drop this Expression into its source text property - 

let layerNames = "";
for (let i = 1; i <= thisComp.numLayers; i++) {
if (i === index) continue;
let targetLayer = thisComp.layer(i);
if (targetLayer.active) {
layerNames += `Layer Index:${targetLayer.index} - ${targetLayer.name}\r\n`;
}
}
layerNames.trim();



1 reply

nishu_kush
Legend
June 11, 2025

Thanks for taking the time to create this post, Roland.


Thanks,
Nishu