Copy link to clipboard
Copied
Hi There,
I have a script that is adding a single comp to the render queue and applying a Render Setting template and Output Module template to the added render queue item. For some reason, I'm getting an error on the first line that reads:
app.project.renderQueue.items(1).applyTemplate("MY SETTINGS");
I've attached the error dialog image here:
Here's a portion of the script.
var currentProjectItem; var globalCompItemID; var renderCompItemID; for (var i=1; i <= app.project.numItems; i++) { currentProjectItem = app.project.item(i); if (currentProjectItem.name == "globals") { globalCompItemID = i; } else if (currentProjectItem.name == "!_FINAL RENDER") { renderCompItemID = i; } } //add the necessary preview render jobs app.project.renderQueue.items.add(app.project.item(renderCompItemID)); app.project.renderQueue.items(1).applyTemplate("MY SETTINGS"); <---THIS IS WHERE AE ERRORS app.project.renderQueue.items(1).outputModules[1].applyTemplate("MY SETTINGS"); app.project.renderQueue.items.add(app.project.item(renderCompItemID)); app.project.renderQueue.items(2).applyTemplate("MY SETTINGS"); app.project.renderQueue.items(2).outputModules[1].applyTemplate("MY SETTINGS"); app.project.renderQueue.items.add(app.project.item(renderCompItemID)); app.project.renderQueue.items(3).applyTemplate("MY SETTINGS"); app.project.renderQueue.items(3).outputModules[1].applyTemplate("MY SETTINGS");
The comp that I want to add is being added to the render queue, it just refuses to invoke the applyTemplate() method on the most recently added render queue item.
Any ideas why I'm getting this error?
Thanks!
I think from the line where the error occured on, you should be using renderQueue.item() instead of renderQueue.items() (except when you're adding something to the render queue).
Dan
Copy link to clipboard
Copied
I think from the line where the error occured on, you should be using renderQueue.item() instead of renderQueue.items() (except when you're adding something to the render queue).
Dan
Copy link to clipboard
Copied
Thank you, Dan--for your time and expertise. That was it.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now