Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Progress Bar to show the comp render progress

  • Progress Bar to show the comp render progress

    Posted by Fabio Apelbaum on May 10, 2016 at 8:39 pm

    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…

    Once again, thank your help!

    Fabio

    // 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.

    // UI
    var bttn_s5Group3_doRender = s5_G2_Group3.add("button", [0,0,580,30], "Render");
    var progressBar = s5_G2_Group3.add("progressbar",[0,0,580,8],0,100,"Progress Bar")

    //Button
    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 };

    Jorge Froberg replied 9 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Jorge Froberg

    July 25, 2016 at 12:25 pm

    This is probably a very late reply for you, but I don’t think this is possible. I’ve been looking in to this today as well, but the issue here is that your script sort of pauses when AE is rendering. So even if there was a way of getting that value, there would be no way to retrieve the information and do something with this in real time.

    I hope I’m wrong on this one and you somehow already figured out how to do this. If that’s the case, please share!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy