unreal.OptimusNodeGraph

class unreal.OptimusNodeGraph(outer=None, name='None')

Bases: unreal.Object

Optimus Node Graph

C++ Source:

  • Plugin: Optimus

  • Module: OptimusCore

  • File: OptimusNodeGraph.h

Editor Properties: (see get_editor_property/set_editor_property)

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

add_data_interface_node(data_interface_class, position) OptimusNode

Add Data Interface Node

Parameters
Return type

OptimusNode

Add Link

Parameters
Return type

bool

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_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

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(function_node)

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

function_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()

Get Graphs

Return type

Array(OptimusNodeGraph)

property graph_type

[Read-Only] Graph Type: 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(graph, insert_before) bool

Move Graph

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