builder.node

node

Classes

Name Description
BaseNode Base class for all node wrappers.
CustomCompositorGroup Node group in a Compositor node tree.
CustomGeometryGroup Node group in a Geometry Nodes tree.
CustomShaderGroup Node group in a Shader (Material) node tree.
DynamicInputsMixin
NodeGroupBuilder Base class for custom node groups.

BaseNode

BaseNode(node=None)

Base class for all node wrappers.

Attributes

Name Description
i Input socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
name The name of the node being wrapped by this instance.
node
o Output socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
outputs
tree The TreeBuilder instance this node belongs to and is being built within.

CustomCompositorGroup

CustomCompositorGroup(**kwargs)

Node group in a Compositor node tree.

Attributes

Name Description
i Input socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
name The name of the node being wrapped by this instance.
node
node_tree
o Output socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
outputs
tree The TreeBuilder instance this node belongs to and is being built within.

Methods

Name Description
create_group Build this group’s node tree and return it, reusing an existing tree
create_group
create_group()

Build this group’s node tree and return it, reusing an existing tree of the same name.

Unlike instantiating the class, this needs no active TreeBuilder context — it opens its own — so a group can be pre-built and reused directly (e.g. assigned to a node’s node_tree) instead of being created by constructing the class inside a tree.

CustomGeometryGroup

CustomGeometryGroup(**kwargs)

Node group in a Geometry Nodes tree.

Attributes

Name Description
i Input socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
name The name of the node being wrapped by this instance.
node
node_tree
o Output socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
outputs
tree The TreeBuilder instance this node belongs to and is being built within.

Methods

Name Description
create_group Build this group’s node tree and return it, reusing an existing tree
create_group
create_group()

Build this group’s node tree and return it, reusing an existing tree of the same name.

Unlike instantiating the class, this needs no active TreeBuilder context — it opens its own — so a group can be pre-built and reused directly (e.g. assigned to a node’s node_tree) instead of being created by constructing the class inside a tree.

CustomShaderGroup

CustomShaderGroup(**kwargs)

Node group in a Shader (Material) node tree.

Attributes

Name Description
i Input socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
name The name of the node being wrapped by this instance.
node
node_tree
o Output socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
outputs
tree The TreeBuilder instance this node belongs to and is being built within.

Methods

Name Description
create_group Build this group’s node tree and return it, reusing an existing tree
create_group
create_group()

Build this group’s node tree and return it, reusing an existing tree of the same name.

Unlike instantiating the class, this needs no active TreeBuilder context — it opens its own — so a group can be pre-built and reused directly (e.g. assigned to a node’s node_tree) instead of being created by constructing the class inside a tree.

DynamicInputsMixin

DynamicInputsMixin()

NodeGroupBuilder

NodeGroupBuilder(**kwargs)

Base class for custom node groups.

Subclasses implement :meth:_build_group with the node-graph logic. Subclass one of the editor-specific variants: :class:GeometryNodeGroup, :class:ShaderNodeGroup, or :class:CompositorNodeGroup.

Attributes

Name Description
i Input socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
name The name of the node being wrapped by this instance.
node
node_tree The internal node tree for this group node.
o Output socket accessor. Subclasses narrow the return type via TYPE_CHECKING.
outputs
tree The TreeBuilder instance this node belongs to and is being built within.

Methods

Name Description
create_group Build this group’s node tree and return it, reusing an existing tree
create_group
create_group()

Build this group’s node tree and return it, reusing an existing tree of the same name.

Unlike instantiating the class, this needs no active TreeBuilder context — it opens its own — so a group can be pre-built and reused directly (e.g. assigned to a node’s node_tree) instead of being created by constructing the class inside a tree.