Render from AE to AME one by one with extendscript
Hello, I am trying to write an automated renderer script that sends comps from AE to AME to render in mp4 format, with this code
function AMErender(comp, outPath) {
var bt = new BridgeTalk();
if(!BridgeTalk.isRunning("ame")){
BridgeTalk.launch("ame-14.0", "background")
}
var project = app.project;
var renderItem = project.renderQueue.items.add(comp)
renderItem.outputModule(1).file = File(outPath);
project.renderQueue.queueInAME(true);
}
Everything works fine, but "AMErender(comp, outPath)" function is running inside a loop and when I run script I get all comps that I want to render in one queue, both in ae and ame:


But I want the comps to be added and rendered one by one:
1. comp is added to ae render queue;
2. comp is rendered in ame
3. comp is removed both from ame and ae queues
4. repear for next comp
How is it possible to do?
