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

Signals

  • selection_changed ( ) Emitted when the selection changes.

    Method Descriptions

  • add_node ( Node node ) 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.

  • 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.

  • remove_node ( Node node ) Removes a node from the selection.