Hi everyone and as always, thank you in advance for all your help!
I wanted to learn more about how to use the Progress Bar in Extend Script, So I created a user interface that allows me to render the current project, and similar to the AE render queue, I would like to also include a Progress Bar to my GUI Window that replicates the progress bar from the render queue. Attached is a picture of the window I created. What I am not sure of is how to connect the Progress bar to the current comp being rendered...
In the actual AE Render Queue, when you click to render a comp, it uses the progress bar based on the initial comp frame, end frame of comp and current frame..., So, I went into the AE Scripting guide and I looked into the renderQueue attributes and I was not able to find an attribute for the current frame being rendered, so thought maybe if I use the comp.time, work Area Start and End might get me somewhere... but then I noticed that the progress bar will not run simultaneously with the render... it will wait till the render finishes and then run the progress bar... anyways, not sure how to accomplish this...
// This is what I started coding to test the progress bar while also trying to render simultaneously.... but does not work it finishes rendering and then runs the progress bar...
bttn_s5Group3_doRender.onClick = function(){
rd_RenderLayers_doRenderLayers(true); //This function is used to render the comp, I also tried putting this while loop inside the function, but same results.
while(progressBar.value < progressBar.maxvalue) //Dummy Progress Bar.
{
progressBar.value++;
$.sleep(10);
}
}
// This is what I was coding trying to get the Progress Bar to show current frame being rendered... but also, does not work... Obviously, I have no idea what Im doing.
var compToRender = app.project.renderQueue.item(i).comp;
var compToRenderCurrTime = compToRender.time;
var compToRenderStart = compToRender.workAreaStart;
var compToRenderDur = compToRender.workAreaDuration;
var compToRenderEnd = compToRender.workAreaDuration + compToRender.workAreaStart;
bttn_s5Group3_doRender.onClick = function(){
while(progressBar.value < progressBar.maxvalue)
{
compToRenderStart = progressBar.minvalue
progressBar.maxvalue = compToRenderEnd;
progressBar.value = compToRenderCurrTime;
myWin.update();
};
rd_RenderLayers_doRenderLayers(true); // This function renders
};
Once again, thank your help!
Fabio