Forum Replies Created

  • Vahur Kuusk

    December 1, 2019 at 5:06 pm in reply to: Automatically set “Output to” to correct folder

    Thank you Tomas, that worked perfectly.
    .toString() is what I missed.

  • Vahur Kuusk

    November 29, 2019 at 9:09 am in reply to: Automatically set “Output to” to correct folder

    I am adding it directly into the Kbar as a scriptlet. I press the custom button and it start rendering.

  • Vahur Kuusk

    November 22, 2019 at 8:22 pm in reply to: Automatically set “Output to” to correct folder

    Thank you, Dan.

    For some reason, I still got an “directory does not exist” error when trying
    myFootage.mainSource.path;

    However I managed to solve it temporarily using file name substrings.

    This is not ideal, because I can only use it on this project, but if there is a way to make it not dependent on substrings, I am all ears.

    —-

    Also, why I had to set second item (2) for “myFootage” is beyond me, because in the project bin the footage is clearly first from top. But this is the only way I got the script to run. Weird.

    var myComp = app.project.activeItem;
    var myFootage = app.project.item(2);
    var myFolder = myFootage.mainSource.file;
    var myLoc = myFolder.path.substring(0,49);
    var rq = app.project.renderQueue;
    var render = rq.items.add(myComp);

    render.outputModules[1].file = new File(myLoc + "/" + myComp.name + ".mp4");
    app.project.renderQueue.render()

  • Vahur Kuusk

    November 22, 2019 at 1:59 pm in reply to: Automatically set “Output to” to correct folder

    Here’s what I have now. It gets me to render queue with correct file name, however the folder is still messed up. When I press render AE says:
    “The directory originally specified in the selected output module no longer exists.”

    Clearly I’ve missed something. Any help is appreciated.

    var myComp = app.project.activeItem;
    var myFootage = app.project.item(1);
    var myFolder = myFootage.parentFolder.path;
    var rq = app.project.renderQueue;
    var render = rq.items.add(myComp);

    render.outputModules[1].file = new File(myFolder + "/" + myComp.name + "[DRAFT].mp4");

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