unreal.RigVMController

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

Bases: unreal.Object

The Controller is the sole authority to perform changes on the Graph. The Controller itself is stateless. The Controller offers a Modified event to subscribe to for user interface views - so they can be informed about any change that’s happening within the Graph. The Controller routes all changes through the Graph itself, so you can have N Controllers performing edits on 1 Graph, and N Views subscribing to 1 Controller. In Python you can also subscribe to this event to be able to react to topological changes of the Graph there.

C++ Source:

  • Module: RigVMDeveloper

  • File: RigVMController.h

Editor Properties: (see get_editor_property/set_editor_property)

  • modified_event (RigVMGraphModifiedDynamicEvent): [Read-Write] Modified Event Dynamic

add_array_node(op_code, cpp_type, cpp_type_object, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMArrayNode

Adds a Array Node to the edited Graph. This causes a NodeAdded modified event.

Parameters
Return type

RigVMArrayNode

add_array_node_from_object_path(op_code, cpp_type, cpp_type_object_path, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMArrayNode

Adds a Array Node to the edited Graph given a struct object path name. This causes a NodeAdded modified event.

Parameters
  • op_code (RigVMOpCode) –

  • cpp_type (str) –

  • cpp_type_object_path (str) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMArrayNode

add_array_pin(array_pin_path, default_value='', setup_undo_redo=True, print_python_command=False) str

Adds an array element pin to the end of an array pin. This causes a PinArraySizeChanged modified event.

Parameters
  • array_pin_path (str) –

  • default_value (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

str

add_branch_node(position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMBranchNode

Adds a branch node to the graph. Branch nodes can be used to split the execution of into multiple branches, allowing to drive behavior by logic.

Parameters
  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMBranchNode

add_comment_node(comment_text, position=[0.000000, 0.000000], size=[400.000000, 300.000000], color=[0.000000, 0.000000, 0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMCommentNode

Adds a Comment Node to the edited Graph. Comments can be used to annotate the Graph. This causes a NodeAdded modified event.

Parameters
Return type

RigVMCommentNode

add_enum_node(cpp_type_object_path, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMEnumNode

Adds an enum node to the graph Enum nodes can be used to represent constant enum values within the graph

Parameters
  • cpp_type_object_path (Name) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMEnumNode

add_exposed_pin(pin_name, direction, cpp_type, cpp_type_object_path, default_value, setup_undo_redo=True, print_python_command=False) Name

Adds an exposed pin to the graph controlled by this

Parameters
Return type

Name

add_free_reroute_node(show_as_full_node, cpp_type, cpp_type_object_path, is_constant, custom_widget_name, default_value, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True) RigVMRerouteNode

Adds a free Reroute Node

Parameters
  • show_as_full_node (bool) –

  • cpp_type (str) –

  • cpp_type_object_path (Name) –

  • is_constant (bool) –

  • custom_widget_name (Name) –

  • default_value (str) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

Return type

RigVMRerouteNode

add_function_reference_node(function_definition, node_position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMFunctionReferenceNode

Adds a function reference / invocation to the graph

Parameters
Return type

RigVMFunctionReferenceNode

add_function_to_library(function_name, mutable, node_position=[0.000000, 0.000000], setup_undo_redo=True, print_python_command=False) RigVMLibraryNode

Adds a function definition to a function library graph

Parameters
  • function_name (Name) –

  • mutable (bool) –

  • node_position (Vector2D) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMLibraryNode

add_if_node(cpp_type, cpp_type_object_path, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMIfNode

Adds an if node to the graph. If nodes can be used to pick between two values based on a condition.

Parameters
  • cpp_type (str) –

  • cpp_type_object_path (Name) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMIfNode

add_if_node_from_struct(script_struct, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True) RigVMIfNode

Add if Node from Struct

Parameters
Return type

RigVMIfNode

add_injected_node(pin_path, as_input, script_struct, method_name, input_pin_name, output_pin_name, node_name='', setup_undo_redo=True, print_python_command=False) RigVMInjectionInfo

Adds a Function / Struct Node to the edited Graph as an injected node UnitNode represent a RIGVM_METHOD declaration on a USTRUCT. This causes a NodeAdded modified event.

Parameters
  • pin_path (str) –

  • as_input (bool) –

  • script_struct (ScriptStruct) –

  • method_name (Name) –

  • input_pin_name (Name) –

  • output_pin_name (Name) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMInjectionInfo

add_injected_node_from_struct_path(pin_path, as_input, script_struct_path, method_name, input_pin_name, output_pin_name, node_name='', setup_undo_redo=True) RigVMInjectionInfo

Adds a Function / Struct Node to the edited Graph as an injected node UnitNode represent a RIGVM_METHOD declaration on a USTRUCT. This causes a NodeAdded modified event.

Parameters
  • pin_path (str) –

  • as_input (bool) –

  • script_struct_path (str) –

  • method_name (Name) –

  • input_pin_name (Name) –

  • output_pin_name (Name) –

  • node_name (str) –

  • setup_undo_redo (bool) –

Return type

RigVMInjectionInfo

Adds a link to the graph. This causes a LinkAdded modified event.

Parameters
  • output_pin_path (str) –

  • input_pin_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

add_local_variable(variable_name, cpp_type, cpp_type_object, default_value, setup_undo_redo=True, print_python_command=False) RigVMGraphVariableDescription

Add a local variable to the graph

Parameters
  • variable_name (Name) –

  • cpp_type (str) –

  • cpp_type_object (Object) –

  • default_value (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMGraphVariableDescription

add_local_variable_from_object_path(variable_name, cpp_type, cpp_type_object_path, default_value, setup_undo_redo=True) RigVMGraphVariableDescription

Add a local variable to the graph given a struct object path name.

Parameters
  • variable_name (Name) –

  • cpp_type (str) –

  • cpp_type_object_path (str) –

  • default_value (str) –

  • setup_undo_redo (bool) –

Return type

RigVMGraphVariableDescription

add_parameter_node(parameter_name, cpp_type, cpp_type_object, is_input, default_value, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMParameterNode

Adds a Parameter Node to the edited Graph. Parameters represent input or output arguments to the Graph / Function. Input Parameters are constant values / literals. This causes a NodeAdded modified event.

Parameters
  • parameter_name (Name) –

  • cpp_type (str) –

  • cpp_type_object (Object) –

  • is_input (bool) –

  • default_value (str) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMParameterNode

add_parameter_node_from_object_path(parameter_name, cpp_type, cpp_type_object_path, is_input, default_value, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMParameterNode

Adds a Parameter Node to the edited Graph given a struct object path name. Parameters represent input or output arguments to the Graph / Function. Input Parameters are constant values / literals. This causes a NodeAdded modified event.

Parameters
  • parameter_name (Name) –

  • cpp_type (str) –

  • cpp_type_object_path (str) –

  • is_input (bool) –

  • default_value (str) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMParameterNode

add_prototype_node(notation, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMPrototypeNode

Adds a prototype node to the graph.

Parameters
  • notation (Name) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMPrototypeNode

Adds a Reroute Node on an existing Link to the edited Graph. Reroute Nodes can be used to visually improve the data flow, they don’t require any additional memory though and are purely cosmetic. This causes a NodeAdded modified event.

Parameters
Return type

RigVMRerouteNode

Adds a Reroute Node on an existing Link to the edited Graph given the Link’s string representation. Reroute Nodes can be used to visually improve the data flow, they don’t require any additional memory though and are purely cosmetic. This causes a NodeAdded modified event.

Parameters
  • link_pin_path_representation (str) –

  • show_as_full_node (bool) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMRerouteNode

add_reroute_node_on_pin(pin_path, as_input, show_as_full_node, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMRerouteNode

Adds a Reroute Node on an existing Pin to the editor Graph. Reroute Nodes can be used to visually improve the data flow, they don’t require any additional memory though and are purely cosmetic. This causes a NodeAdded modified event.

Parameters
  • pin_path (str) –

  • as_input (bool) –

  • show_as_full_node (bool) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMRerouteNode

add_select_node(cpp_type, cpp_type_object_path, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMSelectNode

Adds a select node to the graph. Select nodes can be used to pick between multiple values based on an index.

Parameters
  • cpp_type (str) –

  • cpp_type_object_path (Name) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMSelectNode

add_select_node_from_struct(script_struct, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True) RigVMSelectNode

Add Select Node from Struct

Parameters
Return type

RigVMSelectNode

add_unit_node(script_struct, method_name='Execute', position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMUnitNode

Adds a Function / Struct Node to the edited Graph. UnitNode represent a RIGVM_METHOD declaration on a USTRUCT. This causes a NodeAdded modified event.

Parameters
Return type

RigVMUnitNode

add_unit_node_from_struct_path(script_struct_path, method_name='Execute', position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMUnitNode

Adds a Function / Struct Node to the edited Graph given its struct object path name. UnitNode represent a RIGVM_METHOD declaration on a USTRUCT. This causes a NodeAdded modified event.

Parameters
  • script_struct_path (str) –

  • method_name (Name) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMUnitNode

add_variable_node(variable_name, cpp_type, cpp_type_object, is_getter, default_value, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMVariableNode

Adds a Variable Node to the edited Graph. Variables represent local work state for the function and can be read from and written to. This causes a NodeAdded modified event.

Parameters
  • variable_name (Name) –

  • cpp_type (str) –

  • cpp_type_object (Object) –

  • is_getter (bool) –

  • default_value (str) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMVariableNode

add_variable_node_from_object_path(variable_name, cpp_type, cpp_type_object_path, is_getter, default_value, position=[0.000000, 0.000000], node_name='', setup_undo_redo=True, print_python_command=False) RigVMVariableNode

Adds a Variable Node to the edited Graph given a struct object path name. Variables represent local work state for the function and can be read from (bIsGetter == true) or written to (bIsGetter == false). This causes a NodeAdded modified event.

Parameters
  • variable_name (Name) –

  • cpp_type (str) –

  • cpp_type_object_path (str) –

  • is_getter (bool) –

  • default_value (str) –

  • position (Vector2D) –

  • node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMVariableNode

bind_pin_to_variable(pin_path, new_bound_variable_path, setup_undo_redo=True, print_python_command=False) bool

Binds a pin to a variable (or removes the binding given NAME_None) This causes a PinBoundVariableChanged modified event.

Parameters
  • pin_path (str) –

  • new_bound_variable_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

Removes all links on a given pin from the graph. This might cause multiple LinkRemoved modified event.

Parameters
  • pin_path (str) –

  • as_input (bool) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

Removes a link from the graph. This causes a LinkRemoved modified event.

Parameters
  • output_pin_path (str) –

  • input_pin_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

can_import_nodes_from_text(text) bool

Exports the given nodes as text

Parameters

text (str) –

Return type

bool

cancel_undo_bracket() bool

Cancels an undo bracket / scoped transaction. This is primarily useful for Python. This causes a UndoBracketCanceled modified event.

Return type

bool

change_exposed_pin_type(pin_name, cpp_type, cpp_type_object_path, setup_undo_redo, setup_orphan_pins=True, print_python_command=False) bool or None

Changes the type of an exposed pin in the graph controlled by this

Parameters
  • pin_name (Name) –

  • cpp_type (str) –

  • cpp_type_object_path (Name) –

  • setup_undo_redo (bool) –

  • setup_orphan_pins (bool) –

  • print_python_command (bool) –

Returns

setup_undo_redo (bool):

Return type

bool or None

clear_array_pin(array_pin_path, setup_undo_redo=True, print_python_command=False) bool

Removes all (but one) array element pin from an array pin. This causes a PinArraySizeChanged modified event.

Parameters
  • array_pin_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

clear_node_selection(setup_undo_redo=True, print_python_command=False) bool

Deselects all currently selected nodes in the graph. This might cause several NodeDeselected modified event.

Parameters
  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

close_undo_bracket() bool

Closes an undo bracket / scoped transaction. This is primarily useful for Python. This causes a UndoBracketClosed modified event.

Return type

bool

collapse_nodes(node_names, collapse_node_name='', setup_undo_redo=True, print_python_command=False) RigVMCollapseNode

Turns a series of nodes into a Collapse node

Parameters
  • node_names (Array(Name)) –

  • collapse_node_name (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMCollapseNode

duplicate_array_pin(array_element_pin_path, setup_undo_redo=True, print_python_command=False) str

Duplicates an array element pin. This causes a PinArraySizeChanged modified event.

Parameters
  • array_element_pin_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

str

eject_node_from_pin(pin_path, setup_undo_redo=True, print_python_command=False) RigVMNode

Ejects the last injected node on a pin

Parameters
  • pin_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMNode

enable_reporting(enabled=True) None

Enables or disables the error reporting of this Controller.

Parameters

enabled (bool) –

expand_library_node(node_name, setup_undo_redo=True, print_python_command=False)

Turns a library node into its contained nodes

Parameters
  • node_name (Name) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

Array(RigVMNode)

export_nodes_to_text(node_names) str

Exports the given nodes as text

Parameters

node_names (Array(Name)) –

Return type

str

export_selected_nodes_to_text() str

Exports the selected nodes as text

Return type

str

generate_python_commands()

Generate Python Commands

Return type

Array(str)

get_graph() RigVMGraph

Returns the currently edited Graph of this controller.

Return type

RigVMGraph

get_pin_default_value(pin_path) str

Returns the default value of a pin given its pinpath.

Parameters

pin_path (str) –

Return type

str

get_top_level_graph() RigVMGraph

Returns the top level graph

Return type

RigVMGraph

import_nodes_from_text(text, setup_undo_redo=True, print_python_commands=False)

Exports the given nodes as text

Parameters
  • text (str) –

  • setup_undo_redo (bool) –

  • print_python_commands (bool) –

Return type

Array(Name)

insert_array_pin(array_pin_path, index=- 1, default_value='', setup_undo_redo=True, print_python_command=False) str

Inserts an array element pin into an array pin. This causes a PinArraySizeChanged modified event.

Parameters
  • array_pin_path (str) –

  • index (int32) –

  • default_value (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

str

is_reporting_enabled() bool

Returns true if reporting is enabled

Return type

bool

localize_function(function_definition, localize_dependent_private_functions=True, setup_undo_redo=True, print_python_command=False) RigVMLibraryNode

Copies a function declaration into this graph’s local function library

Parameters
  • function_definition (RigVMLibraryNode) –

  • localize_dependent_private_functions (bool) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

RigVMLibraryNode

localize_functions(function_definitions, localize_dependent_private_functions=True, setup_undo_redo=True, print_python_command=False)

Copies a series of function declaratioms into this graph’s local function library

Parameters
Return type

Map(RigVMLibraryNode, RigVMLibraryNode)

make_bindings_from_variable_node(node_name, setup_undo_redo=True, print_python_command=False) bool

Turns a variable node into one or more bindings

Parameters
  • node_name (Name) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

make_variable_node_from_binding(pin_path, node_position=[0.000000, 0.000000], setup_undo_redo=True, print_python_command=False) bool

Turns a binding to a variable node

Parameters
  • pin_path (str) –

  • node_position (Vector2D) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

property modified_event

[Read-Only] Modified Event Dynamic

Type

(RigVMGraphModifiedDynamicEvent)

on_external_variable_removed(var_name, setup_undo_redo) None

Removes all nodes related to a given variable

Parameters
  • var_name (Name) –

  • setup_undo_redo (bool) –

on_external_variable_renamed(old_var_name, new_var_name, setup_undo_redo) None

Renames the variable name in all relevant nodes

Parameters
  • old_var_name (Name) –

  • new_var_name (Name) –

  • setup_undo_redo (bool) –

on_external_variable_type_changed(var_name, cpp_type, cpp_type_object, setup_undo_redo) None

Changes the data type of all nodes matching a given variable name

Parameters
  • var_name (Name) –

  • cpp_type (str) –

  • cpp_type_object (Object) –

  • setup_undo_redo (bool) –

on_external_variable_type_changed_from_object_path(var_name, cpp_type, cpp_type_object_path, setup_undo_redo) None

On External Variable Type Changed from Object Path

Parameters
  • var_name (Name) –

  • cpp_type (str) –

  • cpp_type_object_path (str) –

  • setup_undo_redo (bool) –

open_undo_bracket(title) bool

Opens an undo bracket / scoped transaction for a series of actions to be performed as one step on the Undo stack. This is primarily useful for Python. This causes a UndoBracketOpened modified event.

Parameters

title (str) –

Return type

bool

pop_graph(setup_undo_redo=True) RigVMGraph

Pops the last graph off the stack This causes a GraphChanged modified event.

Parameters

setup_undo_redo (bool) –

Return type

RigVMGraph

promote_collapse_node_to_function_reference_node(node_name, setup_undo_redo=True, print_python_command=False, existing_function_definition_path='') Name

Turns a collapse node into a function node

Parameters
  • node_name (Name) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

  • existing_function_definition_path (str) –

Return type

Name

promote_function_reference_node_to_collapse_node(node_name, setup_undo_redo=True, print_python_command=False, remove_function_definition=False) Name

Turns a collapse node into a function node

Parameters
  • node_name (Name) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

  • remove_function_definition (bool) –

Return type

Name

promote_pin_to_variable(pin_path, create_variable_node, node_position=[0.000000, 0.000000], setup_undo_redo=True, print_python_command=False) bool

Promotes a pin to a variable

Parameters
  • pin_path (str) –

  • create_variable_node (bool) –

  • node_position (Vector2D) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

push_graph(graph, setup_undo_redo=True) None

Pushes a new graph to the stack This causes a GraphChanged modified event.

Parameters
redo() bool

Re-does the last action on the stack. Note: This should really only be used for unit tests, use the GEditor’s main Undo method instead.

Return type

bool

refresh_variable_node(node_name, variable_name, cpp_type, cpp_type_object, setup_undo_redo, setup_orphan_pins=True) None

Refreshes the variable node with the new data

Parameters
  • node_name (Name) –

  • variable_name (Name) –

  • cpp_type (str) –

  • cpp_type_object (Object) –

  • setup_undo_redo (bool) –

  • setup_orphan_pins (bool) –

remove_array_pin(array_element_pin_path, setup_undo_redo=True, print_python_command=False) bool

Removes an array element pin from an array pin. This causes a PinArraySizeChanged modified event.

Parameters
  • array_element_pin_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

remove_exposed_pin(pin_name, setup_undo_redo=True, print_python_command=False) bool

Removes an exposed pin from the graph controlled by this

Parameters
  • pin_name (Name) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

remove_function_from_library(function_name, setup_undo_redo=True) bool

Removes a function from a function library graph

Parameters
  • function_name (Name) –

  • setup_undo_redo (bool) –

Return type

bool

remove_injected_node(pin_path, as_input, setup_undo_redo=True, print_python_command=False) bool

Removes an injected node This causes a NodeRemoved modified event.

Parameters
  • pin_path (str) –

  • as_input (bool) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

remove_local_variable(variable_name, setup_undo_redo=True, print_python_command=False) bool

Remove a local variable from the graph

Parameters
  • variable_name (Name) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

remove_node(node, setup_undo_redo=True, recursive=False, print_python_command=False, relink_pins=False) bool

Removes a node from the graph This causes a NodeRemoved modified event.

Parameters
  • node (RigVMNode) –

  • setup_undo_redo (bool) –

  • recursive (bool) –

  • print_python_command (bool) –

  • relink_pins (bool) –

Return type

bool

remove_node_by_name(node_name, setup_undo_redo=True, recursive=False, print_python_command=False, relink_pins=False) bool

Removes a node from the graph given the node’s name. This causes a NodeRemoved modified event.

Parameters
  • node_name (Name) –

  • setup_undo_redo (bool) –

  • recursive (bool) –

  • print_python_command (bool) –

  • relink_pins (bool) –

Return type

bool

rename_exposed_pin(old_pin_name, new_pin_name, setup_undo_redo=True, print_python_command=False) bool

Renames an exposed pin in the graph controlled by this

Parameters
  • old_pin_name (Name) –

  • new_pin_name (Name) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

rename_function(old_function_name, new_function_name, setup_undo_redo=True) bool

Renames a function in the function library

Parameters
  • old_function_name (Name) –

  • new_function_name (Name) –

  • setup_undo_redo (bool) –

Return type

bool

rename_local_variable(variable_name, new_variable_name, setup_undo_redo=True, print_python_command=False) bool

Rename a local variable from the graph

Parameters
  • variable_name (Name) –

  • new_variable_name (Name) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

rename_node(node, new_name, setup_undo_redo=True, print_python_command=False) bool

Renames a node in the graph This causes a NodeRenamed modified event.

Parameters
Return type

bool

rename_parameter(old_name, new_name, setup_undo_redo=True) bool

Renames a parameter in the graph. This causes a ParameterRenamed modified event.

Parameters
  • old_name (Name) –

  • new_name (Name) –

  • setup_undo_redo (bool) –

Return type

bool

rename_variable(old_name, new_name, setup_undo_redo=True) bool

Renames a variable in the graph. This causes a VariableRenamed modified event.

Parameters
  • old_name (Name) –

  • new_name (Name) –

  • setup_undo_redo (bool) –

Return type

bool

replace_parameter_node_with_variable(node_name, variable_name, cpp_type, cpp_type_object, setup_undo_redo) RigVMVariableNode

Refreshes the variable node with the new data

Parameters
  • node_name (Name) –

  • variable_name (Name) –

  • cpp_type (str) –

  • cpp_type_object (Object) –

  • setup_undo_redo (bool) –

Return type

RigVMVariableNode

reset_pin_default_value(pin_path, setup_undo_redo=True, print_python_command=False) bool

Resets the default value of a pin given its pinpath. This causes a PinDefaultValueChanged modified event.

Parameters
  • pin_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

select_node(node, select=True, setup_undo_redo=True, print_python_command=False) bool

Selects a single node in the graph. This causes a NodeSelected / NodeDeselected modified event.

Parameters
Return type

bool

select_node_by_name(node_name, select=True, setup_undo_redo=True) bool

Selects a single node in the graph by name. This causes a NodeSelected / NodeDeselected modified event.

Parameters
  • node_name (Name) –

  • select (bool) –

  • setup_undo_redo (bool) –

Return type

bool

set_array_pin_size(array_pin_path, size, default_value='', setup_undo_redo=True, print_python_command=False) bool

Sets the size of the array pin This causes a PinArraySizeChanged modified event.

Parameters
  • array_pin_path (str) –

  • size (int32) –

  • default_value (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_comment_text(node, comment_text, comment_font_size, comment_bubble_visible, comment_color_bubble, setup_undo_redo=True, print_python_command=False) bool

Sets the comment text and properties of a comment node in the graph. This causes a CommentTextChanged modified event.

Parameters
  • node (RigVMNode) –

  • comment_text (str) –

  • comment_font_size (int32) –

  • comment_bubble_visible (bool) –

  • comment_color_bubble (bool) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_comment_text_by_name(node_name, comment_text, comment_font_size, comment_bubble_visible, comment_color_bubble, setup_undo_redo=True, print_python_command=False) bool

Sets the comment text and properties of a comment node in the graph by name. This causes a CommentTextChanged modified event.

Parameters
  • node_name (Name) –

  • comment_text (str) –

  • comment_font_size (int32) –

  • comment_bubble_visible (bool) –

  • comment_color_bubble (bool) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_exposed_pin_index(pin_name, new_index, setup_undo_redo=True, print_python_command=False) bool

Sets the index for an exposed pin. This can be used to move the pin up and down on the node.

Parameters
  • pin_name (Name) –

  • new_index (int32) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_graph(graph) None

Sets the currently edited Graph of this controller. This causes a GraphChanged modified event.

Parameters

graph (RigVMGraph) –

set_is_running_unit_test(is_running) None

Helper function to disable a series of checks that can be ignored during a unit test

Parameters

is_running (bool) –

set_local_variable_default_value(variable_name, default_value, setup_undo_redo=True, print_python_command=False, notify=True) bool

Set Local Variable Default Value

Parameters
  • variable_name (Name) –

  • default_value (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

  • notify (bool) –

Return type

bool

set_local_variable_type(variable_name, cpp_type, cpp_type_object, setup_undo_redo=True, print_python_command=False) bool

Sets the type of the local variable

Parameters
  • variable_name (Name) –

  • cpp_type (str) –

  • cpp_type_object (Object) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_local_variable_type_from_object_path(variable_name, cpp_type, cpp_type_object_path, setup_undo_redo=True, print_python_command=False) bool

Set Local Variable Type from Object Path

Parameters
  • variable_name (Name) –

  • cpp_type (str) –

  • cpp_type_object_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_node_category(node, category, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the category of a node in the graph. This causes a NodeCategoryChanged modified event.

Parameters
Return type

bool

set_node_category_by_name(node_name, category, setup_undo_redo=True, merge_undo_action=False) bool

Sets the category of a node in the graph. This causes a NodeCategoryChanged modified event.

Parameters
  • node_name (Name) –

  • category (str) –

  • setup_undo_redo (bool) –

  • merge_undo_action (bool) –

Return type

bool

set_node_color(node, color, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the color of a node in the graph. This causes a NodeColorChanged modified event.

Parameters
Return type

bool

set_node_color_by_name(node_name, color, setup_undo_redo=True, merge_undo_action=False) bool

Sets the color of a node in the graph by name. This causes a NodeColorChanged modified event.

Parameters
Return type

bool

set_node_description(node, description, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the function description of a node in the graph. This causes a NodeDescriptionChanged modified event.

Parameters
Return type

bool

set_node_description_by_name(node_name, description, setup_undo_redo=True, merge_undo_action=False) bool

Sets the keywords of a node in the graph. This causes a NodeDescriptionChanged modified event.

Parameters
  • node_name (Name) –

  • description (str) –

  • setup_undo_redo (bool) –

  • merge_undo_action (bool) –

Return type

bool

set_node_keywords(node, keywords, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the keywords of a node in the graph. This causes a NodeKeywordsChanged modified event.

Parameters
Return type

bool

set_node_keywords_by_name(node_name, keywords, setup_undo_redo=True, merge_undo_action=False) bool

Sets the keywords of a node in the graph. This causes a NodeKeywordsChanged modified event.

Parameters
  • node_name (Name) –

  • keywords (str) –

  • setup_undo_redo (bool) –

  • merge_undo_action (bool) –

Return type

bool

set_node_position(node, position, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the position of a node in the graph. This causes a NodePositionChanged modified event.

Parameters
Return type

bool

set_node_position_by_name(node_name, position, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the position of a node in the graph by name. This causes a NodePositionChanged modified event.

Parameters
  • node_name (Name) –

  • position (Vector2D) –

  • setup_undo_redo (bool) –

  • merge_undo_action (bool) –

  • print_python_command (bool) –

Return type

bool

set_node_selection(node_names, setup_undo_redo=True, print_python_command=False) bool

Selects the nodes given the selection This might cause several NodeDeselected modified event.

Parameters
  • node_names (Array(Name)) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_node_size(node, size, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the size of a node in the graph. This causes a NodeSizeChanged modified event.

Parameters
Return type

bool

set_node_size_by_name(node_name, size, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the size of a node in the graph by name. This causes a NodeSizeChanged modified event.

Parameters
  • node_name (Name) –

  • size (Vector2D) –

  • setup_undo_redo (bool) –

  • merge_undo_action (bool) –

  • print_python_command (bool) –

Return type

bool

set_pin_default_value(pin_path, default_value, resize_arrays=True, setup_undo_redo=True, merge_undo_action=False, print_python_command=False) bool

Sets the default value of a pin given its pinpath. This causes a PinDefaultValueChanged modified event.

Parameters
  • pin_path (str) –

  • default_value (str) –

  • resize_arrays (bool) –

  • setup_undo_redo (bool) –

  • merge_undo_action (bool) –

  • print_python_command (bool) –

Return type

bool

set_pin_expansion(pin_path, is_expanded, setup_undo_redo=True, print_python_command=False) bool

Sets the pin to be expanded or not This causes a PinExpansionChanged modified event.

Parameters
  • pin_path (str) –

  • is_expanded (bool) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_pin_is_watched(pin_path, is_watched, setup_undo_redo=True) bool

Sets the pin to be watched (or not) This causes a PinWatchedChanged modified event.

Parameters
  • pin_path (str) –

  • is_watched (bool) –

  • setup_undo_redo (bool) –

Return type

bool

set_remapped_variable(function_ref_node, inner_variable_name, outer_variable_name, setup_undo_redo=True) bool

Sets the remapped variable on a function reference node

Parameters
Return type

bool

set_reroute_compactness(node, show_as_full_node, setup_undo_redo=True, print_python_command=False) bool

Sets the compactness of a reroute node in the graph. This causes a RerouteCompactnessChanged modified event.

Parameters
  • node (RigVMNode) –

  • show_as_full_node (bool) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

set_reroute_compactness_by_name(node_name, show_as_full_node, setup_undo_redo=True) bool

Sets the compactness of a reroute node in the graph by name. This causes a RerouteCompactnessChanged modified event.

Parameters
  • node_name (Name) –

  • show_as_full_node (bool) –

  • setup_undo_redo (bool) –

Return type

bool

unbind_pin_from_variable(pin_path, setup_undo_redo=True, print_python_command=False) bool

Removes the binging of a pin to a variable This causes a PinBoundVariableChanged modified event.

Parameters
  • pin_path (str) –

  • setup_undo_redo (bool) –

  • print_python_command (bool) –

Return type

bool

undo() bool

Un-does the last action on the stack. Note: This should really only be used for unit tests, use the GEditor’s main Undo method instead.

Return type

bool