unreal.OptimusNodeGraph

class unreal.OptimusNodeGraph(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

Optimus Node Graph

C++ Source:

  • Plugin: DeformerGraph

  • Module: OptimusCore

  • File: OptimusNodeGraph.h

Editor Properties: (see get_editor_property/set_editor_property)

  • graph_type (OptimusNodeGraphType): [Read-Only] The type of graph this represents.

add_component_binding_get_node(component_binding, position) OptimusNode

Add Component Binding Get Node

Parameters:
Return type:

OptimusNode

add_data_interface_node(data_interface_class, position) OptimusNode

Add Data Interface Node

Parameters:
Return type:

OptimusNode

add_function_reference_node(function_graph, position) OptimusNode

Add Function Reference Node

Parameters:
Return type:

OptimusNode

Add Link

Parameters:
Return type:

bool

add_loop_terminal_nodes(position) Array[OptimusNode]

Add Loop Terminal Nodes

Parameters:

position (Vector2D) –

Return type:

Array[OptimusNode]

add_node(node_class, position) OptimusNode

TODO: Add magic connection from a pin.

Parameters:
Return type:

OptimusNode

add_resource_get_node(resource_desc, position) OptimusNode

Add Resource Get Node

Parameters:
Return type:

OptimusNode

add_resource_node(resource_desc, position) OptimusNode

Add Resource Node

Parameters:
Return type:

OptimusNode

add_resource_set_node(resource_desc, position) OptimusNode

Add Resource Set Node

Parameters:
Return type:

OptimusNode

add_value_node(data_type_ref, position) OptimusNode

Add Value Node

Parameters:
Return type:

OptimusNode

add_variable_get_node(variable_desc, position) OptimusNode

Add Variable Get Node

Parameters:
Return type:

OptimusNode

collapse_nodes_to_function(nodes) OptimusNode

Take a set of nodes and collapse them into a single function, replacing the given nodes with the new function node and returning it. A new function definition is made available as a new Function graph in the package.

Parameters:

nodes (Array[OptimusNode]) –

Return type:

OptimusNode

collapse_nodes_to_sub_graph(nodes) OptimusNode

Take a set of nodes and collapse them into a subgraph, replacing the given nodes with a new subgraph node and returning it.

Parameters:

nodes (Array[OptimusNode]) –

Return type:

OptimusNode

convert_custom_kernel_to_function(custom_kernel) OptimusNode

Takes a custom kernel and converts to a packaged function. If the given node is not a custom kernel or cannot be converted, a nullptr is returned.

Parameters:

custom_kernel (OptimusNode) –

Return type:

OptimusNode

convert_function_to_custom_kernel(kernel_function) OptimusNode

Takes a kernel function and unpackages to a custom kernel. If the given node is not a kernel function or cannot be converted, a nullptr is returned.

Parameters:

kernel_function (OptimusNode) –

Return type:

OptimusNode

convert_to_function(sub_graph_node) bool

Take a subgraph node convert it to a function in-place

Parameters:

sub_graph_node (OptimusNode) –

Return type:

bool

convert_to_sub_graph(function_node) bool

Take a function node convert it to a subgraph node in-place

Parameters:

function_node (OptimusNode) –

Return type:

bool

duplicate_node(node, position) OptimusNode

Duplicate Node

Parameters:
Return type:

OptimusNode

duplicate_nodes(nodes, position) bool

Duplicate a collection of nodes from the same graph, using the InPosition position to be the top-left origin of the pasted nodes.

Parameters:
Return type:

bool

expand_collapsed_nodes(graph_reference_node) Array[OptimusNode]

Take a function or subgraph node and expand it in-place, replacing the given function node. The function definition still remains, if a function node was expanded. If a sub-graph was expanded, the sub-graph is deleted.

Parameters:

graph_reference_node (OptimusNode) –

Return type:

Array[OptimusNode]

get_graph_index() int32

Get Graph Index

Return type:

int32

get_graph_type() OptimusNodeGraphType

Get Graph Type

Return type:

OptimusNodeGraphType

get_graphs() Array[OptimusNodeGraph]

Get Graphs

Return type:

Array[OptimusNodeGraph]

property graph_type: OptimusNodeGraphType

[Read-Only] The type of graph this represents.

Type:

(OptimusNodeGraphType)

is_custom_kernel(node) bool

Returns true if the node in question is a custom kernel node that can be converted to a kernel function with ConvertCustomKernelToFunction.

Parameters:

node (OptimusNode) –

Return type:

bool

is_execution_graph() bool

Is Execution Graph

Return type:

bool

is_function_graph() bool

Is Function Graph

Return type:

bool

is_function_reference(node) bool

Returns true if the node in question is a function reference node that can be expanded into a group of nodes using ExpandFunctionToNodes.

Parameters:

node (OptimusNode) –

Return type:

bool

is_kernel_function(node) bool

Returns true if the node in question is a kernel function node that can be converted to a custom kernel using ConvertFunctionToCustomKernel.

Parameters:

node (OptimusNode) –

Return type:

bool

is_sub_graph_reference(node) bool

Returns true if the node in question is a function sub-graph node that can be expanded into a group of nodes using ExpandFunctionToNodes.

Parameters:

node (OptimusNode) –

Return type:

bool

move_graph_direct(graph, insert_before) bool

Move Graph Direct

Parameters:
Return type:

bool

brief: Removes all links to the given pin, whether it’s an input or an output pin.

Parameters:

node_pin (OptimusNodePin) –

Return type:

bool

brief: Removes a single link between two nodes. FIXME: Use UOptimusNodeLink instead.

Parameters:
Return type:

bool

remove_node(node) bool

Remove Node

Parameters:

node (OptimusNode) –

Return type:

bool

remove_nodes(nodes) bool

Remove Nodes

Parameters:

nodes (Array[OptimusNode]) –

Return type:

bool

rename_graph(graph, new_name) bool

Rename Graph

Parameters:
Return type:

bool

rename_graph_direct(graph, new_name) bool

Rename Graph Direct

Parameters:
Return type:

bool