Skip to main content
Participant
February 9, 2022
Answered

Output Size of Graph Relative to Parent

  • February 9, 2022
  • 2 replies
  • 1070 views

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:

 


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

This topic has been closed for replies.
Correct answer Luca Giarrizzo

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.

 

2 replies

Inspiring
May 4, 2022

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

Inspiring
May 5, 2022
Luca Giarrizzo
Community Manager
Luca GiarrizzoCommunity ManagerCorrect answer
Community Manager
February 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.

 

Luca Giarrizzo | Quality Engineer - Substance 3D Designer | Adobe
Participant
February 10, 2022

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 🙂

Luca Giarrizzo
Community Manager
Community Manager
February 11, 2022

Hello Michael,

 

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

 

Best regards.

 

Luca Giarrizzo | Quality Engineer - Substance 3D Designer | Adobe