Node

- class Node
Base class of all Rumba nodes.
A Node has plugs and children nodes.
Python example
# Create a root node node = Node("Node", "node", None) # Create two children nodes child0 = Node("Node", "child", node) child1 = Node("Node", "child", node) # Test if a child exists if node.has_child("child"): # Get a child node child = node.child("child") # Get the parent node parent = child.parent() # Iterates the children for child in node.children(): name = child.name() # Get a node plug plug = node.plug("structure") plug = node.structure # alternative # Iterate the plugs for p in node.plugs(): name = p.name() # Create a Lerp plug-in node lerp = Node("Lerp", "lerp", None) # Get a plug weight = lerp.weight # Set its value weight.set_value(0.5)
Constructors
__init__Methods
__eq__Return self==value.
__getattr____ne__Return self!=value.
add_plugbases()Returns a list of all the types this class derives.
channels()Returns the channels of this node.
child(name)Get a child node by its name.
children()Get the node children accessor.
delete_node(undo_stack)Delete this node from the document.
document()Get the Document parent node.
duplicate(parent, undo_stack)Duplicate this node, plugs, dynamic plugs and children.
find_first(name)Get the first node named name in the children hierarchy of this node.
full_document_name()Return the node full name starting at the document node.
full_name()Return the node full name starting at the workspace node.
has_child(child_name)Check if a child node exists.
has_document()Check if this node is child of a Document node.
has_parent()Check if this node has a parent.
has_plug(plug_name)Check if a plug exists.
is_child_of(parent)Return true if this node is child of parent or is parent.
is_instance(node_type_name)Check if this node derive from another node type.
is_mutable()Check if this node can be modified.
is_reference_loaded()Returns true if this node is a root reference node and the reference is loaded.
is_reference_root()Check if this node is the root node of a reference.
is_referenced()Check if this node is referenced.
load_referencename()Return the node name.
node_delegate()notify_first_init(undo_stack)Do the one shot initialization tasks for this node.
parent()Get the node parent.
plug(plug_name)Return a plug by its name.
plugin()Returns the node plug-in, if this node has been created by a plug-in, or nullptr.
plugs()Return the node plugs iteration.
random_child()Returns a Node with a random name as child of this node.
reference_filename()Returns the reference file name for this node.
relationship()Returns the nodes in relationship with this node.
remove_plugrename(new_name, undo_stack)- type new_name
unicode
replace_reference(new_reference)Replace this root reference node with another file.
search(key)Search in the node childrens all the name that satisfies the key.
set_parent(parent, undo_stack)Set the node parent.
type_name()Return the node type name.
ui_description()Return the node ui json description.
unload_reference()Unload this root reference node.
write(filename)Write the node into a file.