Author Topic: [SOLVED] Specify Export Bitmap Pattern through scripting  (Read 1012 times)

I am currently writing a script to help exporting bitmaps through a quick designer setup in python using:

sd.tools.export.exportSDGraphOutputs(MyGraph, myPath, 'tga')

However, regardless my output node's identifier, the exported graph name is always:

$(graph)_output_#


Is there a way to customize export pattern in the code?  Couldnt find it anywhere on the API.

Currently if I rightclick->exprot as bitmap it will show that the Pattern is set to $(graph)_$(identifier).... and in the preview the exported texture is name as: PlacedHolder_N


Thanks!
Last Edit: May 14, 2019, 03:13:46 pm

Hello tsukimiyiandrew,

Thank you for reaching out to us!

Currently, the naming of output exports is not part of the internal API, thus the built-in functionality is pretty much set in stone.

However, the code responsible for this functionality is already written in Python, and should therefore be quite straightforward to copy/paste into your code, and modify it to suit your needs.

You can find that code in the 'export.py' script, located in '/resources/python/sd/tools' inside the Substance Designer install location.

For your information, our team is currently looking into ways to make this customisation available in the sd.tools.export.exportSDGraphOutputs class, and make it follow the same naming scheme as currently implemented (i.e. $(graph), $(identifier), $(index), etc.).

To follow up on the fixes and features implemented in the next releases of Substance Designer, you can take a look at the release notes available here.

We hope this was helpful!

Best regards,
Luca Giarrizzo
QA Analyst
Substance Designer Team