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:
...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?
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.
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.
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 🙂
Copy link to clipboard
Copied
Hello Michael,
This request makes sense. We shall expose these properties as well!
Best regards.
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.
Copy link to clipboard
Copied
I came up with a hacky workaround in case anybody else runs into this issue: