Move file from Project Panel to Composition using extendScript

Community Beginner ,
Dec 23, 2021 Dec 23, 2021

Copy link to clipboard

Copied

Hi everyone!

I hope you all are doing well.

I am new here and recently started to learn AE Scripting.

I need guidance in something I am creating. So the question is:

How can I insert an image file into a specific composition from the project panel using extendScript?

Waiting for the help.

Thanks

TOPICS
Scripting

Views

489

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
community guidelines

correct answers 1 Correct answer

Enthusiast , Dec 23, 2021 Dec 23, 2021

As Mylenium said, you use the add() method. But to give you a few more pointers, it's basically:

myComp.layers.add(myItem);

 

But you'll also need to learn enough about scripting to grab those footage item and comp objects first, whether that's locating them by name, by whether they're currently selected, etc. The code in the correct answer on this post finds them by name:

https://community.adobe.com/t5/after-effects-discussions/help-me-to-move-a-image-to-another-composition-using-extendscript/td-p/9786730

...

Likes

Translate

Translate
Adobe Community Professional ,
Dec 23, 2021 Dec 23, 2021

Copy link to clipboard

Copied

You don't move anything, you just use the respect add...() functions and methods from the project and comp collections. I suggest you refer to the scripting guide or freely available example scripts.

 

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
community guidelines
Community Beginner ,
Dec 23, 2021 Dec 23, 2021

Copy link to clipboard

Copied

Hello Sir!

 

I hope you are doing well. 🙂

 

Thanks a lot for the pointer & your suggestion.

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
community guidelines
Enthusiast ,
Dec 23, 2021 Dec 23, 2021

Copy link to clipboard

Copied

As Mylenium said, you use the add() method. But to give you a few more pointers, it's basically:

myComp.layers.add(myItem);

 

But you'll also need to learn enough about scripting to grab those footage item and comp objects first, whether that's locating them by name, by whether they're currently selected, etc. The code in the correct answer on this post finds them by name:

https://community.adobe.com/t5/after-effects-discussions/help-me-to-move-a-image-to-another-composit...

And here's a link to the scripting guide with the relevant layer collection section:

https://ae-scripting.docsforadobe.dev/layers/layercollection.html

 

 

 

 

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
community guidelines
Community Beginner ,
Dec 23, 2021 Dec 23, 2021

Copy link to clipboard

Copied

LATEST

Hello Sir!

 

I hope you are doing well. 🙂

 

Thanks a lot for the bit more detailed help & for these references. 

 

It really helped me a lot and I was succeeded to achieve my goal.

 

Thanks a lot 🙂

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
community guidelines