nodes.compositor.manual

manual

Attributes

Name Description
tree

Classes

Name Description
IndexSwitch Node builder for the Index Switch node (Compositor tree).
MenuSwitch Node builder for the Menu Switch node (Compositor tree)

IndexSwitch

IndexSwitch(index=0, items=(), data_type=None)

Node builder for the Index Switch node (Compositor tree).

The same node as in Geometry Nodes, with the same items API and type inference, but the compositor switches fewer types (and Integer Vector, which Geometry Nodes doesn’t). With nothing to infer from it is a Color switch, as Blender starts it in the compositor.

Attributes

Name Description
data_type Input socket: Data Type
i Input socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
items The switch’s items, one input socket each.
name The name of the node being wrapped by this instance.
node
o Output socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
tree

Methods

Name Description
boolean
color
float
font
integer
integer_vector
matrix
menu
object
props Set the properties every node has and return the node, so it can
rotation
string
vector
boolean
boolean(index=0, items=())
color
color(index=0, items=())
float
float(index=0, items=())
font
font(index=0, items=())
integer
integer(index=0, items=())
integer_vector
integer_vector(index=0, items=())
matrix
matrix(index=0, items=())
menu
menu(index=0, items=())
object
object(index=0, items=())
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(index=0, items=())
string
string(index=0, items=())
vector
vector(index=0, items=())

MenuSwitch

MenuSwitch(menu=None, items=None, *, data_type=None)

Node builder for the Menu Switch node (Compositor tree)

Attributes

Name Description
data_type Input socket: Data Type
i
items The menu’s items, one input socket each.
name The name of the node being wrapped by this instance.
node
o
tree

Methods

Name Description
boolean
color
float
integer
is_selected Gets the boolean output socket that is True when the named menu item is selected.
menu
props Set the properties every node has and return the node, so it can
string
vector
boolean
boolean(menu=None, items=None)
color
color(menu=None, items=None)
float
float(menu=None, items=None)
integer
integer(menu=None, items=None)
is_selected
is_selected(name)

Gets the boolean output socket that is True when the named menu item is selected.

Cannot be used with the “Output” name as this refers to the output socket itself.

Parameters
Name Type Description Default
name str The name of the menu item to get the selected socket for. required
Returns
Name Type Description
BooleanSocket The boolean output socket that is True when the named menu item is selected.
menu
menu(menu=None, items=None)
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(menu=None, items=None)
vector
vector(menu=None, items=None)