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

Move file from Project Panel to Composition using extendScript

Community Beginner ,
Dec 23, 2021 Dec 23, 2021

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
1.1K
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

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

...
Translate
LEGEND ,
Dec 23, 2021 Dec 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

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

Hello Sir!

 

I hope you are doing well. 🙂

 

Thanks a lot for the pointer & your suggestion.

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
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-composit...

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

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

 

 

 

 

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 ,
Dec 23, 2021 Dec 23, 2021
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 🙂

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