Skip to main content
Inspiring
August 12, 2021
Question

How to import exr via script

  • August 12, 2021
  • 1 reply
  • 676 views

I am able to import any image as a Footage into After Effects by script with `

im_opt = new ImportOptions(new File(image_path));
app.project.importFile(im_opt)` 

This is not working with importing .exrs, someone recommended import .exr as a comp (eg.with  ```im_opt.importAs = ImportAsType.COMP```

But that doesn't seem to work neither. Does anyone succeed with importing .exr via script?

Thanks.

This topic has been closed for replies.

1 reply

Inspiring
August 12, 2021

By 'not working' do you mean it imports but not as a sequence?

('not working' is my least favourite description of a problem!)

 

var theFile = File.openDialog();
im_opt = new ImportOptions(theFile);
im_opt.sequence = true;
app.project.importFile(im_opt);

 

Inspiring
August 13, 2021

Sorry, my bad. "not working" meant it was not imported at all.

Inspiring
August 13, 2021

It's hard to know what the issue might have been without seeing the image_path.

But my example worked as expected for me and you can always examine the file path in there with something like this after the File.openDialog which may give you some insight into what was wrong before.

 

alert(theFile.fsName);

alert(File.decode(theFile.absoluteURI));