Attention: Here be dragons (unstable version)
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Redot.
Checking the stable version of the documentation...
EditorSelection
Inherits: Object
Manages the SceneTree selection in the editor.
Description
This object manages the SceneTree selection in the editor.
Note: This class shouldn't be instantiated directly. Instead, access the singleton using EditorInterface.get_selection.
Methods
void |
|
void |
clear() |
void |
remove_node(node: Node) |
Signals
selection_changed() 🔗
Emitted when the selection changes.
Method Descriptions
Adds a node to the selection.
Note: The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use EditorInterface.edit_node.
void clear() 🔗
Clear the selection.
Array[Node] get_selected_nodes() 🔗
Returns the list of selected nodes.
Array[Node] get_transformable_selected_nodes() 🔗
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.
void remove_node(node: Node) 🔗
Removes a node from the selection.