Author Topic: How to obtain the min and max value for every parameter in every node?  (Read 667 times)

With SAT, I can obtain the min and max values from the parameters of the graph itself which are SBSParamInput and have the functions getMinValue() and getMaxValue(). But this is not the same for the specific paremeters of the nodes in the graph, which are SBSParameter and don't have these functions. How can can I obtain them then? I know these values exist for this parameters too because in Substance Designer, when you use the slider in these specific parameters for any node in the graph, you are limited by the slider by a minimum and maximum value, and also, when you expose this parameter to the graph itself (converting it into a graph parameter), the min and max values are set automatically according to the limits of the previous slider, so, how can I obtain these values myself by using the SAT python api?
Last Edit: August 30, 2020, 08:48:02 pm

Hello!
It's a bit more complex because it is necessary to go up to the level of the graph of the instance comp node.
Here a snippet to do that:
Code: [Select]
imp = comp_node.getCompImplementation()
# SBSAR comp node:
param = imp.mRefGraph().getInput(param_identifier)  # should be the same definition getInputParameter ... (todo fix)
# SBS comp node
param = imp.mRefGraph().getInputParameter(param_identifier)

Now param is a SBSParamInput object with getMinValue() getMaxValue()


CHeers