Highlighted

ExtendScript - Import individual compositions from .aep-Projects

New Here ,
Aug 20, 2020

Copy link to clipboard

Copied

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.

 

 

TOPICS
Expressions, Scripting, SDK

Views

75

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

ExtendScript - Import individual compositions from .aep-Projects

New Here ,
Aug 20, 2020

Copy link to clipboard

Copied

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.

 

 

TOPICS
Expressions, Scripting, SDK

Views

76

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
Aug 20, 2020 0
Adobe Community Professional ,
Aug 20, 2020

Copy link to clipboard

Copied

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.

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...
Aug 20, 2020 1
Adobe Community Professional ,
Aug 21, 2020

Copy link to clipboard

Copied

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

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...
Aug 21, 2020 1
Adobe Community Professional ,
Aug 21, 2020

Copy link to clipboard

Copied

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. 

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...
Aug 21, 2020 0
Adobe Community Professional ,
Aug 23, 2020

Copy link to clipboard

Copied

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

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...
Aug 23, 2020 0