mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Clarify API for top selected nodes in EditorSelection and make public
This commit is contained in:
parent
594d64ec24
commit
17db92b8b8
12 changed files with 119 additions and 102 deletions
|
|
@ -286,10 +286,9 @@ class EditorSelection : public Object {
|
|||
|
||||
// Editor plugins which are related to selection.
|
||||
List<Object *> editor_plugins;
|
||||
List<Node *> selected_node_list;
|
||||
List<Node *> top_selected_node_list;
|
||||
|
||||
void _update_node_list();
|
||||
TypedArray<Node> _get_transformable_selected_nodes();
|
||||
void _emit_change();
|
||||
|
||||
protected:
|
||||
|
|
@ -314,13 +313,15 @@ public:
|
|||
void update();
|
||||
void clear();
|
||||
|
||||
// Returns all the selected nodes.
|
||||
TypedArray<Node> get_selected_nodes();
|
||||
// Returns only the top level selected nodes.
|
||||
// That is, if the selection includes some node and a child of that node, only the parent is returned.
|
||||
const List<Node *> &get_selected_node_list();
|
||||
const List<Node *> &get_top_selected_node_list();
|
||||
// Same as get_top_selected_node_list but returns a copy in a TypedArray for binding to scripts.
|
||||
TypedArray<Node> get_top_selected_nodes();
|
||||
// Returns all the selected nodes (list version of "get_selected_nodes").
|
||||
List<Node *> get_full_selected_node_list();
|
||||
// Same as get_full_selected_node_list but returns a copy in a TypedArray for binding to scripts.
|
||||
TypedArray<Node> get_selected_nodes();
|
||||
// Returns the map of selected objects and their metadata.
|
||||
HashMap<Node *, Object *> &get_selection() { return selection; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue