🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.after.effects.scripting.render
2 messages
2 total messages Started by david_van_brink Sun, 11 Feb 2007 00:28
renderQueueItem.duplicate() ... still done?
#110
Author: david_van_brink
Date: Sun, 11 Feb 2007 00:28
28 lines
1432 bytes
I'm trying to write a script called "rerenderLastItem", which will duplicate the last item of the Render Queue and start rendering.



 
var lastIndex = app.project.renderQueue.numItems; 
var renderQueueItem = null; 
if(lastIndex > 0) 
{ 
    renderQueueItem = app.project.renderQueue.item(lastIndex).duplicate(); 
    //app.project.renderQueue.render();  // skip for now... 
} 
else 
{ 
    alert("No items in Render Queue"); 
}





The problem is that the new item in the queue is marked "Done".

I tried renderQueueItem.status = RQItemStatus.QUEUED; but sure enough, it is read-only just like the documentation claims.

Help, help. Thanks!

(And once I get past that, is there a way to script, "Do the render, and Yes to overwrite any existing render files please." ? )
Re: renderQueueItem.duplicate() ... still done?
#111
Author: Dan_Ebberts
Date: Sun, 11 Feb 2007 01:13
35 lines
1641 bytes
Hmmm.... that's not too useful. You might have to do it the hard way. Something like this:





 
var lastIndex = app.project.renderQueue.numItems;  
if(lastIndex > 0)  
{ 
  var renderQueueItem = app.project.renderQueue.item(lastIndex);   
  var myRQItem = app.project.renderQueue.items.add(renderQueueItem.comp); 
  myRQItem.applyTemplate(renderQueueItem.templates[0]); 
  var OM = renderQueueItem.outputModule(1); 
  var myOM = myRQItem.outputModule(1); 
  myOM.file = OM.file; 
  myOM.postRenderAction = OM.postRenderAction; 
  myOM.applyTemplate(OM.name); 
  myRQItem.timeSpanStart = renderQueueItem.timeSpanStart; 
  myRQItem.timeSpanDuration = renderQueueItem.timeSpanDuration; 
  app.project.renderQueue.render(); 
}  
else  
{  
    alert("No items in Render Queue");  
}  






I think it will render on top of any files with the same name without complaining.

Dan
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads