Highlighted

Creating After Effects Project from Script

New Here ,
Jul 09, 2020

Copy link to clipboard

Copied

Is it possible to create an after effects project from writing a script and then calling that script from outside of After effects. 

 

I tried using this in my script: 

var currentProject = (app.project) ? app.project: app.newProject();

 

but I get the error that "app is not defined"

 

Topics

Scripting

Views

32

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Creating After Effects Project from Script

New Here ,
Jul 09, 2020

Copy link to clipboard

Copied

Is it possible to create an after effects project from writing a script and then calling that script from outside of After effects. 

 

I tried using this in my script: 

var currentProject = (app.project) ? app.project: app.newProject();

 

but I get the error that "app is not defined"

 

Topics

Scripting

Views

33

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Jul 09, 2020

Copy link to clipboard

Copied

app.project is a collection and even with no assets or comp, the project itself already exists, so I'm not sure what you are trying to do there. It's pretty much irrelevant, since AE doesn't auto-open the last projects like some programs do, anyway, so you're always operating on a blank, unsaved project to begin with and are free to do whatever you fancy.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 10, 2020

Copy link to clipboard

Copied

What exactly do you mean with "calling a script from outside of After Effects"?

You can ask Ae to execute scripts via the command line i.e.

afterfx -r c:\script_path\example_script.jsx

If you are talking about executing some JavaScript outside of After Effects (like using node), there will be no app object, of course. To execute Ae scripts from node, you can use

https://www.npmjs.com/package/after-effects

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...