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
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:
...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
Copy link to clipboard
Copied
Hello Sir!
I hope you are doing well. 🙂
Thanks a lot for the pointer & your suggestion.
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:
And here's a link to the scripting guide with the relevant layer collection section:
https://ae-scripting.docsforadobe.dev/layers/layercollection.html
Copy link to clipboard
Copied
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 🙂