nodes.shader.converter
converter
Classes
| Name | Description |
|---|---|
| CombineColor | Create a color from individual components using multiple models |
| ImplicitConversion | Implicitly convert the input value to a fixed socket type |
| IndexSwitch | Choose between an arbitrary number of values with an index |
| Mix | Mix values by a factor |
| RGBToBW | Convert a color’s luminance to a grayscale value |
| SeparateColor | Split a color into its individual components using multiple models |
| ShaderToRGB | Convert rendering effect (such as light and shadow) to color. Typically used for non-photorealistic rendering, to apply additional effects on the output of BSDFs. |
| Switch | Switch between two inputs |
| Wavelength | Convert a wavelength value to an RGB value |
CombineColor
CombineColor(red=0.0, green=0.0, blue=0.0, *, mode='RGB')Create a color from individual components using multiple models
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| red | InputFloat | Red | 0.0 |
| green | InputFloat | Green | 0.0 |
| blue | InputFloat | Blue | 0.0 |
Attributes
| Name | Description |
|---|---|
i |
|
mode |
|
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 |
|---|---|
| hsl | Create Combine Color with operation ‘HSL’. Use HSL (Hue, Saturation, Lightness) color processing |
| hsv | Create Combine Color with operation ‘HSV’. Use HSV (Hue, Saturation, Value) color processing |
| props | Set the properties every node has and return the node, so it can |
| rgb | Create Combine Color with operation ‘RGB’. Use RGB (Red, Green, Blue) color processing |
hsl
hsl(red=0.0, green=0.0, blue=0.0)Create Combine Color with operation ‘HSL’. Use HSL (Hue, Saturation, Lightness) color processing
hsv
hsv(red=0.0, green=0.0, blue=0.0)Create Combine Color with operation ‘HSV’. Use HSV (Hue, Saturation, Value) color processing
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.
rgb
rgb(red=0.0, green=0.0, blue=0.0)Create Combine Color with operation ‘RGB’. Use RGB (Red, Green, Blue) color processing
Inputs
| Attribute | Type | Description |
|---|---|---|
i.red |
FloatSocket |
Red |
i.green |
FloatSocket |
Green |
i.blue |
FloatSocket |
Blue |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.color |
ColorSocket |
Color |
ImplicitConversion
ImplicitConversion(value=(0.0, 0.0, 0.0, 1.0), *, data_type='RGBA')Implicitly convert the input value to a fixed socket type
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| value | InputColor | Value | (0.0, 0.0, 0.0, 1.0) |
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 Implicit Conversion with operation ‘Boolean’. |
| bundle | Create Implicit Conversion with operation ‘Bundle’. |
| closure | Create Implicit Conversion with operation ‘Closure’. |
| color | Create Implicit Conversion with operation ‘Color’. |
| float | Create Implicit Conversion with operation ‘Float’. |
| integer | Create Implicit Conversion with operation ‘Integer’. |
| menu | Create Implicit Conversion with operation ‘Menu’. |
| props | Set the properties every node has and return the node, so it can |
| shader | Create Implicit Conversion with operation ‘Shader’. |
| string | Create Implicit Conversion with operation ‘String’. |
| vector | Create Implicit Conversion with operation ‘Vector’. |
boolean
boolean(value=False)Create Implicit Conversion with operation ‘Boolean’.
bundle
bundle(value=None)Create Implicit Conversion with operation ‘Bundle’.
closure
closure(value=None)Create Implicit Conversion with operation ‘Closure’.
color
color(value=(0.0, 0.0, 0.0, 1.0))Create Implicit Conversion with operation ‘Color’.
float
float(value=0.0)Create Implicit Conversion with operation ‘Float’.
integer
integer(value=0)Create Implicit Conversion 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(value=None)Create Implicit Conversion with operation ‘Shader’.
string
string(value='')Create Implicit Conversion with operation ‘String’.
vector
vector(value=(0.0, 0.0, 0.0))Create Implicit Conversion with operation ‘Vector’.
Inputs
| Attribute | Type | Description |
|---|---|---|
i.value |
ColorSocket |
Value |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.value |
ColorSocket |
Value |
IndexSwitch
IndexSwitch(
index=0,
input_0=(0.8, 0.8, 0.8, 1.0),
input_1=(0.8, 0.8, 0.8, 1.0),
input_socket=None,
*,
data_type='RGBA',
)Choose between an arbitrary number of values with an index
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| index | InputInteger | Index | 0 |
| input_0 | InputColor | 0 | (0.8, 0.8, 0.8, 1.0) |
| input_1 | InputColor | 1 | (0.8, 0.8, 0.8, 1.0) |
| input_socket | InputLinkable | 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 Index Switch with operation ‘Boolean’. |
| bundle | Create Index Switch with operation ‘Bundle’. |
| closure | Create Index Switch with operation ‘Closure’. |
| color | Create Index Switch with operation ‘Color’. |
| float | Create Index Switch with operation ‘Float’. |
| integer | Create Index Switch with operation ‘Integer’. |
| menu | Create Index Switch with operation ‘Menu’. |
| props | Set the properties every node has and return the node, so it can |
| shader | Create Index Switch with operation ‘Shader’. |
| string | Create Index Switch with operation ‘String’. |
| vector | Create Index Switch with operation ‘Vector’. |
boolean
boolean(index=0, input_0=False, input_1=False, input_socket=None)Create Index Switch with operation ‘Boolean’.
bundle
bundle(index=0, input_0=None, input_1=None, input_socket=None)Create Index Switch with operation ‘Bundle’.
closure
closure(index=0, input_0=None, input_1=None, input_socket=None)Create Index Switch with operation ‘Closure’.
color
color(
index=0,
input_0=(0.8, 0.8, 0.8, 1.0),
input_1=(0.8, 0.8, 0.8, 1.0),
input_socket=None,
)Create Index Switch with operation ‘Color’.
float
float(index=0, input_0=0.0, input_1=0.0, input_socket=None)Create Index Switch with operation ‘Float’.
integer
integer(index=0, input_0=0, input_1=0, input_socket=None)Create Index Switch 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(index=0, input_0=None, input_1=None, input_socket=None)Create Index Switch with operation ‘Shader’.
string
string(index=0, input_0='', input_1='', input_socket=None)Create Index Switch with operation ‘String’.
vector
vector(
index=0,
input_0=(0.0, 0.0, 0.0),
input_1=(0.0, 0.0, 0.0),
input_socket=None,
)Create Index Switch with operation ‘Vector’.
Inputs
| Attribute | Type | Description |
|---|---|---|
i.index |
IntegerSocket |
Index |
i.input_0 |
ColorSocket |
0 |
i.input_1 |
ColorSocket |
1 |
i.input_socket |
Socket |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.output |
ColorSocket |
Output |
Mix
Mix(
factor_float=1.0,
factor_vector=(0.5, 0.5, 0.5),
a_float=0.0,
b_float=0.0,
a_vector=(0.0, 0.0, 0.0),
b_vector=(0.0, 0.0, 0.0),
a_color=(0.5, 0.5, 0.5, 1.0),
b_color=(0.5, 0.5, 0.5, 1.0),
a_rotation=(0.0, 0.0, 0.0),
b_rotation=(0.0, 0.0, 0.0),
*,
data_type='FLOAT',
factor_mode='UNIFORM',
blend_type='MIX',
clamp_factor=True,
clamp_result=False,
)Mix values by a factor
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| factor_float | InputFloat | Factor | 1.0 |
| factor_vector | InputVector | Factor | (0.5, 0.5, 0.5) |
| a_float | InputFloat | A | 0.0 |
| b_float | InputFloat | B | 0.0 |
| a_vector | InputVector | A | (0.0, 0.0, 0.0) |
| b_vector | InputVector | B | (0.0, 0.0, 0.0) |
| a_color | InputColor | A | (0.5, 0.5, 0.5, 1.0) |
| b_color | InputColor | B | (0.5, 0.5, 0.5, 1.0) |
| a_rotation | InputRotation | A | (0.0, 0.0, 0.0) |
| b_rotation | InputRotation | B | (0.0, 0.0, 0.0) |
Attributes
| Name | Description |
|---|---|
blend_type |
|
clamp_factor |
|
clamp_result |
|
data_type |
|
factor_mode |
|
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 |
|---|---|
| color | Create Mix with operation ‘Color’. |
| float | Create Mix with operation ‘Float’. |
| props | Set the properties every node has and return the node, so it can |
| vector | Create Mix with operation ‘Vector’. |
color
color(
factor=1.0,
a=(0.5, 0.5, 0.5, 1.0),
b=(0.5, 0.5, 0.5, 1.0),
*,
factor_mode='UNIFORM',
blend_type='MIX',
clamp_factor=True,
clamp_result=False,
)Create Mix with operation ‘Color’.
float
float(
factor=1.0,
a=0.0,
b=0.0,
*,
factor_mode='UNIFORM',
blend_type='MIX',
clamp_factor=True,
clamp_result=False,
)Create Mix with operation ‘Float’.
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.
vector
vector(
factor=1.0,
a=(0.0, 0.0, 0.0),
b=(0.0, 0.0, 0.0),
*,
factor_mode='UNIFORM',
blend_type='MIX',
clamp_factor=True,
clamp_result=False,
)Create Mix with operation ‘Vector’.
Inputs
| Attribute | Type | Description |
|---|---|---|
i.factor_float |
FloatSocket |
Factor |
i.factor_vector |
VectorSocket |
Factor |
i.a_float |
FloatSocket |
A |
i.b_float |
FloatSocket |
B |
i.a_vector |
VectorSocket |
A |
i.b_vector |
VectorSocket |
B |
i.a_color |
ColorSocket |
A |
i.b_color |
ColorSocket |
B |
i.a_rotation |
RotationSocket |
A |
i.b_rotation |
RotationSocket |
B |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.result_float |
FloatSocket |
Result |
o.result_vector |
VectorSocket |
Result |
o.result_color |
ColorSocket |
Result |
o.result_rotation |
RotationSocket |
Result |
RGBToBW
RGBToBW(color=(0.5, 0.5, 0.5, 1.0))Convert a color’s luminance to a grayscale value
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| color | InputColor | Color | (0.5, 0.5, 0.5, 1.0) |
Attributes
| Name | Description |
|---|---|
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 |
|---|---|
| props | Set the properties every node has and return the node, so it can |
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.
Inputs
| Attribute | Type | Description |
|---|---|---|
i.color |
ColorSocket |
Color |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.val |
FloatSocket |
Val |
SeparateColor
SeparateColor(color=(0.8, 0.8, 0.8, 1.0), *, mode='RGB')Split a color into its individual components using multiple models
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| color | InputColor | Color | (0.8, 0.8, 0.8, 1.0) |
Attributes
| Name | Description |
|---|---|
i |
|
mode |
|
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 |
|---|---|
| hsl | Create Separate Color with operation ‘HSL’. Use HSL (Hue, Saturation, Lightness) color processing |
| hsv | Create Separate Color with operation ‘HSV’. Use HSV (Hue, Saturation, Value) color processing |
| props | Set the properties every node has and return the node, so it can |
| rgb | Create Separate Color with operation ‘RGB’. Use RGB (Red, Green, Blue) color processing |
hsl
hsl(color=(0.8, 0.8, 0.8, 1.0))Create Separate Color with operation ‘HSL’. Use HSL (Hue, Saturation, Lightness) color processing
hsv
hsv(color=(0.8, 0.8, 0.8, 1.0))Create Separate Color with operation ‘HSV’. Use HSV (Hue, Saturation, Value) color processing
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.
rgb
rgb(color=(0.8, 0.8, 0.8, 1.0))Create Separate Color with operation ‘RGB’. Use RGB (Red, Green, Blue) color processing
Inputs
| Attribute | Type | Description |
|---|---|---|
i.color |
ColorSocket |
Color |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.red |
FloatSocket |
Red |
o.green |
FloatSocket |
Green |
o.blue |
FloatSocket |
Blue |
ShaderToRGB
ShaderToRGB(shader=None)Convert rendering effect (such as light and shadow) to color. Typically used for non-photorealistic rendering, to apply additional effects on the output of BSDFs.
Note: only supported in EEVEE
Parameters
shader : InputShader
Shader
Inputs
i.shader : ShaderSocket
Shader
Outputs
o.color : ColorSocket
Color
o.alpha : FloatSocket
Alpha
Attributes
| Name | Description |
|---|---|
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 |
|---|---|
| props | Set the properties every node has and return the node, so it can |
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.
Switch
Switch(switch=False, false=None, true=None, *, input_type=None)Switch between two inputs
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| switch | InputBoolean | switch | False |
| false | InputAny | false | None |
| true | InputAny | true | None |
| input_type | _SwitchType | None | input_type | None |
Attributes
| Name | Description |
|---|---|
i |
|
input_type |
|
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 Switch with operation ‘Boolean’. |
| bundle | Create Switch with operation ‘Bundle’. |
| closure | Create Switch with operation ‘Closure’. |
| color | Create Switch with operation ‘Color’. |
| float | Create Switch with operation ‘Float’. |
| integer | Create Switch with operation ‘Integer’. |
| menu | Create Switch with operation ‘Menu’. |
| props | Set the properties every node has and return the node, so it can |
| shader | Create Switch with operation ‘Shader’. |
| string | Create Switch with operation ‘String’. |
| vector | Create Switch with operation ‘Vector’. |
boolean
boolean(switch=False, false=False, true=False)Create Switch with operation ‘Boolean’.
bundle
bundle(switch=False, false=None, true=None)Create Switch with operation ‘Bundle’.
closure
closure(switch=False, false=None, true=None)Create Switch with operation ‘Closure’.
color
color(switch=False, false=(0.8, 0.8, 0.8, 1.0), true=(0.8, 0.8, 0.8, 1.0))Create Switch with operation ‘Color’.
float
float(switch=False, false=0.0, true=0.0)Create Switch with operation ‘Float’.
integer
integer(switch=False, false=0, true=0)Create Switch 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(switch=False, false=None, true=None)Create Switch with operation ‘Shader’.
string
string(switch=False, false='', true='')Create Switch with operation ‘String’.
vector
vector(switch=False, false=(0.0, 0.0, 0.0), true=(0.0, 0.0, 0.0))Create Switch with operation ‘Vector’.
Inputs
| Attribute | Type | Description |
|---|---|---|
i.switch |
BooleanSocket |
Switch |
i.false |
ColorSocket |
False |
i.true |
ColorSocket |
True |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.output |
ColorSocket |
Output |
Wavelength
Wavelength(wavelength=500.0)Convert a wavelength value to an RGB value
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| wavelength | InputFloat | Wavelength | 500.0 |
Attributes
| Name | Description |
|---|---|
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 |
|---|---|
| props | Set the properties every node has and return the node, so it can |
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.
Inputs
| Attribute | Type | Description |
|---|---|---|
i.wavelength |
FloatSocket |
Wavelength |
Outputs
| Attribute | Type | Description |
|---|---|---|
o.color |
ColorSocket |
Color |