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

Collecting Export Parameters from a Graph with the Python API

Community Beginner ,
Jan 04, 2023 Jan 04, 2023

I am working on a Python-based Exporter that will interface with our Version Control software and Content Management systems to Check Out, Add, and Configure Textures output by a Graph.


I have been able to get some rudimentary support for this working by adapting the code found here:

export module

sd.tools.export.exportSDGraphOutputs(aSDGraph, aOutputDir='', aFileExt='png')

Export the textures of the output node of the specified sSDGraph :param aSDGraph: The graph that contains the outputs to export :param aOutputDir: The output directory used to save the output’s images :return: True if succeed else False


However, this code doesn't seem to use the information defined in the Export Outputs... options.

Robert27802883xxo9_0-1672857192696.pngexpand image

Is it possible for me to Query the Destination, Pattern, Output State and Exported Color Space parameters with the Python API?

Thanks.

TOPICS
Import & Export , Scripting , Substance Graph
551
Translate
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
Community Beginner ,
Jan 04, 2023 Jan 04, 2023

I was able to discover that these values are stored in the SBS file, which is just XML. I suppose I could load the SBS with an XML library and parse it myself to look for the relevant data...

For example:

<option>
  <name v="export/fromGraph/pattern"/><value v="$(graph)_$(identifier)"/>
</option>


 

Translate
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
Community Beginner ,
Jun 22, 2023 Jun 22, 2023
LATEST

thats good to know 🙂 in my case i want to treat each output different, is it possible to run export per output so i can say one ouput is tga and other is png?

Translate
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