.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_Node: Node ==== **Inherits:** :ref:`Object` **Inherited By:** :ref:`Viewport`, :ref:`Timer`, :ref:`CanvasLayer`, :ref:`EventPlayer`, :ref:`SoundRoomParams`, :ref:`Tween`, :ref:`Spatial`, :ref:`AnimationPlayer`, :ref:`EditorPlugin`, :ref:`ResourcePreloader`, :ref:`AnimationTreePlayer`, :ref:`SamplePlayer`, :ref:`InstancePlaceholder`, :ref:`HTTPRequest`, :ref:`StreamPlayer`, :ref:`CanvasItem` **Category:** Core Brief Description ----------------- Base class for all the *scene* elements. Member Functions ---------------- +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_enter_tree` **(** **)** virtual | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_exit_tree` **(** **)** virtual | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_fixed_process` **(** :ref:`float` delta **)** virtual | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_input` **(** :ref:`InputEvent` event **)** virtual | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_process` **(** :ref:`float` delta **)** virtual | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_ready` **(** **)** virtual | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** virtual | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` key_event **)** virtual | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_child` **(** :ref:`Node` node, :ref:`bool` legible_unique_name=false **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_to_group` **(** :ref:`String` group, :ref:`bool` persistent=false **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_process` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`duplicate` **(** :ref:`bool` use_instancing=false, :ref:`int` flags=7 **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`find_node` **(** :ref:`String` mask, :ref:`bool` recursive=true, :ref:`bool` owned=true **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_child` **(** :ref:`int` idx **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_child_count` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_children` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_filename` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_fixed_process_delta_time` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_groups` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_index` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_name` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_node_and_resource` **(** :ref:`NodePath` path **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_owner` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_parent` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`get_path` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`get_path_to` **(** :ref:`Node` node **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_pause_mode` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_position_in_parent` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_process_delta_time` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_scene_instance_load_placeholder` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SceneTree` | :ref:`get_tree` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_viewport` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_node` **(** :ref:`NodePath` path **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_node_and_resource` **(** :ref:`NodePath` path **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_a_parent_of` **(** :ref:`Node` node **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_displayed_folded` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_fixed_processing` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_greater_than` **(** :ref:`Node` node **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_in_group` **(** :ref:`String` group **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_inside_tree` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_processing` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_processing_input` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_processing_unhandled_input` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_processing_unhandled_key_input` **(** **)** const | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`move_child` **(** :ref:`Node` child_node, :ref:`int` to_pos **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`print_stray_nodes` **(** **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`print_tree` **(** **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`propagate_notification` **(** :ref:`int` what **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`queue_free` **(** **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`raise` **(** **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_and_skip` **(** **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_child` **(** :ref:`Node` node **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_from_group` **(** :ref:`String` group **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`replace_by` **(** :ref:`Node` node, :ref:`bool` keep_data=false **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_display_folded` **(** :ref:`bool` fold **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_filename` **(** :ref:`String` filename **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_fixed_process` **(** :ref:`bool` enable **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_name` **(** :ref:`String` name **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_owner` **(** :ref:`Node` owner **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_pause_mode` **(** :ref:`int` mode **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_process` **(** :ref:`bool` enable **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_process_input` **(** :ref:`bool` enable **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_process_unhandled_input` **(** :ref:`bool` enable **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_process_unhandled_key_input` **(** :ref:`bool` enable **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scene_instance_load_placeholder` **(** :ref:`bool` load_placeholder **)** | +------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- - **renamed** **(** **)** Emitted when the node is renamed. Numeric Constants ----------------- - **NOTIFICATION_ENTER_TREE** = **10** - **NOTIFICATION_EXIT_TREE** = **11** - **NOTIFICATION_MOVED_IN_PARENT** = **12** - **NOTIFICATION_READY** = **13** - **NOTIFICATION_FIXED_PROCESS** = **16** - **NOTIFICATION_PROCESS** = **17** --- Notification received every frame when the process flag is set (see :ref:`set_process`). - **NOTIFICATION_PARENTED** = **18** --- Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree. - **NOTIFICATION_UNPARENTED** = **19** --- Notification received when a node is unparented (parent removed it from the list of children). - **NOTIFICATION_PAUSED** = **14** - **NOTIFICATION_UNPAUSED** = **15** - **NOTIFICATION_INSTANCED** = **20** - **NOTIFICATION_DRAG_BEGIN** = **21** - **NOTIFICATION_DRAG_END** = **22** - **NOTIFICATION_PATH_CHANGED** = **23** - **NOTIFICATION_TRANSLATION_CHANGED** = **24** - **NOTIFICATION_INTERNAL_PROCESS** = **25** - **NOTIFICATION_INTERNAL_FIXED_PROCESS** = **26** - **RPC_MODE_DISABLED** = **0** - **RPC_MODE_REMOTE** = **1** - **RPC_MODE_SYNC** = **2** - **RPC_MODE_MASTER** = **3** - **RPC_MODE_SLAVE** = **4** - **PAUSE_MODE_INHERIT** = **0** - **PAUSE_MODE_STOP** = **1** - **PAUSE_MODE_PROCESS** = **2** - **DUPLICATE_SIGNALS** = **1** - **DUPLICATE_GROUPS** = **2** - **DUPLICATE_SCRIPTS** = **4** Description ----------- Nodes are the base bricks with which Godot games are developed. They can be set as children of other nodes, resulting in a tree arrangement. A given node can contain any number of nodes as children (but there is only one scene tree root node) with the requirement that all siblings (direct children of a node) should have unique names. Any tree of nodes is called a *scene*. Scenes can be saved to the disk and then instanced into other scenes. This allows for very high flexibility in the architecture and data model of the projects. Nodes can optionally be added to groups. This makes it easy to reach a number of nodes from the code (for example an "enemies" group) to perform grouped actions. **Scene tree:** The :ref:`SceneTree` contains the active tree of nodes. When a node is added to the scene tree, it receives the NOTIFICATION_ENTER_TREE notification and its :ref:`_enter_tree` callback is triggered. Children nodes are always added *after* their parent node, i.e. the :ref:`_enter_tree` callback of a parent node will be triggered before its child's. Once all nodes have been added in the scene tree, they receive the NOTIFICATION_READY notification and their respective :ref:`_ready` callbacks are triggered. For groups of nodes, the :ref:`_ready` callback is called in reverse order, from the children up to the parent nodes. It means that when adding a scene to the scene tree, the following order will be used for the callbacks: :ref:`_enter_tree` of the parent, :ref:`_enter_tree` of the children, :ref:`_ready` of the children and finally :ref:`_ready` of the parent (and that recursively for the whole scene). **Processing:** Nodes can be set to the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback :ref:`_process`, toggled with :ref:`set_process`) happens as fast as possible and is dependent on the frame rate, so the processing time *delta* is variable. Fixed processing (callback :ref:`_fixed_process`, toggled with :ref:`set_fixed_process`) happens a fixed amount of times per second (by default 60) and is useful to link itself to the physics. Nodes can also process input events. When set, the :ref:`_input` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the :ref:`_unhandled_input` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI :ref:`Control` nodes), ensuring that the node only receives the events that were meant for it. To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with :ref:`set_owner`. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with :ref:`free` or :ref:`queue_free`, it will also free all its children. **Networking with nodes:** After connecting to a server (or making one, see :ref:`NetworkedMultiplayerENet`) it is possible to use the built-in RPC (remote procedure call) system to easily communicate over the network. By calling :ref:`rpc` with a method name, it will be called locally, and in all connected peers (peers = clients and the server that accepts connections), with behaviour varying depending on the network mode (:ref:`set_network_mode`) on the receiving peer. To identify which :ref:`Node` receives the RPC call Godot will use its :ref:`NodePath` (make sure node names are the same on all peers). Member Function Description --------------------------- .. _class_Node__enter_tree: - void **_enter_tree** **(** **)** virtual Called when the node enters the :ref:`SceneTree` (e.g. upon instancing, scene changing or after calling :ref:`add_child` in a script). If the node has children, its :ref:`_enter_tree` callback will be called first, and then that of the children. Corresponds to the NOTIFICATION_ENTER_TREE notification in :ref:`Object._notification`. .. _class_Node__exit_tree: - void **_exit_tree** **(** **)** virtual Called when the node leaves the :ref:`SceneTree` (e.g. upon freeing, scene changing or after calling :ref:`remove_child` in a script). If the node has children, its :ref:`_exit_tree` callback will be called last, after all its children have left the tree. Corresponds to the NOTIFICATION_EXIT_TREE notification in :ref:`Object._notification`. .. _class_Node__fixed_process: - void **_fixed_process** **(** :ref:`float` delta **)** virtual Called during the fixed processing step of the main loop. Fixed processing means that the frame rate is synced to the physics, i.e. the ``delta`` variable should be constant. It is only called if fixed processing has been enabled with :ref:`set_fixed_process`. Corresponds to the NOTIFICATION_FIXED_PROCESS notification in :ref:`Object._notification`. .. _class_Node__input: - void **_input** **(** :ref:`InputEvent` event **)** virtual .. _class_Node__process: - void **_process** **(** :ref:`float` delta **)** virtual Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the ``delta`` time since the previous frame is not constant. It is only called if processing has been enabled with :ref:`set_process`. Corresponds to the NOTIFICATION_PROCESS notification in :ref:`Object._notification`. .. _class_Node__ready: - void **_ready** **(** **)** virtual Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their :ref:`_ready` callback gets triggered first, and the node will receive the ready notification only afterwards. Corresponds to the NOTIFICATION_READY notification in :ref:`Object._notification`. .. _class_Node__unhandled_input: - void **_unhandled_input** **(** :ref:`InputEvent` event **)** virtual .. _class_Node__unhandled_key_input: - void **_unhandled_key_input** **(** :ref:`InputEventKey` event **)** virtual .. _class_Node_add_child: - void **add_child** **(** :ref:`Node` node, :ref:`bool` legible_unique_name=null **)** Add a child :ref:`Node`. Nodes can have as many children as they want, but every child must have a unique name. Children nodes are automatically deleted when the parent node is deleted, so deleting a whole scene is performed by deleting its topmost node. The optional boolean argument enforces creating child nodes with human-readable names, based on the name of the node being instanced instead of its type only. .. _class_Node_add_to_group: - void **add_to_group** **(** :ref:`String` group, :ref:`bool` persistent=null **)** Add a node to a group. Groups are helpers to name and organize a subset of nodes, like for example "enemies" or "collectables". A :ref:`Node` can be in any number of groups. Nodes can be assigned a group at any time, but will not be added to it until they are inside the scene tree (see :ref:`is_inside_tree`). .. _class_Node_can_process: - :ref:`bool` **can_process** **(** **)** const Return true if the node can process, i.e. whether its pause mode allows processing while the scene tree is paused (see :ref:`set_pause_mode`). Always returns true if the scene tree is not paused, and false if the node is not in the tree. FIXME: Why FAIL_COND? .. _class_Node_duplicate: - :ref:`Node` **duplicate** **(** :ref:`bool` use_instancing=false, :ref:`int` flags=7 **)** const Duplicate the node, returning a new :ref:`Node`. If ``use_instancing`` is true, the duplicated node will be a new instance of the original :ref:`PackedScene`, if not it will be an independent node. The flags are used to define what attributes (groups, signals, scripts) should be duplicated, as specified by the DUPLICATE\_\* constants. The default value is all of them. .. _class_Node_find_node: - :ref:`Node` **find_node** **(** :ref:`String` mask, :ref:`bool` recursive=true, :ref:`bool` owned=null **)** const Find a descendant of this node whose name matches ``mask`` as in :ref:`String.match` (i.e. case sensitive, but '\*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. .. _class_Node_get_child: - :ref:`Node` **get_child** **(** :ref:`int` idx **)** const Return a child node by its index (see :ref:`get_child_count`). This method is often used for iterating all children of a node. .. _class_Node_get_child_count: - :ref:`int` **get_child_count** **(** **)** const Return the amount of child nodes. .. _class_Node_get_children: - :ref:`Array` **get_children** **(** **)** const Return an array of references (:ref:`Node`) to the child nodes. .. _class_Node_get_filename: - :ref:`String` **get_filename** **(** **)** const Return a filename that may be contained by the node. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded (see :ref:`set_filename`). .. _class_Node_get_fixed_process_delta_time: - :ref:`float` **get_fixed_process_delta_time** **(** **)** const Return the time elapsed since the last fixed frame (see :ref:`_fixed_process`). This is always the same in fixed processing unless the frames per second is changed in :ref:`OS`. .. _class_Node_get_groups: - :ref:`Array` **get_groups** **(** **)** const Return an array listing the groups that the node is part of. .. _class_Node_get_index: - :ref:`int` **get_index** **(** **)** const Get the node index, i.e. its position among the siblings of its parent. .. _class_Node_get_name: - :ref:`String` **get_name** **(** **)** const Return the name of the node. This name is unique among the siblings (other child nodes from the same parent). .. _class_Node_get_network_master: - :ref:`int` **get_network_master** **(** **)** const .. _class_Node_get_node: - :ref:`Node` **get_node** **(** :ref:`NodePath` path **)** const Fetch a node. The :ref:`NodePath` must be valid (or else an error will be raised) and can be either the path to child node, a relative path (from the current node to another node), or an absolute path to a node. Note: fetching absolute paths only works when the node is inside the scene tree (see :ref:`is_inside_tree`). *Example:* Assume your current node is Character and the following tree: :: /root /root/Character /root/Character/Sword /root/Character/Backpack/Dagger /root/MyGame /root/Swamp/Alligator /root/Swamp/Mosquito /root/Swamp/Goblin Possible paths are: :: get_node("Sword") get_node("Backpack/Dagger") get_node("../Swamp/Alligator") get_node("/root/MyGame") .. _class_Node_get_node_and_resource: - :ref:`Array` **get_node_and_resource** **(** :ref:`NodePath` path **)** .. _class_Node_get_owner: - :ref:`Node` **get_owner** **(** **)** const Get the node owner (see :ref:`set_owner`). .. _class_Node_get_parent: - :ref:`Node` **get_parent** **(** **)** const Return the parent node of the current node, or an empty :ref:`Node` if the node lacks a parent. .. _class_Node_get_path: - :ref:`NodePath` **get_path** **(** **)** const Return the absolute path of the current node. This only works if the current node is inside the scene tree (see :ref:`is_inside_tree`). .. _class_Node_get_path_to: - :ref:`NodePath` **get_path_to** **(** :ref:`Node` node **)** const Return the relative path from the current node to the specified node in "node" argument. Both nodes must be in the same scene, or else the function will fail. .. _class_Node_get_pause_mode: - :ref:`int` **get_pause_mode** **(** **)** const .. _class_Node_get_position_in_parent: - :ref:`int` **get_position_in_parent** **(** **)** const .. _class_Node_get_process_delta_time: - :ref:`float` **get_process_delta_time** **(** **)** const Return the time elapsed (in seconds) since the last process callback. This is almost always different each time. .. _class_Node_get_scene_instance_load_placeholder: - :ref:`bool` **get_scene_instance_load_placeholder** **(** **)** const .. _class_Node_get_tree: - :ref:`SceneTree` **get_tree** **(** **)** const .. _class_Node_get_viewport: - :ref:`Viewport` **get_viewport** **(** **)** const .. _class_Node_has_node: - :ref:`bool` **has_node** **(** :ref:`NodePath` path **)** const .. _class_Node_has_node_and_resource: - :ref:`bool` **has_node_and_resource** **(** :ref:`NodePath` path **)** const .. _class_Node_is_a_parent_of: - :ref:`bool` **is_a_parent_of** **(** :ref:`Node` node **)** const Return *true* if the "node" argument is a direct or indirect child of the current node, otherwise return *false*. .. _class_Node_is_displayed_folded: - :ref:`bool` **is_displayed_folded** **(** **)** const .. _class_Node_is_fixed_processing: - :ref:`bool` **is_fixed_processing** **(** **)** const Return true if fixed processing is enabled (see :ref:`set_fixed_process`). .. _class_Node_is_fixed_processing_internal: - :ref:`bool` **is_fixed_processing_internal** **(** **)** const .. _class_Node_is_greater_than: - :ref:`bool` **is_greater_than** **(** :ref:`Node` node **)** const Return *true* if "node" occurs later in the scene hierarchy than the current node, otherwise return *false*. .. _class_Node_is_in_group: - :ref:`bool` **is_in_group** **(** :ref:`String` group **)** const .. _class_Node_is_inside_tree: - :ref:`bool` **is_inside_tree** **(** **)** const .. _class_Node_is_network_master: - :ref:`bool` **is_network_master** **(** **)** const .. _class_Node_is_processing: - :ref:`bool` **is_processing** **(** **)** const Return whether processing is enabled in the current node (see :ref:`set_process`). .. _class_Node_is_processing_input: - :ref:`bool` **is_processing_input** **(** **)** const Return true if the node is processing input (see :ref:`set_process_input`). .. _class_Node_is_processing_internal: - :ref:`bool` **is_processing_internal** **(** **)** const .. _class_Node_is_processing_unhandled_input: - :ref:`bool` **is_processing_unhandled_input** **(** **)** const Return true if the node is processing unhandled input (see :ref:`set_process_unhandled_input`). .. _class_Node_is_processing_unhandled_key_input: - :ref:`bool` **is_processing_unhandled_key_input** **(** **)** const .. _class_Node_move_child: - void **move_child** **(** :ref:`Node` child_node, :ref:`int` to_pos **)** Move a child node to a different position (order) amongst the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. .. _class_Node_print_stray_nodes: - void **print_stray_nodes** **(** **)** .. _class_Node_print_tree: - void **print_tree** **(** **)** Print the scene to stdout. Used mainly for debugging purposes. .. _class_Node_propagate_call: - void **propagate_call** **(** :ref:`String` method, :ref:`Array` args=[ ], :ref:`bool` parent_first=null **)** Calls the method (if present) with the arguments given in "args" on this Node and recursively on all children. If the parent_first argument is true then the method will be called on the current :ref:`Node` first, then on all children. If it is false then the children will get called first. .. _class_Node_propagate_notification: - void **propagate_notification** **(** :ref:`int` what **)** Notify the current node and all its children recursively by calling notification() in all of them. .. _class_Node_queue_free: - void **queue_free** **(** **)** .. _class_Node_raise: - void **raise** **(** **)** Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs (:ref:`Control`), because their order of drawing fully depends on their order in the tree. .. _class_Node_remove_and_skip: - void **remove_and_skip** **(** **)** Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed. .. _class_Node_remove_child: - void **remove_child** **(** :ref:`Node` node **)** Remove a child :ref:`Node`. Node is NOT deleted and will have to be deleted manually. .. _class_Node_remove_from_group: - void **remove_from_group** **(** :ref:`String` group **)** Remove a node from a group. .. _class_Node_replace_by: - void **replace_by** **(** :ref:`Node` node, :ref:`bool` keep_data=null **)** Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost. .. _class_Node_request_ready: - void **request_ready** **(** **)** .. _class_Node_rpc: - :ref:`Variant` **rpc** **(** :ref:`String` method **)** vararg Send a remote procedure call request to all peers on the network (and locally), optionally sending additional data as arguments. Call request will be received by nodes with the same :ref:`NodePath`. .. _class_Node_rpc_config: - void **rpc_config** **(** :ref:`String` method, :ref:`int` mode **)** Change the method's RPC mode (one of RPC_MODE\_\* constants). .. _class_Node_rpc_id: - :ref:`Variant` **rpc_id** **(** :ref:`int` peer_id, :ref:`String` method **)** vararg Send a :ref:`rpc` to a specific peer identified by *peer_id*. .. _class_Node_rpc_unreliable: - :ref:`Variant` **rpc_unreliable** **(** :ref:`String` method **)** vararg Send a :ref:`rpc` using an unreliable protocol. .. _class_Node_rpc_unreliable_id: - :ref:`Variant` **rpc_unreliable_id** **(** :ref:`int` peer_id, :ref:`String` method **)** vararg Send a :ref:`rpc` to a specific peer identified by *peer_id* using an unreliable protocol. .. _class_Node_rset: - void **rset** **(** :ref:`String` property, :ref:`Variant` value **)** Remotely change property's value on other peers (and locally). .. _class_Node_rset_config: - void **rset_config** **(** :ref:`String` property, :ref:`int` mode **)** Change the property's RPC mode (one of RPC_MODE\_\* constants). .. _class_Node_rset_id: - void **rset_id** **(** :ref:`int` peer_id, :ref:`String` property, :ref:`Variant` value **)** Remotely change property's value on a specific peer identified by *peer_id*. .. _class_Node_rset_unreliable: - void **rset_unreliable** **(** :ref:`String` property, :ref:`Variant` value **)** Remotely change property's value on other peers (and locally) using an unreliable protocol. .. _class_Node_rset_unreliable_id: - void **rset_unreliable_id** **(** :ref:`int` peer_id, :ref:`String` property, :ref:`Variant` value **)** Remotely change property's value on a specific peer identified by *peer_id* using an unreliable protocol. .. _class_Node_set_display_folded: - void **set_display_folded** **(** :ref:`bool` fold **)** .. _class_Node_set_filename: - void **set_filename** **(** :ref:`String` filename **)** A node can contain a filename. This filename should not be changed by the user, unless writing editors and tools. When a scene is instanced from a file, it topmost node contains the filename from where it was loaded. .. _class_Node_set_fixed_process: - void **set_fixed_process** **(** :ref:`bool` enable **)** Enables or disables node fixed framerate processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS at a fixed (usually 60 fps, check :ref:`OS` to change that) interval (and the :ref:`_fixed_process` callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling :ref:`get_fixed_process_delta_time`. .. _class_Node_set_fixed_process_internal: - void **set_fixed_process_internal** **(** :ref:`bool` enable **)** .. _class_Node_set_name: - void **set_name** **(** :ref:`String` name **)** Set the name of the :ref:`Node`. Name must be unique within parent, and setting an already existing name will cause for the node to be automatically renamed. .. _class_Node_set_network_master: - void **set_network_master** **(** :ref:`int` id, :ref:`bool` recursive=null **)** .. _class_Node_set_owner: - void **set_owner** **(** :ref:`Node` owner **)** Set the node owner. A node can have any other node as owner (as long as a valid parent, grandparent, etc ascending in the tree). When saving a node (using SceneSaver) all the nodes it owns will be saved with it. This allows to create complex SceneTrees, with instancing and subinstancing. .. _class_Node_set_pause_mode: - void **set_pause_mode** **(** :ref:`int` mode **)** .. _class_Node_set_process: - void **set_process** **(** :ref:`bool` enable **)** Enables or disables node processing. When a node is being processed, it will receive a NOTIFICATION_PROCESS on every drawn frame (and the :ref:`_process` callback will be called if exists). It is common to check how much time was elapsed since the previous frame by calling :ref:`get_process_delta_time`. .. _class_Node_set_process_input: - void **set_process_input** **(** :ref:`bool` enable **)** Enable input processing for node. This is not required for GUI controls! It hooks up the node to receive all input (see :ref:`_input`). .. _class_Node_set_process_internal: - void **set_process_internal** **(** :ref:`bool` enable **)** .. _class_Node_set_process_unhandled_input: - void **set_process_unhandled_input** **(** :ref:`bool` enable **)** Enable unhandled input processing for node. This is not required for GUI controls! It hooks up the node to receive all input that was not previously handled before (usually by a :ref:`Control`). (see :ref:`_unhandled_input`). .. _class_Node_set_process_unhandled_key_input: - void **set_process_unhandled_key_input** **(** :ref:`bool` enable **)** .. _class_Node_set_scene_instance_load_placeholder: - void **set_scene_instance_load_placeholder** **(** :ref:`bool` load_placeholder **)**