I'm working on a school project with a classmate director.
I'm doing the visual effects and he is giving feedback.
To avoid confusion, I gave every single shot a separate comp.
I've used the expression from The Adobe After Effects site.
Code: Select all
source_footage_name = "";
for (i = 1; i <= thisComp.numLayers; 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
First, it is order sensitive, the first comp must be the lowest in timeline (so the highest layer number)
And the latest comp must be in the top (so the lowest layer number)
Is there a way to skip this variable?
Second, is there a way to give the expression a range.
Because I don't need the expression to name the adjustment layer on to, nor the source layer if there care no effects shot.
Fore example, layer 1 is a adjustment layer.
Layer 2 to 30 are effect comps
Layer 31 is the source layer.
Can the range be set from 2 tot 30, so that it will ignore the top and bottom layers?
I hope I make any sense to you.
If something is not clear, i'd be happy to explain more.
cheers,
Buchini