-
Automate Numbers
Hello,
I’m trying to automate the number where if I disable one number layer another number has to continue from the previous one.
for example – there are 10 text layers which contain 1 to 10 in order, if I disable the 5th layer(which is “5”) the 6th layer has to change to “5” and the 7th layer has to change to “6” and so on.
I tried
n = [];
if(thisComp.layer(index+1).enabled = true){
parseInt(thisComp.layer(index + 1).text.sourceText) + 1;
} else {
for (i = index; i < (thisComp.numLayers); i++){
if(thisComp.layer(index+1).enabled = true){
break;
}
n[i] = parseInt(thisComp.layer(i+1).text.sourceText) + 1;
};
};but it is not working when I disable the layer.