Skip to main content
Hey Evgenii
Inspiring
March 25, 2024
Answered

ppro extendscript get platform specific path to .epr files

  • March 25, 2024
  • 1 reply
  • 560 views

Hello
is there a way to get platform specific path to render presets (.epr files) in ppro?

Currently I am looping through: 
'var exporters = app.encoder.getExporters();'
and via: '
var presets = exporters[i].getPresets();'

I am getting needed epr preset by name and then using method
preset.writeToFile(eprPathToWrite);
I am creating the tmp epr file,  however it always creates issues with 
seq.exportAsMediaDirect() at first run as probably 'writeToFile' is async 

is there any better way or maybe is there a way to wait to async forwriteToFile()?

Thank you,
Evgenii

This topic has been closed for replies.
Correct answer Bruce Bullis

That makes sense, thanks. 

If you search PProPanel's directory for "copypresets", you'll see some JavaScript that copies from /PProPanel/payloads, to the correct directory; you could do something similar with .epr files.


1 reply

Bruce Bullis
Community Manager
Community Manager
March 25, 2024

Confirming: You're calling a function with a file path parameter, without waiting for the writing of that file to be complete?

Why do you need to copy .epr files, for every export?

Hey Evgenii
Inspiring
March 25, 2024

My bad, 
apparently the issue was to 

var fileExtension = "." + seq.getExportFileExtension(eprPath);
that was assigned before the writing the file at location so exports were filename.undefined

I was trying to understand if there a way to get the path to the original epr files, but I didn't found anything so I had to create epr file in temporary folder and to use path to that epr file in
exportAsMediaDirect(). The user can remove the folder so if it happens new epr file is created

I could simply embed the epr file into extension folder but I am not sure how version compatibale epr files, I am not sure if if it will work on newer ppro versions 
Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
March 25, 2024

That makes sense, thanks. 

If you search PProPanel's directory for "copypresets", you'll see some JavaScript that copies from /PProPanel/payloads, to the correct directory; you could do something similar with .epr files.