EditorSelection
Eredita: Object
Gestisce la selezione di SceneTree nell'editor.
Descrizione
Questo oggetto gestisce la selezione del SceneTree nell'editor.
Nota: Questa classe non dovrebbe essere istanziata direttamente. Invece, accedi al singleton tramite EditorInterface.get_selection().
Metodi
void |
|
void |
clear() |
void |
remove_node(node: Node) |
Segnali
selection_changed() 🔗
Emesso quando cambia la selezione.
Descrizioni dei metodi
Aggiunge un nodo alla selezione.
Nota: Il nodo appena selezionato non verrà modificato automaticamente nell'ispettore. Se si desidera modificare un nodo, usa EditorInterface.edit_node().
void clear() 🔗
Cancella la selezione.
Array[Node] get_selected_nodes() 🔗
Restituisce la lista dei nodi selezionati.
Array[Node] get_top_selected_nodes() 🔗
Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.).
For example, if there is a node A with a child B and a sibling C, then selecting all three will cause this method to return only A and C. Changing the global transform of A will affect the global transform of B, so there is no need to change B separately.
Array[Node] get_transformable_selected_nodes() 🔗
Deprecato: Use get_top_selected_nodes() instead.
Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.). See get_top_selected_nodes().
void remove_node(node: Node) 🔗
Rimuove un nodo dalla selezione.