Python importing resource duplication issue
Hi, I am working on a tool in python that imports an Export Preset and then uses it to export the maps based on that.
An issue I am facing at the moment is that when I import the "ExportPresetExample.spexp" existing preset from a specified path into the shelf, that preset gets imported everytime Painter opens.
Whenever it loads the plugin, it adds another duplicate of it inside the assets folder ending up with multiple versions of the same preset.
Below is the part of the code that is causing this.
my_shelf=substance_painter.resource.Shelf("your_assets")
Export_Preset=my_shelf.import_resource("C:/Users/darius/Desktop/PaintExportTest/ExportPresetExample.spexp", substance_painter.resource.Usage.EXPORT)
Inside the python documentation under the Shelves tab, for import_source there is a flag called uuid.
uuid (str, opional) – An optional uuid. If a resource already exists with the same uuid, it will be replaced.
I have tried using this flag but I cannot seem to get the it working.
Does anybody know how the uuid flag should look so that the plugin replaces the imported preset file instead of adding another one?
Thank you very much
