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

Export textures using Python?

Community Beginner ,
Aug 20, 2024 Aug 20, 2024

I'm working on some Substance Designer pipeline tools and saw in the API reference an export function: sd.tools.export.exportSDGraphOutputs(aSDGraph, aOutputDir='', aFileExt='png'). This is exactly what I need but when I tested it out in the Python Editor Substance Designer returned:

 

[ERR][9]module 'sd.tools' has no attribute 'export'

 

 When I ran dir() on the sd.tools it does seem that this export module does not exist:

 

[MSG][3]['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'graphlayout']

 

 Was this functionality moved?

TOPICS
Scripting
305
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

correct answers 1 Correct answer

Community Beginner , Aug 20, 2024 Aug 20, 2024

I figured this out. I went through some of the examples more thoroughly and noticed this:

from sd.tools import io

 So I tested out this convention and the call actually does work when imported as:

from sd.tools import export
Translate
Community Beginner ,
Aug 20, 2024 Aug 20, 2024

Forgot to mention, but here is the version I'm on: 14.0.0 build 8074 commit 90a793f8 Release (07/22/2024)

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 ,
Aug 20, 2024 Aug 20, 2024
LATEST

I figured this out. I went through some of the examples more thoroughly and noticed this:

from sd.tools import io

 So I tested out this convention and the call actually does work when imported as:

from sd.tools import export
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