Problem Executing Script As Windows Service

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
crimsonc
Posts: 5
Joined: May 7th, 2007, 4:39 pm

So I've got a windows service setup to run jobs on render farm machines. We're running Maya, python, and aerender this way, no problems. I'm now moving into getting AfterFX.exe running this way as well, to automatically build comps, add layers to comps, etc. My first little test script worked fine.

Code: Select all

app.exitAfterLaunchAndEval = true;
app.beginSuppressDialogs();
app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
app.newProject();
var f = new File("\\\\server\\target\\108\\testComp.aep");
app.project.save(f);
app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
app.quit();
If I add in some lines that input image sequences, it works fine as well. However, the following script fails to stop execution when it is run as a service. The AfterFX.exe process just hangs, using 0 CPU until it is manually killed.

Code: Select all

app.exitAfterLaunchAndEval = true;
app.beginSuppressDialogs();
app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
app.newProject();

var comp = app.project.items.addComp("Comp1", 720, 486, 0.9, 20.0, 25.0);

var f = new File("\\\\server\\target\\108\\testComp.aep");
app.project.save(f);
app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
app.quit();

Now, if I run this from the command line, normally, it completes just fine. But there is apparently something about running it as a service that causes it to hang for ever.

Anyone have any experiences like this and know how to fix it?

thanks,

jesse
crimsonc
Posts: 5
Joined: May 7th, 2007, 4:39 pm

Fixed. It's a lame ass bug too. Apparently, creating a new comp triggers the Tip of the Day window to open. And once this window opens, After Effects ignores all commands to quit! So logging in as the user that is running the job and changing the Tip of the Day preference to 'No' made everything work. Crappy software design.
Post Reply