So the first solution provided by Hector Vera does not work for the moment.
No, I do not want to directly import an image into the timeline. I have this image in my present panel project.
I just want to use it via a script to import it into my timeline 🙂
Here is what I have:
– 1 composition already created which is called “comp”
– My file “my_picture.jpg” in the panel project
When I do this:
// alert with comp name works
alert(comp.name);
// this does not create an image layer for me even though imageFilePath points to the correct photo on my computer
var imageFilePath = ‘/Users/clara/Movies/AE/Images/my_picture.jpg’;
var layer = comp.addLayer(“My Image Layer”);
var importResults = layer.file.importFile(imageFilePath);
Thank you in advance both of you 🙂