How do I add multiple selected comps to the render queue via Extend Script?
I have an ScriptUI button that adds a single selected comp to the render queue and applies an Output module and Render module…
var comp = app.project.activeItem;
var item = app.project.renderQueue.items.add(comp);
var outputModule = item.outputModule(1);
outputModule.applyTemplate("Multi-Machine Sequence TIFF 8 Bit RGB");
item.applyTemplate("Multi-Machine Settings");
However I need to make it work for multiple selected comps.
I tried a modified version using app.executeCommand(2161); which is the Command ID for 'Add to Render Queue' but that feels like cheating haha. In any case, it doesn't quite work. It adds multiple comps, but it doesn't change the Output module. Maybe my variable syntax is wrong…
app.executeCommand(2161);
var item = app.project.renderQueue.items;
outputModule.applyTemplate("Multi-Machine Sequence TIFF 8 Bit RGB");
item.applyTemplate("Multi-Machine Settings");
