-
Name of FIRST VISIBLE LAYER beneath text layer?
I’ve been trying to generate some code that names the first visible layer beneath a text layer. I thought I had it:
for(i=1;i<=thisComp.numLayers;i++){
if(thisComp.layer(i).inPoint <= time && thisComp.layer(i).outPoint >= time){
text.sourceText=thisComp.layer(i).name;
}
}
But this returns the BOTTOMMOST layer instead. I feel like I either need a way to stop the counting once it hits the first visible layer, or perhaps there’s a more elegant solution, maybe using “layer.active” but I haven’t been able to find it. Any ideas?
Ben Unguren
Motion Graphics & Editing
http://www.mostlydocumentary.comSome contents or functionalities here are not available due to your cookie preferences!This happens because the functionality/content marked as “Vimeo framework” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.