Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Access which comp gets replaced using PostRenderAction.IMPORT_AND_REPLACE_USAGE?

$
0
0

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?


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>