Skip to main content
TeaspoonVFX
Participant
November 15, 2014
Question

Adding an additional Output Module to an existing submission

  • November 15, 2014
  • 1 reply
  • 329 views

I'm writing a script to submit multiple cropped areas of a composition.

I've gotten it to submit each section as a new render submission, but I'd like to have one comp submission with multiple Output Modules.

Is there something like app.project.renderQueue.item.outputModule.add()  function?

Thanks!

This topic has been closed for replies.

1 reply

Participant
November 19, 2014

Hey There.

You've pretty much got it. You can use the .add() method on the app.project.renderQueue.item(index).outputModules collection object. The key is the S at the end. Something like this.

var curOMs = app.project.renderQueue.item(1).outputModules;

var newOM = curOMs.add();

//do stuff to newOM.

Something that I find useful to do when I am wondering what methods/properties are available to me (especially when the scripting guide seems incomplete) is to run a script to tell me what's available. I save something like the below code in ETSK and just change the 'theObj' variable to whatever I'm curious about.

var theObj = app.project.renderQueue.item(1).outputModules;

for (var prop in theObj){

    if(theObj.hasOwnProperty(prop)){

        alert(String(prop) + ":" + String(theObj[prop]));

    }

}

This will return a series of messages telling you what properties are available (in the above example, the only one is "add") as well as the description/current value of that property.

Hope this was helpful. Happy coding!

TeaspoonVFX
Participant
November 19, 2014

Sweet!  I'll give it a try.

Thanks for the tip on finding the methods/properties.

~tsp