2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 16:08:05 +08:00
<class name= "EditorSelection" inherits= "Object" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-13 04:42:36 +08:00
<brief_description >
Manages the SceneTree selection in the editor.
</brief_description>
<description >
This object manages the SceneTree selection in the editor.
2020-04-15 04:09:21 +08:00
[b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_selection].
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "add_node" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
2022-08-07 02:11:48 +08:00
<param index= "0" name= "node" type= "Node" />
2017-09-13 04:42:36 +08:00
<description >
2019-06-22 07:04:47 +08:00
Adds a node to the selection.
2021-04-08 04:08:41 +08:00
[b]Note:[/b] The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "clear" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
2017-09-13 04:42:36 +08:00
<description >
Clear the selection.
</description>
</method>
<method name= "get_selected_nodes" >
2021-07-30 21:28:05 +08:00
<return type= "Node[]" />
2017-09-13 04:42:36 +08:00
<description >
2024-03-01 07:59:28 +08:00
Returns the list of selected nodes.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_transformable_selected_nodes" >
2022-08-05 09:41:48 +08:00
<return type= "Node[]" />
2017-09-13 04:42:36 +08:00
<description >
2024-03-01 07:59:28 +08:00
Returns the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc.). This list can be used to avoid situations where a node is selected and is also a child/grandchild.
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "remove_node" >
2021-07-30 21:28:05 +08:00
<return type= "void" />
2022-08-07 02:11:48 +08:00
<param index= "0" name= "node" type= "Node" />
2017-09-13 04:42:36 +08:00
<description >
2019-06-22 07:04:47 +08:00
Removes a node from the selection.
2017-09-13 04:42:36 +08:00
</description>
</method>
</methods>
<signals >
<signal name= "selection_changed" >
<description >
Emitted when the selection changes.
</description>
</signal>
</signals>
</class>