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

Output Size of Graph Relative to Parent

Community Beginner ,
Feb 09, 2022 Feb 09, 2022

Copy link to clipboard

Copied

Good afternoon,

We're trying to ascertain the recommended output size of a graph with output size set to Relative to Parent when publishing sbs files.

Our artists would like to specify a prefered output size in the graph toolbar:

 

graph-default-size.png


...but capturing the size specified via the Substance Designer API is proving difficult. If the graph output size is set to Absolute, I can query the output size with this:

 

prop = graph.getPropertyFromId("$outputsize", SDPropertyCategory.Input)
size = graph.getPropertyValue(prop).get()

 

But if the graph output size is Relative to Parent, the value returned is always (0,0). Looking through the XML code in the sbs file, the value I'm trying to capture is 'defaultParentSize' in the graph options. Is there a way to query this with the SD API?

TOPICS
Scripting

Views

593

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

correct answers 1 Correct answer

Adobe Employee , Feb 10, 2022 Feb 10, 2022

Hello Michael,

 

Indeed, the defaultParentSize property of a SDSBSCompGraph object is currently not exposed to the Python API. We agree it is a useful addition and we plan to expose it in a future version of Designer. I appreciate your patience in the meantime!

 

Best regards.

 

Votes

Translate

Translate
Adobe Employee ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

Hello Michael,

 

Indeed, the defaultParentSize property of a SDSBSCompGraph object is currently not exposed to the Python API. We agree it is a useful addition and we plan to expose it in a future version of Designer. I appreciate your patience in the meantime!

 

Best regards.

 

Luca Giarrizzo | Quality Engineer, 3D & Immersive | Adobe

Votes

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
Community Beginner ,
Feb 10, 2022 Feb 10, 2022

Copy link to clipboard

Copied

Hi Luca,

 

Appreciate the speedy reply!

 

While we're at it, is there any chance of the SDPackage's formatVersion & updaterVersion being exposed to the Python API?

That would help us with maintaining SAT compatibility 🙂

Votes

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
Adobe Employee ,
Feb 11, 2022 Feb 11, 2022

Copy link to clipboard

Copied

Hello Michael,

 

This request makes sense. We shall expose these properties as well!

 

Best regards.

 

Luca Giarrizzo | Quality Engineer, 3D & Immersive | Adobe

Votes

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
Explorer ,
May 04, 2022 May 04, 2022

Copy link to clipboard

Copied

@Michael Fessenden Did you ever figure out a workaround for this? I'm trying to do something similar and hit the same wall.

Votes

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
Explorer ,
May 04, 2022 May 04, 2022

Copy link to clipboard

Copied

LATEST

I came up with a hacky workaround in case anybody else runs into this issue: 

https://community.adobe.com/t5/substance-3d-designer-discussions/python-api-question-any-way-to-get-...

Votes

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