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

Save a Project as a Copy (After Effects Scripting)

Engaged ,
Jan 26, 2019 Jan 26, 2019

I was wondering if there way any way to save a project as a copy through ExtendScript.  I know that a project can be saved in this manner:

app.project.save(File(aep_path));

But this is not identical to saving a copy because then the project that's currently active in After Effects becomes whatever I just saved to, instead of staying at whatever it was previously.

Is there any way to get the exact same effect of "save a copy" through After Effects scripting?  Thanks.

This is what I'm referring to; I want this functionality in scripting:

i4cC9U7.png

Is this possible?  If so, how?  I see no references to it in any of the After Effects scripting guides.

TOPICS
Scripting
4.2K
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
Advocate ,
Jan 26, 2019 Jan 26, 2019

A quick search reveals a few useful topics:

Save as "Copy"

Save a Copy

"Save as a copy" script

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
Engaged ,
Jan 27, 2019 Jan 27, 2019

Although none of those solutions were quite what I was looking for, I did come up with a solution that works well enough for my purposes (the only caveat being that it assumes the original project was saved, which is okay in my situation).

var orig = app.project.file

aep_path = containingfolder + "\\aeps\\" + title;

app.project.save(File(aep_path));

app.open(orig) // open up the original template after saving

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 Beginner ,
Mar 01, 2020 Mar 01, 2020
LATEST

Hi, thanks for your impulses. Is your script supposed to work like this? Because for me it doesn't. I am new to scripting - I am pretty advanced in expressions, so I am not a complete JavaScript idiot - But I find it very hard to find the correct commands for my tasks, as simple as they may be. Would you mind posting your actual working script so I can understand better how to set up the 'aep_path' variable so I can get it to work? Any ideas to my questions below will be much appreciated!!

 

All I want to make my script do is:

-Reduce the project to the selected comp

-Save is as a copy, prompt dialogue where to save it, use the Comps name String as Filename

-Return to the unreduced project (Better stay within the project an perform an Undo)

 

This is for interchanging assets between projects.

I know there is a Script called "Save Comp As Project", which appears to be great. But I don't need it's full functionality, and the 29$ seem a little exaggerated.

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