Skip to main content
Participant
August 20, 2020
Question

ExtendScript - Import individual compositions from .aep-Projects

  • August 20, 2020
  • 5 replies
  • 1270 views

Is it possible to import individual Compositions from a external .aep-Project?

It is very easy to import a complete Project-Folder with 

 

app.project.importFile(new ImportOptions(projectFile));

 

but what if i would like to iterate through the compositionsof the desired project, i.e. searching for a composition by a specific compositionName that will be imported to the project.

 

 

5 replies

Inspiring
February 17, 2025

did you find any solution my friend ??

Mathias Moehl
Community Expert
Community Expert
August 24, 2020

If you don't know in advance which comps from which projects you need to import, shachar carmi's suggestion (import the entire project and delete all unneeded items) is the only option. You need to make sure to not delete precomps that are part of the comp you want to keep. Hence deleting is probably done best using the Reduce Project menu command using app.executeMenuCommand.

So the steps would be

  1. save your project
  2. open the project you want to import the comp from
  3. select the comp you want ot import and Reduce Project
  4. save project with a new name
  5. open original project from step 1 again
  6. import project saved in step 4
Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Justin Taylor-Hyper Brew
Community Expert
Community Expert
August 22, 2020

Tom's is the easiest approach for a user-based solution, Shachar's is the most straightforward way with the core API.

If you're up for a challenge, you can look into AEPX files, which are basically After Effects files saved as XML. If you had your original files saved as AEPX, you could find the comp you want and generate a new file with just that comp, and then import it. This is undocumented and takes some trial and error. 

Community Expert
August 21, 2020

you could import the project and then delete all unneeded items.

Tomas Sinkunas
Legend
August 20, 2020

That's not possible out of the box.

You'd need to save your comps as individual projects first, by using Save Comp as Project https://aescripts.com/save-comp-as-project/ or by converting each composition into an executable JSX code with compCode https://aescripts.com/compcode

 

Cheers.