You can chose to display a parameter or an input/output of an instance to the user only if some conditions are fulfilled.
This is very useful if you for example when you want to display some parameters that depends on another one.
You can achieve it with the field "Visible if":
- In the Conditions parameters of an output or input node
- In the Input Parameters of the graph for an exposed Parameter
Those conditions work only for graph instances, and only in Substance Designer. They don't work once the substance is published, and don't work in Substance integrations as a consequence.
The "Visible if" fields accepts the following parameters:
- .x : access the subparameter
- &&: and
- ||: or
- !: not
- <, >, <=, >=, ==, != : comparison
- (): brackets
To control a graph input value, you need to use the dictionary "input" :
- For the Y value of Float3 input "MyInput", you need to use: input["MyInput"].y < 3
- For a Float1 or Integer1 input "MyInput": you to use: input["MyInput"]<3
- For a Boolean input "MyInput", you will need to use: input["MyInput"]
If you wish to expose a new parameter called "NewParameter" only when another float parameter called "MyInput" is superior to 10, the field "If Visible" should be: "input["MyInput"] > 10".
Now, if you drag&drop this graph as in instance in a new graph, "NewParameter" will be displayed and accessible only when MyInput is superior to 10.