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

Collecting Export Parameters from a Graph with the Python API

New Here ,
Jan 04, 2023 Jan 04, 2023

Copy link to clipboard

Copied

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.png

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

Views

37

Likes

Translate

Translate

Report

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
New Here ,
Jan 04, 2023 Jan 04, 2023

Copy link to clipboard

Copied

LATEST

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>


 

Likes

Translate

Translate

Report

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