Skip to main content
Participant
December 23, 2021
Answered

Move file from Project Panel to Composition using extendScript

  • December 23, 2021
  • 2 replies
  • 1342 views

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

This topic has been closed for replies.
Correct answer Paul Tuersley

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

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

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

 

 

 

 

2 replies

Paul TuersleyCorrect answer
Inspiring
December 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

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

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

 

 

 

 

Participant
December 24, 2021

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 🙂

Mylenium
Legend
December 23, 2021

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

Participant
December 24, 2021

Hello Sir!

 

I hope you are doing well. 🙂

 

Thanks a lot for the pointer & your suggestion.