RLink
Adds common operations with history support. Any changes to placeholder directly won't be included in editor history
Properties
placeholder: Object
The current placeholder object
Methods
get_tree()
Returns current tree
func get_tree() -> SceneTreeis_edited_scene_root()
Compares current node with edited_scene_root
func is_edited_scene_root() -> boolget_tool_from()
Retrieves tool object if exist, if it doesn't returns null
func get_tool_from(runtime: Object) -> Objectget_runtime_from()
Retrieves placeholder object if exist, if it doesn't returns null
func get_runtime_from(tool_obj: Object) -> Objectconvert_to_tool()
Converts placeholder to a tool object
func convert_to_tool(runtime: Object, custom_depth: int = 1) -> Objectconvert_to_runtime()
Converts tool object to placeholder
func convert_to_runtime(tool_obj: Object, custom_depth: int = 1, track_instances: bool = true) -> Objectis_pair_invalid()
Check if the registered pair is invalid. For runtime nodes being outside of tree counts as invalid
func is_pair_invalid(obj: Object, delete_if_invalid: bool = true) -> boolis_pair_valid()
Check if the registered pair is valid. For runtime nodes being outside of tree counts as invalid
func is_pair_valid(obj: Object, delete_if_invalid: bool = true) -> boolinstantiate_file()
Instantiates scene and converts root node to real type
func instantiate_file(path: String) -> Nodeinstantiate_packed()
Instantiates scene and converts root node to real type
func instantiate_packed(scene: PackedScene) -> Nodeget_parent()
Gets parent as real type
func get_parent() -> Nodeget_parent_for()
Gets parent for node as real type
func get_parent_for(tool_node: Node) -> Nodeget_node_or_null()
Gets node as real type from current
func get_node_or_null(path: NodePath) -> Nodeget_node_or_null_from()
Gets node from node as real type
func get_node_or_null_from(tool_node: Node, path: NodePath) -> Nodehas_node()
Checks if node exist
func has_node(path: NodePath) -> boolhas_node_from()
Checks if node exist from node
func has_node_from(tool_node: Node, path: NodePath) -> booladd_child()
Adds child to current node
func add_child(child: Node) -> voidadd_child_to()
Adds child to tool_node node
func add_child_to(tool_node: Node, child: Node) -> voidadd_child_path()
Gets the node before last segment and adds a child to it with the name from the last segment When the last parameter is true, frees passed child if node before last segment
from path is not found
func add_child_path(path: NodePath, child: Node, free_if_not_found: bool = true) -> voidremove_child()
Removes child from current node
func remove_child(child: Node) -> voidremove_child_from()
Removes child from node
func remove_child_from(tool_node: Node, child: Node) -> voidremove_child_path()
Removes the node at the end of the path from current
func remove_child_path(path: NodePath) -> voidremove_all_children()
Removes all children from current node
func remove_all_children() -> voidremove_all_children_from()
Removes all children from tool_node
func remove_all_children_from(tool_node: Node) -> voidremove_all_children_path()
Removes all children from the node at path
func remove_all_children_path(path: NodePath) -> voidsignal_connect()
Connects them persistingly, bound arguments get added first, then unbind. Callables are treated as connected if they have the same object and method, so different binds are treated as the same callable
func signal_connect(signal_value: Signal, callable: Callable, bindv_args: Array = [], unbind: int = 0) -> voidsignal_disconnect()
Disconnects them, bound arguments get added first, then unbind. Callables are treated as connected if they have the same object and method, so different binds are treated as the same callable
func signal_disconnect(signal_value: Signal, callable: Callable, bindv_args: Array = [], unbind: int = 0) -> voidsignal_is_connected()
Check if callable connected to the signal. Callables are treated as connected if they have the same object and method, so different binds are treated as the same callable
func signal_is_connected(signal_value: Signal, callable: Callable, bindv_args: Array = [], unbind: int = 0) -> boolsignal_toggle()
Checks if connected, if connected disconnects callable, if not callable is connected
func signal_toggle(signal_value: Signal, callable: Callable, bindv_args: Array = [], unbind: int = 0) -> voidadd_changes()
The added changes will be added to buffer and added to history. In the case of checked call, if the check fails, all changes gets discarded
func add_changes(object: Object, property: StringName, old_value: Variant, value: Variant) -> voidadd_do_method()
Only works with native resources. Other objects get duplicated, so they are alive only for a limited time, so general do methods for them won't be supported
func add_do_method(object: Resource, method: StringName, args: Array = []) -> voidadd_undo_method()
Only works with native resources. Other objects get duplicated, so they are alive only for a limited time, so general do methods for them won't be supported
func add_undo_method(object: Resource, method: StringName, args: Array = []) -> void