nodes.compositor.converter

converter

Classes

Name Description
AlphaConvert Convert to and from premultiplied (associated) alpha
CombineColor Combine an image from its composite color channels
Compare Perform a comparison operation on the two given inputs
ConvertToDisplay Convert from scene linear to display color space, with a view transform and look for tone mapping
GetBundleItem Retrieve a bundle item by path.
IDMask Create a matte from an object or material index pass
ImplicitConversion Implicitly convert the input value to a fixed socket type
Levels Compute average and standard deviation of pixel values
RGBToBW Convert RGB input into grayscale using luminance
RelativeToPixel Converts values that are relative to the image size to be in terms of pixels
SeparateColor Split an image into its composite color channels
SetAlpha Add an alpha channel to an image
Split Combine two images for side-by-side display. Typically used in combination with a Viewer node
StoreBundleItem Store a bundle item by path and data type.
Switch Switch between two inputs
SwitchView Combine the views (left and right) into a single stereo 3D output

AlphaConvert

AlphaConvert(image=None, type='To Premultiplied')

Convert to and from premultiplied (associated) alpha

Parameters

Name Type Description Default
image InputColor Image None
type InputMenu | Literal['To Premultiplied', 'To Straight'] Type 'To Premultiplied'

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
to_premultiplied Create Alpha Convert node with type ‘To Premultiplied’.
to_straight Create Alpha Convert node with type ‘To Straight’.
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.

to_premultiplied
to_premultiplied(image=None)

Create Alpha Convert node with type ‘To Premultiplied’.

to_straight
to_straight(image=None)

Create Alpha Convert node with type ‘To Straight’.

Inputs

Attribute Type Description
i.image ColorSocket Image
i.type MenuSocket Type

Outputs

Attribute Type Description
o.image ColorSocket Image

CombineColor

CombineColor(
    red=0.0,
    green=0.0,
    blue=0.0,
    alpha=1.0,
    *,
    mode='RGB',
    ycc_mode='ITUBT709',
)

Combine an image from its composite color channels

Parameters

Name Type Description Default
red InputFloat Red 0.0
green InputFloat Green 0.0
blue InputFloat Blue 0.0
alpha InputFloat Alpha 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.
ycc_mode

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
ycbcr Create Combine Color with operation ‘YCbCr’. Use YCbCr (Y - luma, Cb - blue-difference chroma, Cr - red-difference chroma) color processing
yuv Create Combine Color with operation ‘YUV’. Use YUV (Y - luma, U V - chroma) color processing
hsl
hsl(red=0.0, green=0.0, blue=0.0, alpha=1.0, *, ycc_mode='ITUBT709')

Create Combine Color with operation ‘HSL’. Use HSL (Hue, Saturation, Lightness) color processing

hsv
hsv(red=0.0, green=0.0, blue=0.0, alpha=1.0, *, ycc_mode='ITUBT709')

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, alpha=1.0, *, ycc_mode='ITUBT709')

Create Combine Color with operation ‘RGB’. Use RGB (Red, Green, Blue) color processing

ycbcr
ycbcr(red=0.0, green=0.0, blue=0.0, alpha=1.0, *, ycc_mode='ITUBT709')

Create Combine Color with operation ‘YCbCr’. Use YCbCr (Y - luma, Cb - blue-difference chroma, Cr - red-difference chroma) color processing

yuv
yuv(red=0.0, green=0.0, blue=0.0, alpha=1.0, *, ycc_mode='ITUBT709')

Create Combine Color with operation ‘YUV’. Use YUV (Y - luma, U V - chroma) color processing

Inputs

Attribute Type Description
i.red FloatSocket Red
i.green FloatSocket Green
i.blue FloatSocket Blue
i.alpha FloatSocket Alpha

Outputs

Attribute Type Description
o.image ColorSocket Image

Compare

Compare(
    a=0.0,
    b=0.0,
    epsilon=None,
    *,
    operation='GREATER_THAN',
    data_type='FLOAT',
    mode='ELEMENT',
)

Perform a comparison operation on the two given inputs

Parameters

Name Type Description Default
a InputFloat A 0.0
b InputFloat B 0.0
epsilon InputFloat Epsilon None

Attributes

Name Description
data_type
i
mode
name The name of the node being wrapped by this instance.
node
o
operation
tree The TreeBuilder instance this node belongs to and is being built within.

Methods

Name Description
average Create Compare with operation ‘Average’. Compare the average of the input vectors elements
color Create Compare with operation ‘Color’.
direction Create Compare with operation ‘Direction’. Compare the direction of the input vectors
dot_product Create Compare with operation ‘Dot Product’. Compare the dot products of the input vectors
element_wise Create Compare with operation ‘Element-Wise’. Compare each element of the input vectors
equal Create Compare with operation ‘Equal’. True when both inputs are approximately equal
float Create Compare with operation ‘Float’.
font Create Compare with operation ‘Font’.
greater_than Create Compare with operation ‘Greater Than’. True when the first input is greater than the second input
greater_than_or_equal Create Compare with operation ‘Greater Than or Equal’. True when the first input is greater than the second input or equal
integer Create Compare with operation ‘Integer’.
length Create Compare with operation ‘Length’. Compare the length of the input vectors
less_than Create Compare with operation ‘Less Than’. True when the first input is smaller than second input
less_than_or_equal Create Compare with operation ‘Less Than or Equal’. True when the first input is smaller than the second input or equal
not_equal Create Compare with operation ‘Not Equal’. True when both inputs are not approximately equal
object Create Compare with operation ‘Object’.
props Set the properties every node has and return the node, so it can
string Create Compare with operation ‘String’.
vector Create Compare with operation ‘Vector’.
average
average(
    a=0.0,
    b=0.0,
    epsilon=0.001,
    *,
    operation='GREATER_THAN',
    data_type='FLOAT',
)

Create Compare with operation ‘Average’. Compare the average of the input vectors elements

color
color(
    a=(0.8, 0.8, 0.8, 1.0),
    b=(0.8, 0.8, 0.8, 1.0),
    epsilon=0.001,
    *,
    operation='GREATER_THAN',
    mode='ELEMENT',
)

Create Compare with operation ‘Color’.

direction
direction(
    a=0.0,
    b=0.0,
    epsilon=0.001,
    *,
    operation='GREATER_THAN',
    data_type='FLOAT',
)

Create Compare with operation ‘Direction’. Compare the direction of the input vectors

dot_product
dot_product(
    a=0.0,
    b=0.0,
    epsilon=0.001,
    *,
    operation='GREATER_THAN',
    data_type='FLOAT',
)

Create Compare with operation ‘Dot Product’. Compare the dot products of the input vectors

element_wise
element_wise(
    a=0.0,
    b=0.0,
    epsilon=0.001,
    *,
    operation='GREATER_THAN',
    data_type='FLOAT',
)

Create Compare with operation ‘Element-Wise’. Compare each element of the input vectors

equal
equal(a=0.0, b=0.0, epsilon=0.001, *, data_type='FLOAT', mode='ELEMENT')

Create Compare with operation ‘Equal’. True when both inputs are approximately equal

float
float(a=0.0, b=0.0, *, operation='GREATER_THAN', mode='ELEMENT')

Create Compare with operation ‘Float’.

font
font(a=None, b=None, *, operation='GREATER_THAN', mode='ELEMENT')

Create Compare with operation ‘Font’.

greater_than
greater_than(a=0.0, b=0.0, *, data_type='FLOAT', mode='ELEMENT')

Create Compare with operation ‘Greater Than’. True when the first input is greater than the second input

greater_than_or_equal
greater_than_or_equal(a=0.0, b=0.0, *, data_type='FLOAT', mode='ELEMENT')

Create Compare with operation ‘Greater Than or Equal’. True when the first input is greater than the second input or equal

integer
integer(a=0, b=0, *, operation='GREATER_THAN', mode='ELEMENT')

Create Compare with operation ‘Integer’.

length
length(
    a=0.0,
    b=0.0,
    epsilon=0.001,
    *,
    operation='GREATER_THAN',
    data_type='FLOAT',
)

Create Compare with operation ‘Length’. Compare the length of the input vectors

less_than
less_than(a=0.0, b=0.0, *, data_type='FLOAT', mode='ELEMENT')

Create Compare with operation ‘Less Than’. True when the first input is smaller than second input

less_than_or_equal
less_than_or_equal(a=0.0, b=0.0, *, data_type='FLOAT', mode='ELEMENT')

Create Compare with operation ‘Less Than or Equal’. True when the first input is smaller than the second input or equal

not_equal
not_equal(a=0.0, b=0.0, epsilon=0.001, *, data_type='FLOAT', mode='ELEMENT')

Create Compare with operation ‘Not Equal’. True when both inputs are not approximately equal

object
object(a=None, b=None, *, operation='GREATER_THAN', mode='ELEMENT')

Create Compare with operation ‘Object’.

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.

string
string(a='', b='', *, operation='GREATER_THAN', mode='ELEMENT')

Create Compare with operation ‘String’.

vector
vector(
    a=(0.0, 0.0, 0.0),
    b=(0.0, 0.0, 0.0),
    *,
    operation='GREATER_THAN',
    mode='ELEMENT',
)

Create Compare with operation ‘Vector’.

Inputs

Attribute Type Description
i.a FloatSocket A
i.b FloatSocket B
i.epsilon FloatSocket Epsilon

Outputs

Attribute Type Description
o.result BooleanSocket Result

ConvertToDisplay

ConvertToDisplay(image=(1.0, 1.0, 1.0, 1.0), invert=False)

Convert from scene linear to display color space, with a view transform and look for tone mapping

Parameters

Name Type Description Default
image InputColor Image (1.0, 1.0, 1.0, 1.0)
invert InputBoolean Invert False

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.image ColorSocket Image
i.invert BooleanSocket Invert

Outputs

Attribute Type Description
o.image ColorSocket Image

GetBundleItem

GetBundleItem(
    bundle=None,
    path='',
    remove=False,
    *,
    socket_type='FLOAT',
    structure_type='AUTO',
)

Retrieve a bundle item by path.

Parameters

Name Type Description Default
bundle InputBundle Bundle None
path InputString Path ''
remove InputBoolean Remove False

Attributes

Name Description
i
name The name of the node being wrapped by this instance.
node
o
socket_type
structure_type
tree The TreeBuilder instance this node belongs to and is being built within.

Methods

Name Description
auto Create Get Bundle Item with operation ‘Auto’. Automatically detect a good structure type based on how the socket is used
boolean Create Get Bundle Item with operation ‘Boolean’.
bundle Create Get Bundle Item with operation ‘Bundle’.
color Create Get Bundle Item with operation ‘Color’.
dynamic Create Get Bundle Item with operation ‘Dynamic’. Socket can work with different kinds of structures
field Create Get Bundle Item with operation ‘Field’. Socket expects a field
float Create Get Bundle Item with operation ‘Float’.
font Create Get Bundle Item with operation ‘Font’.
grid Create Get Bundle Item with operation ‘Grid’. Socket expects a grid
integer Create Get Bundle Item with operation ‘Integer’.
integer_vector Create Get Bundle Item with operation ‘Integer Vector’.
list Create Get Bundle Item with operation ‘List’. Socket expects a list
matrix Create Get Bundle Item with operation ‘Matrix’.
menu Create Get Bundle Item with operation ‘Menu’.
object Create Get Bundle Item with operation ‘Object’.
props Set the properties every node has and return the node, so it can
rotation Create Get Bundle Item with operation ‘Rotation’.
single Create Get Bundle Item with operation ‘Single’. Socket expects a single value
string Create Get Bundle Item with operation ‘String’.
vector Create Get Bundle Item with operation ‘Vector’.
auto
auto(bundle=None, path='', remove=False, *, socket_type='FLOAT')

Create Get Bundle Item with operation ‘Auto’. Automatically detect a good structure type based on how the socket is used

boolean
boolean(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Boolean’.

bundle
bundle(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Bundle’.

color
color(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Color’.

dynamic
dynamic(bundle=None, path='', remove=False, *, socket_type='FLOAT')

Create Get Bundle Item with operation ‘Dynamic’. Socket can work with different kinds of structures

field
field(bundle=None, path='', remove=False, *, socket_type='FLOAT')

Create Get Bundle Item with operation ‘Field’. Socket expects a field

float
float(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Float’.

font
font(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Font’.

grid
grid(bundle=None, path='', remove=False, *, socket_type='FLOAT')

Create Get Bundle Item with operation ‘Grid’. Socket expects a grid

integer
integer(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Integer’.

integer_vector
integer_vector(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Integer Vector’.

list
list(bundle=None, path='', remove=False, *, socket_type='FLOAT')

Create Get Bundle Item with operation ‘List’. Socket expects a list

matrix
matrix(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Matrix’.

menu
menu(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Menu’.

object
object(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Object’.

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.

rotation
rotation(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Rotation’.

single
single(bundle=None, path='', remove=False, *, socket_type='FLOAT')

Create Get Bundle Item with operation ‘Single’. Socket expects a single value

string
string(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘String’.

vector
vector(bundle=None, path='', remove=False, *, structure_type='AUTO')

Create Get Bundle Item with operation ‘Vector’.

Inputs

Attribute Type Description
i.bundle BundleSocket Bundle
i.path StringSocket Path
i.remove BooleanSocket Remove

Outputs

Attribute Type Description
o.bundle BundleSocket Bundle
o.item FloatSocket Item
o.exists BooleanSocket Exists

IDMask

IDMask(id_value=1.0, index=0, anti_alias=False)

Create a matte from an object or material index pass

Parameters

Name Type Description Default
id_value InputFloat ID value 1.0
index InputInteger Index 0
anti_alias InputBoolean Anti-Alias False

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.id_value FloatSocket ID value
i.index IntegerSocket Index
i.anti_alias BooleanSocket Anti-Alias

Outputs

Attribute Type Description
o.alpha FloatSocket Alpha

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’.
color Create Implicit Conversion with operation ‘Color’.
float Create Implicit Conversion with operation ‘Float’.
font Create Implicit Conversion with operation ‘Font’.
integer Create Implicit Conversion with operation ‘Integer’.
integer_vector Create Implicit Conversion with operation ‘Integer Vector’.
matrix Create Implicit Conversion with operation ‘Matrix’.
menu Create Implicit Conversion with operation ‘Menu’.
object Create Implicit Conversion with operation ‘Object’.
props Set the properties every node has and return the node, so it can
rotation Create Implicit Conversion with operation ‘Rotation’.
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’.

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’.

font
font(value=None)

Create Implicit Conversion with operation ‘Font’.

integer
integer(value=0)

Create Implicit Conversion with operation ‘Integer’.

integer_vector
integer_vector(value=(0, 0, 0))

Create Implicit Conversion with operation ‘Integer Vector’.

matrix
matrix(value=None)

Create Implicit Conversion with operation ‘Matrix’.

menu
menu(value=None)

Create Implicit Conversion with operation ‘Menu’.

object
object(value=None)

Create Implicit Conversion with operation ‘Object’.

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.

rotation
rotation(value=(0.0, 0.0, 0.0))

Create Implicit Conversion with operation ‘Rotation’.

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

Levels

Levels(image=(0.0, 0.0, 0.0, 1.0), channel='Combined')

Compute average and standard deviation of pixel values

Parameters

Name Type Description Default
image InputColor Image (0.0, 0.0, 0.0, 1.0)
channel InputMenu | Literal['Combined', 'Red', 'Green', 'Blue', 'Luminance'] Channel 'Combined'

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.image ColorSocket Image
i.channel MenuSocket Channel

Outputs

Attribute Type Description
o.mean FloatSocket Mean
o.standard_deviation FloatSocket Standard Deviation
o.minimum FloatSocket Minimum
o.maximum FloatSocket Maximum

RGBToBW

RGBToBW(image=(0.8, 0.8, 0.8, 1.0))

Convert RGB input into grayscale using luminance

Parameters

Name Type Description Default
image InputColor Image (0.8, 0.8, 0.8, 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.image ColorSocket Image

Outputs

Attribute Type Description
o.val FloatSocket Val

RelativeToPixel

RelativeToPixel(
    vector_value=(0.0, 0.0),
    float_value=0.0,
    image=(0.8, 0.8, 0.8, 1.0),
    *,
    data_type='FLOAT',
    reference_dimension='X',
)

Converts values that are relative to the image size to be in terms of pixels

Parameters

Name Type Description Default
vector_value InputVector Value (0.0, 0.0)
float_value InputFloat Value 0.0
image InputColor Image (0.8, 0.8, 0.8, 1.0)

Attributes

Name Description
data_type
i
name The name of the node being wrapped by this instance.
node
o
reference_dimension
tree The TreeBuilder instance this node belongs to and is being built within.

Methods

Name Description
float Create Relative To Pixel with operation ‘Float’. Float value
props Set the properties every node has and return the node, so it can
vector Create Relative To Pixel with operation ‘Vector’. Vector value
float
float(float_value=0.0, image=(0.8, 0.8, 0.8, 1.0), *, reference_dimension='X')

Create Relative To Pixel with operation ‘Float’. Float value

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(
    vector_value=(0.0, 0.0),
    image=(0.8, 0.8, 0.8, 1.0),
    *,
    reference_dimension='X',
)

Create Relative To Pixel with operation ‘Vector’. Vector value

Inputs

Attribute Type Description
i.vector_value VectorSocket Value
i.float_value FloatSocket Value
i.image ColorSocket Image

Outputs

Attribute Type Description
o.float_value FloatSocket Value
o.vector_value VectorSocket Value

SeparateColor

SeparateColor(image=(1.0, 1.0, 1.0, 1.0), *, mode='RGB', ycc_mode='ITUBT709')

Split an image into its composite color channels

Parameters

Name Type Description Default
image InputColor Image (1.0, 1.0, 1.0, 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.
ycc_mode

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
ycbcr Create Separate Color with operation ‘YCbCr’. Use YCbCr (Y - luma, Cb - blue-difference chroma, Cr - red-difference chroma) color processing
yuv Create Separate Color with operation ‘YUV’. Use YUV (Y - luma, U V - chroma) color processing
hsl
hsl(image=(1.0, 1.0, 1.0, 1.0), *, ycc_mode='ITUBT709')

Create Separate Color with operation ‘HSL’. Use HSL (Hue, Saturation, Lightness) color processing

hsv
hsv(image=(1.0, 1.0, 1.0, 1.0), *, ycc_mode='ITUBT709')

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(image=(1.0, 1.0, 1.0, 1.0), *, ycc_mode='ITUBT709')

Create Separate Color with operation ‘RGB’. Use RGB (Red, Green, Blue) color processing

ycbcr
ycbcr(image=(1.0, 1.0, 1.0, 1.0), *, ycc_mode='ITUBT709')

Create Separate Color with operation ‘YCbCr’. Use YCbCr (Y - luma, Cb - blue-difference chroma, Cr - red-difference chroma) color processing

yuv
yuv(image=(1.0, 1.0, 1.0, 1.0), *, ycc_mode='ITUBT709')

Create Separate Color with operation ‘YUV’. Use YUV (Y - luma, U V - chroma) color processing

Inputs

Attribute Type Description
i.image ColorSocket Image

Outputs

Attribute Type Description
o.red FloatSocket Red
o.green FloatSocket Green
o.blue FloatSocket Blue
o.alpha FloatSocket Alpha

SetAlpha

SetAlpha(image=None, alpha=1.0, type='Apply Mask')

Add an alpha channel to an image

Parameters

Name Type Description Default
image InputColor Image None
alpha InputFloat Alpha 1.0
type InputMenu | Literal['Apply Mask', 'Replace Alpha'] Type 'Apply Mask'

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
apply_mask Create Set Alpha node with type ‘Apply Mask’.
props Set the properties every node has and return the node, so it can
replace_alpha Create Set Alpha node with type ‘Replace Alpha’.
apply_mask
apply_mask(image=None, alpha=1.0)

Create Set Alpha node with type ‘Apply Mask’.

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.

replace_alpha
replace_alpha(image=None, alpha=1.0)

Create Set Alpha node with type ‘Replace Alpha’.

Inputs

Attribute Type Description
i.image ColorSocket Image
i.alpha FloatSocket Alpha
i.type MenuSocket Type

Outputs

Attribute Type Description
o.image ColorSocket Image

Split

Split(
    position=(0.5, 0.5),
    rotation=math.pi / 4,
    image=(0.8, 0.8, 0.8, 1.0),
    image_001=(0.8, 0.8, 0.8, 1.0),
)

Combine two images for side-by-side display. Typically used in combination with a Viewer node

Parameters

Name Type Description Default
position InputVector Position (0.5, 0.5)
rotation InputFloat Rotation math.pi / 4
image InputColor Image (0.8, 0.8, 0.8, 1.0)
image_001 InputColor Image (0.8, 0.8, 0.8, 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.position VectorSocket Position
i.rotation FloatSocket Rotation
i.image ColorSocket Image
i.image_001 ColorSocket Image

Outputs

Attribute Type Description
o.image ColorSocket Image

StoreBundleItem

StoreBundleItem(
    bundle=None,
    path='',
    item=0.0,
    *,
    socket_type='FLOAT',
    structure_type='AUTO',
)

Store a bundle item by path and data type.

Parameters

Name Type Description Default
bundle InputBundle Bundle None
path InputString Path ''
item InputFloat Item 0.0

Attributes

Name Description
i
name The name of the node being wrapped by this instance.
node
o
socket_type
structure_type
tree The TreeBuilder instance this node belongs to and is being built within.

Methods

Name Description
auto Create Store Bundle Item with operation ‘Auto’. Automatically detect a good structure type based on how the socket is used
boolean Create Store Bundle Item with operation ‘Boolean’.
bundle Create Store Bundle Item with operation ‘Bundle’.
color Create Store Bundle Item with operation ‘Color’.
dynamic Create Store Bundle Item with operation ‘Dynamic’. Socket can work with different kinds of structures
field Create Store Bundle Item with operation ‘Field’. Socket expects a field
float Create Store Bundle Item with operation ‘Float’.
font Create Store Bundle Item with operation ‘Font’.
grid Create Store Bundle Item with operation ‘Grid’. Socket expects a grid
integer Create Store Bundle Item with operation ‘Integer’.
integer_vector Create Store Bundle Item with operation ‘Integer Vector’.
list Create Store Bundle Item with operation ‘List’. Socket expects a list
matrix Create Store Bundle Item with operation ‘Matrix’.
menu Create Store Bundle Item with operation ‘Menu’.
object Create Store Bundle Item with operation ‘Object’.
props Set the properties every node has and return the node, so it can
rotation Create Store Bundle Item with operation ‘Rotation’.
single Create Store Bundle Item with operation ‘Single’. Socket expects a single value
string Create Store Bundle Item with operation ‘String’.
vector Create Store Bundle Item with operation ‘Vector’.
auto
auto(bundle=None, path='', item=0.0, *, socket_type='FLOAT')

Create Store Bundle Item with operation ‘Auto’. Automatically detect a good structure type based on how the socket is used

boolean
boolean(bundle=None, path='', item=False, *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Boolean’.

bundle
bundle(bundle=None, path='', item=None, *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Bundle’.

color
color(bundle=None, path='', item=(0.8, 0.8, 0.8, 1.0), *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Color’.

dynamic
dynamic(bundle=None, path='', item=0.0, *, socket_type='FLOAT')

Create Store Bundle Item with operation ‘Dynamic’. Socket can work with different kinds of structures

field
field(bundle=None, path='', item=0.0, *, socket_type='FLOAT')

Create Store Bundle Item with operation ‘Field’. Socket expects a field

float
float(bundle=None, path='', item=0.0, *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Float’.

font
font(bundle=None, path='', item=None, *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Font’.

grid
grid(bundle=None, path='', item=None, *, socket_type='FLOAT')

Create Store Bundle Item with operation ‘Grid’. Socket expects a grid

integer
integer(bundle=None, path='', item=0, *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Integer’.

integer_vector
integer_vector(bundle=None, path='', item=(0, 0, 0), *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Integer Vector’.

list
list(bundle=None, path='', item=None, *, socket_type='FLOAT')

Create Store Bundle Item with operation ‘List’. Socket expects a list

matrix
matrix(bundle=None, path='', item=None, *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Matrix’.

menu
menu(bundle=None, path='', item=None, *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Menu’.

object
object(bundle=None, path='', item=None, *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Object’.

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.

rotation
rotation(bundle=None, path='', item=(0.0, 0.0, 0.0), *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Rotation’.

single
single(bundle=None, path='', item=0.0, *, socket_type='FLOAT')

Create Store Bundle Item with operation ‘Single’. Socket expects a single value

string
string(bundle=None, path='', item='', *, structure_type='AUTO')

Create Store Bundle Item with operation ‘String’.

vector
vector(bundle=None, path='', item=(0.0, 0.0, 0.0), *, structure_type='AUTO')

Create Store Bundle Item with operation ‘Vector’.

Inputs

Attribute Type Description
i.bundle BundleSocket Bundle
i.path StringSocket Path
i.item FloatSocket Item

Outputs

Attribute Type Description
o.bundle BundleSocket Bundle

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’.
color Create Switch with operation ‘Color’.
float Create Switch with operation ‘Float’.
font Create Switch with operation ‘Font’.
integer Create Switch with operation ‘Integer’.
integer_vector Create Switch with operation ‘Integer Vector’.
matrix Create Switch with operation ‘Matrix’.
menu Create Switch with operation ‘Menu’.
object Create Switch with operation ‘Object’.
props Set the properties every node has and return the node, so it can
rotation Create Switch with operation ‘Rotation’.
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’.

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’.

font
font(switch=False, false=None, true=None)

Create Switch with operation ‘Font’.

integer
integer(switch=False, false=0, true=0)

Create Switch with operation ‘Integer’.

integer_vector
integer_vector(switch=False, false=(0, 0, 0), true=(0, 0, 0))

Create Switch with operation ‘Integer Vector’.

matrix
matrix(switch=False, false=None, true=None)

Create Switch with operation ‘Matrix’.

menu
menu(switch=False, false=None, true=None)

Create Switch with operation ‘Menu’.

object
object(switch=False, false=None, true=None)

Create Switch with operation ‘Object’.

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.

rotation
rotation(switch=False, false=(0.0, 0.0, 0.0), true=(0.0, 0.0, 0.0))

Create Switch with operation ‘Rotation’.

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

SwitchView

SwitchView(left=(0.0, 0.0, 0.0, 1.0), right=(0.0, 0.0, 0.0, 1.0))

Combine the views (left and right) into a single stereo 3D output

Parameters

Name Type Description Default
left InputColor left (0.0, 0.0, 0.0, 1.0)
right InputColor right (0.0, 0.0, 0.0, 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.left ColorSocket left
i.right ColorSocket right

Outputs

Attribute Type Description
o.image ColorSocket Image