I guess as every text and audio is named in the order
quote1
quote2
Maybe by using a pickwhip tool? I would apply it to every single one.
At the same time what bothers me: as the length of the audio layers changes every time... is there any extra expression for making all audiolayers to just be one after another? Without any spare space in betweeen them?
Thank you
As a simple example, this little script will go through your comp looking for text layers and when it finds one, it looks for another layer with the same name, but ending in ".wav". For each matching pair, it trims the text to the length of the audio an moves it to match the timing.
function adjustText(){
var myComp = app.project.activeItem;
if (myComp == null || ! (myComp instanceof CompItem)){
alert ("No comp active.");
return;
}
var myTextLayer;
var myAudioLayer;
for (var i = 1; i <= myComp.numLayers; i++){
if (myComp.layer(i) instanceof TextLayer){
myTextLayer = myComp.layer(i);
try{
myAudioLayer = myComp.layer(myTextLayer.name + ".wav");
}catch (err){
myAudioLayer = null;
}
if (myAudioLayer == null) continue;
myTextLayer.startTime = myAudioLayer.inPoint;
myTextLayer.outPoint = myAudioLayer.outPoint;
}
}
}
adjustText();Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
