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?
Copy link to clipboard
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!
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 🙂
This request makes sense. We shall expose these properties as well!