Mailing List AE-List@media-motion.tv ? Message #49085
From: Louai Abu-Osba <me@louai.org>
Subject: executing an AE script from Python 2.7
Date: Wed, 15 May 2013 12:33:37 -0400
To: After Effects Mail List <AE-List@media-motion.tv>
I'm trying to execute an AE script from Python and it doesn't appear
that the script argument is passing correctly. I'm using Windows 7
with Python 2.7.

If I use cmd.exe or powershell and try "afterfx -r
D:\pipeline\tests\tactic_ae\hello.jsx" I get my "hello world" alert in
the AE UI.

However, if I try executing in Python:
subprocess.call(["afterfx","-r","D:\pipeline\tests\tactic_ae\hello.jsx"])
The AE UI takes focus but no alert appears. The strange part is if I
try to do something invalid like remove the -r flag:
subprocess.call(["afterfx","D:\pipeline\tests\tactic_ae\hello.jsx"])
I get an AE error: After Error Can't import file "hello.jsx":
unsupported filetype or extension

Anyone know why the alert won't display when run from Python? Thanks!

-louai
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster