Author Topic: How to get the actual value of an inherited property?  (Read 1539 times)

Hi,

I have a node whose Output Size ("$outputsize") is relative to parent. This node is inside a graph which also is relative to parent (actual parent size is indicated in the graph toolbar). How can I get the actual parent size? There is no parenting link from an SDNode to its parent, neither there is in the SDProperty. Also, when on the top graph whose size is relative to the parent size indicated in the toolbar, how do we get this size? Thanks!

Can you check if this points you in the right direction?
https://forum.substance3d.com/index.php/topic,30680.msg117937.html#msg117937

Can you check if this points you in the right direction?
https://forum.substance3d.com/index.php/topic,30680.msg117937.html#msg117937

Thanks but this is only getting inheritance properties which I am already doing. My point is to get the actual size value.

If I understand your question correctly, you're looking for the 'defaultParentSize' value (Parent toolbar).

This value is stored as an 'option' of the graph, which doesn't appear to be currently supported by the SD API (at least not the version I'm using 2018.3.1).



I did look into the SAT pysbs API and it does appear to support options for the graph object (although I haven't tested it).
https://docs.substance3d.com/sat/pysbs-python-api/api-content/substance-definition/graph#graph.graph.SBSGraph.getOptions

Possible workaround (assuming you have access to it) until they implement it?

@NevTD Nice find! However these options are not in the SD API at this time (2019.2.2)