Skip to main content
SWAX
Inspiring
October 17, 2018
Answered

Loading .epr file from panel - what relative path?

  • October 17, 2018
  • 1 reply
  • 1240 views

I want to render clips using a predefined preset. It works fine when using an absolute path (e:\path\preset.epr). But I want to include this epr file inside the panel directory.

Where should I put it? And how do I reference it properly?

I tried this: Added it to the jsx directory, and referenced it using the code below. Doesn't seem to work.

var encode = app.project.activeSequence.exportAsMediaDirect(localdir+app.project.activeSequence.name+"-0"+marker_index+".mp4", "./render.epr", app.encoder.ENCODE_IN_TO_OUT);

This topic has been closed for replies.
Correct answer Eli Portell9548531

I haven't found .jsx files within a panel to be 'aware' of where they are actually located, so you can give them an absolute path instead and pass it over from your HTML.

var cs = new CSInterface;

var panelPath = cs.getSystemPath(SystemPath.EXTENSION);

var eprPath = path +"/jsx/render.epr"

1 reply

Eli Portell9548531
Eli Portell9548531Correct answer
Inspiring
October 17, 2018

I haven't found .jsx files within a panel to be 'aware' of where they are actually located, so you can give them an absolute path instead and pass it over from your HTML.

var cs = new CSInterface;

var panelPath = cs.getSystemPath(SystemPath.EXTENSION);

var eprPath = path +"/jsx/render.epr"

Bruce Bullis
Legend
October 17, 2018

Eli's approach looks good. PProPanel uses an .epr file, from within the panel directory:

https://github.com/Adobe-CEP/Samples/blob/20b08ed3b2353d7a1ecca9e0b37cf677972cfb59/PProPanel/index.html#L151