Quick breakdown:
I'm setting up a script to prepare AE scripts for a film pipeline. What I want to do is render the output as an image sequence, then import the image sequence and render it out to a preview mov for our dailies process.
I've built and installed templates on all relevant machines, but I'm having problems using the Post Render Actions in the script.
When "Import and Replace Footage" is selected as a post render action, it defaults to replacing "this comp". What I need it to do is replace the placeholder I'm creating in the script instead. Here's what I have so far:
{
// Main Output Module
var MLtemplate = "Main_Output";
// Main Render Settings
var MLsettings = "Main_Output";
// Preview Output Module
var MPtemplate = "Main_Preview";
// Preivew Render Settings
var MPsettings = "Best Settings";
// Setting variable to highlighted item/comp
var activeItem = app.project.activeItem;
if (activeItem != null && activeItem instanceof CompItem) {
// Adding the active item to the render queue and applying the specified templates to the output module
var theRender = app.project.renderQueue.items.add(activeItem);
theRender.applyTemplate(MLsettings);
theRender.outputModules[1].applyTemplate(MLtemplate);
theRender.outputModules[1].postRenderAction = PostRenderAction.IMPORT_AND_REPLACE_USAGE;
// Adding a placeholder to be replaced by the footage from theRender's output.
var depRender = app.project.importPlaceholder("renderPreview",activeItem.width,activeItem.height,activeIt em.frameRate,activeItem.duration);
depRender.source = theRender.outputModules[1].file;
// Arbitrarily guessing at the argument for specifying the target of theRender's "Import and Replace Usage".
// this currently isn't working.
theRender.outputModules[1].postRenderAction.target = "renderPreview";
} else {
alert("Select the comp you want to render first");
}
}
Any thoughts?