post render script to move the rendered file

What type of scripts do you need?

Moderator: byronnash

Post Reply
julienrobert
Posts: 3
Joined: February 20th, 2015, 2:06 pm

I'm using After-effects Render engine to render automatically new projects coming inside a watched folder.
As soon as the files are rendered, I take them with another software (Max-Msp-Jitter) with a watch folder action which play them in a huge mosaic in real-time.

The problem is that After-effects creates the file been rendering before they are completely rendered and Max sees them and takes them before the end of the render.

I see 2 possible solutions for my problem:

1. is it possible to ask After-effects to not create the file while it's been rendering?
2. find a way to do a custom post render action that could move the file to another folder

any help?
julienrobert
Posts: 3
Joined: February 20th, 2015, 2:06 pm

Haven't found a solution yet...
julienrobert
Posts: 3
Joined: February 20th, 2015, 2:06 pm

Is it possible to call a command shell from an aescript?
runegan
Posts: 22
Joined: November 4th, 2016, 3:18 pm
Contact:

Here is a script that adds a comp to the renderqueue, sets its output file, watches the renderqueue item's status changes and when the item is done, uses the MacOS shell command "mv" to move the file to the correct location.

Code: Select all

function renderAndMoveFile( compToRender ) {
    var outputFolder = new Folder("~/Desktop/test"); // The folder where the file will be moved to

    var rqItem = app.project.renderQueue.items.add(compToRender); // Add comp to renderqueue
    rqItem.outputModules[1].file = new File("~/Desktop/newFile.mov"); // Set output to temp location

    rqItem.onStatusChanged = function() { // Watch for changes to item status changes
        if (this.status === RQItemStatus.DONE) { // Check if render is done
            system.callSystem("mv " + this.outputModules[1].file.fsName + " " + outputFolder.fsName); // Move file
        }
    };

    app.project.renderQueue.render(); // Start render
}
You can look at http://docs.aenhancers.com/renderqueue/ ... eue-render or http://docs.aenhancers.com/renderqueuei ... tuschanged to find out how to create a post-render action. And you can use http://docs.aenhancers.com/system/#system-callsystem to call a shell command from AE.
Post Reply