nodes.shader.interface
interface
Classes
| Name | Description |
|---|---|
| EnableOutput | Either pass through the input value or output the fallback value |
EnableOutput
EnableOutput(enable=False, value=None, *, data_type='FLOAT')Either pass through the input value or output the fallback value
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| enable | InputBoolean | Enable | False |
| value | InputFloat | Value | None |
Attributes
| Name | Description |
|---|---|
data_type |
|
i |
|
name |
The name of the node being wrapped by this instance. |
node |
|
o |
|
tree |
The TreeBuilder instance this node belongs to and is being built within. |
Methods
| Name | Description |
|---|---|
| boolean | Create Enable Output with operation ‘Boolean’. |
| bundle | Create Enable Output with operation ‘Bundle’. |
| closure | Create Enable Output with operation ‘Closure’. |
| color | Create Enable Output with operation ‘Color’. |
| float | Create Enable Output with operation ‘Float’. |
| integer | Create Enable Output with operation ‘Integer’. |
| menu | Create Enable Output with operation ‘Menu’. |
| props | Set the properties every node has and return the node, so it can |
| shader | Create Enable Output with operation ‘Shader’. |
| string | Create Enable Output with operation ‘String’. |
| vector | Create Enable Output with operation ‘Vector’. |
boolean
boolean(enable=False, value=None)Create Enable Output with operation ‘Boolean’.
bundle
bundle(enable=False, value=None)Create Enable Output with operation ‘Bundle’.
closure
closure(enable=False, value=None)Create Enable Output with operation ‘Closure’.
color
color(enable=False, value=None)Create Enable Output with operation ‘Color’.
float
float(enable=False, value=None)Create Enable Output with operation ‘Float’.
integer
integer(enable=False, value=None)Create Enable Output with operation ‘Integer’.
props
props(
label=None,
color=None,
width=None,
height=None,
hide=None,
show_options=None,
hide_inputs=(),
hide_outputs=(),
mute=None,
warning_propagation=None,
pin_gizmo=None,
pin_gizmo_inputs=(),
)Set the properties every node has and return the node, so it can go at the end of a chain::
g.SetPosition(geometry=geo, offset=offset).props(
label="Lift", color="#FFAA00", width=200
)
Properties left as None are unchanged.
Args: label: The node’s header label. color: A custom header colour, as a hex string ("#FFAA00") or an (r, g, b) tuple; turns on use_custom_color. width: The node’s width. height: The node’s height; only frames use it. hide: Collapse the node. show_options: Show the node’s options (dropdowns and toggles). hide_inputs: Input sockets to hide, by name; "Value#1" names the second visible Value. hide_outputs: Output sockets to hide, by name. mute: Mute (bypass) the node. warning_propagation: Which of the node’s warnings show on the group node it sits in. pin_gizmo: Keep the node’s gizmo visible when it isn’t selected: a gizmo node’s, or a value node’s (Value, Vector, …). pin_gizmo_inputs: Inputs whose gizmos stay visible when the node isn’t selected, by name; for group nodes passing a gizmo through.
shader
shader(enable=False, value=None)Create Enable Output with operation ‘Shader’.
string
string(enable=False, value=None)Create Enable Output with operation ‘String’.
vector
vector(enable=False, value=None)Create Enable Output with operation ‘Vector’.
Inputs
| Attribute | Type | Description |
|---|---|---|
i.enable |
BooleanSocket |
Enable |
i.value |
FloatSocket |
Value |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.value |
FloatSocket |
Value |