Skip to main content
Participant
July 5, 2021
Answered

Using Python to develop Export tool

  • July 5, 2021
  • 1 reply
  • 623 views

I write according to the contents of the document, but in the export phase. Export presets need to be configured.

 

 

    export_preset = substance_painter.resource.ResourceID(
        # context="allegorithmic", name="PBR Metallic Roughness")
        context="allegorithmic",
        name="SP—UE4 Tile UDIMs(TextureSet)")

 

 

I created a set of presets based on the documentation,the name is SP—UE4 Tile UDIMs(TextureSet) .When I try to use this preset in my code,Code execution error.

 

[Python] For exportList item #0, the preset "resource://allegorithmic/SP—UE4 Tile UDIMs(TextureSet)" is undefined

 

How do I use local default files with python

This topic has been closed for replies.
Correct answer Léna Piquet Froyok

When building the resource ID you need to provide the right context. In the example "allegorithmic" is the name of the Shelf for the default content, your export preset is not stored there but instead in the location where you can save new resources (usually the user Shelf location named "shelf" by default).

1 reply

Léna Piquet Froyok
Adobe Employee
Léna Piquet FroyokCorrect answer
Adobe Employee
July 8, 2021

When building the resource ID you need to provide the right context. In the example "allegorithmic" is the name of the Shelf for the default content, your export preset is not stored there but instead in the location where you can save new resources (usually the user Shelf location named "shelf" by default).