Skip to main content
Participant
October 22, 2022

getProjectExportPreset inaccurate results

  • October 22, 2022
  • 0 replies
  • 150 views

When running the getProjectExportPreset() call in JavaScript the value reported back is the value saved to the Project, not what the user selected in the UI when running the export. Can someone confirm this and let me know how to get the value at execution of the Export Textures dialog. Attached is a picture that shows the value of "Output template" when the UI is first launched, when I change the value, and the printed results of the following code:

var preset = alg.mapexport.getProjectExportPreset()
alg.log.info("Testing presets...")
alg.log.info(preset)

The same result happens when I run the following in Python:

js_code = 'alg.mapexport.getProjectExportPreset()'
template = substance_painter.js.evaluate(js_code)
print(template)

 Please advise on how to get this value in Python, if possible.