Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Creating After Effects Project from Script

New Here ,
Jul 09, 2020 Jul 09, 2020

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
510
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 09, 2020 Jul 09, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 10, 2020 Jul 10, 2020
LATEST

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

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines