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
- add_link(node_output_pin, node_input_pin) bool ¶
Add Link
- Parameters
node_output_pin (OptimusNodePin) –
node_input_pin (OptimusNodePin) –
- Return type
- add_node(node_class, position) OptimusNode ¶
TODO: Add magic connection from a pin.
- Parameters
- Return type
- add_resource_get_node(resource_desc, position) OptimusNode ¶
Add Resource Get Node
- Parameters
resource_desc (OptimusResourceDescription) –
position (Vector2D) –
- Return type
- add_resource_set_node(resource_desc, position) OptimusNode ¶
Add Resource Set Node
- Parameters
resource_desc (OptimusResourceDescription) –
position (Vector2D) –
- Return type
- add_value_node(data_type_ref, position) OptimusNode ¶
Add Value Node
- Parameters
data_type_ref (OptimusDataTypeRef) –
position (Vector2D) –
- Return type
- add_variable_get_node(variable_desc, position) OptimusNode ¶
Add Variable Get Node
- Parameters
variable_desc (OptimusVariableDescription) –
position (Vector2D) –
- Return type
- 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
- 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
- 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
- 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
- duplicate_node(node, position) OptimusNode ¶
Duplicate Node
- Parameters
node (OptimusNode) –
position (Vector2D) –
- Return type
- 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
nodes (Array(OptimusNode)) –
position (Vector2D) –
- Return type
- 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
- get_graph_index() int32 ¶
Get Graph Index
- Return type
int32
- get_graph_type() OptimusNodeGraphType ¶
Get Graph Type
- Return type
- get_graphs()¶
Get Graphs
- Return type
- property graph_type¶
[Read-Only] Graph Type: The type of graph this represents.
- Type
- 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
- 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
- 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
- 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
- move_graph(graph, insert_before) bool ¶
Move Graph
- Parameters
graph (OptimusNodeGraph) –
insert_before (int32) –
- Return type
- remove_all_links(node_pin) bool ¶
brief: Removes all links to the given pin, whether it’s an input or an output pin.
- Parameters
node_pin (OptimusNodePin) –
- Return type
- remove_link(node_output_pin, node_input_pin) bool ¶
brief: Removes a single link between two nodes. FIXME: Use UOptimusNodeLink instead.
- Parameters
node_output_pin (OptimusNodePin) –
node_input_pin (OptimusNodePin) –
- Return type
- remove_node(node) bool ¶
Remove Node
- Parameters
node (OptimusNode) –
- Return type
- remove_nodes(nodes) bool ¶
Remove Nodes
- Parameters
nodes (Array(OptimusNode)) –
- Return type
- rename_graph(graph, new_name) bool ¶
Rename Graph
- Parameters
graph (OptimusNodeGraph) –
new_name (str) –
- Return type