W3cubDocs

/Godot 3.2

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 add_node ( Node node )
void clear ( )
Array get_selected_nodes ( )
Array get_transformable_selected_nodes ( )
void remove_node ( Node node )

Signals

selection_changed ( )

Emitted when the selection changes.

Method Descriptions

void add_node ( Node node )

Adds a node to the selection.

void clear ( )

Clear the selection.

Array get_selected_nodes ( )

Gets the list of selected nodes.

Array get_transformable_selected_nodes ( )

Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild.

void remove_node ( Node node )

Removes a node from the selection.

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.2/classes/class_editorselection.html