• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ppro extendscript get platform specific path to .epr files

Participant ,
Mar 25, 2024 Mar 25, 2024

Copy link to clipboard

Copied

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

TOPICS
How to , SDK

Views

308

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Mar 25, 2024 Mar 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.


Votes

Translate

Translate
Adobe Employee ,
Mar 25, 2024 Mar 25, 2024

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 25, 2024 Mar 25, 2024

Copy link to clipboard

Copied

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 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 25, 2024 Mar 25, 2024

Copy link to clipboard

Copied

LATEST

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.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines