class_editorselection.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the EditorSelection.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_EditorSelection:
  6. EditorSelection
  7. ===============
  8. **Inherits:** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Manages the SceneTree selection in the editor.
  13. Methods
  14. -------
  15. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  16. | void | :ref:`add_node<class_EditorSelection_method_add_node>` **(** :ref:`Node<class_Node>` node **)** |
  17. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`clear<class_EditorSelection_method_clear>` **(** **)** |
  19. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`Array<class_Array>` | :ref:`get_selected_nodes<class_EditorSelection_method_get_selected_nodes>` **(** **)** |
  21. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`Array<class_Array>` | :ref:`get_transformable_selected_nodes<class_EditorSelection_method_get_transformable_selected_nodes>` **(** **)** |
  23. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`remove_node<class_EditorSelection_method_remove_node>` **(** :ref:`Node<class_Node>` node **)** |
  25. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  26. Signals
  27. -------
  28. .. _class_EditorSelection_signal_selection_changed:
  29. - **selection_changed** **(** **)**
  30. Emitted when the selection changes.
  31. Description
  32. -----------
  33. This object manages the SceneTree selection in the editor.
  34. Method Descriptions
  35. -------------------
  36. .. _class_EditorSelection_method_add_node:
  37. - void **add_node** **(** :ref:`Node<class_Node>` node **)**
  38. Add a node to the selection.
  39. ----
  40. .. _class_EditorSelection_method_clear:
  41. - void **clear** **(** **)**
  42. Clear the selection.
  43. ----
  44. .. _class_EditorSelection_method_get_selected_nodes:
  45. - :ref:`Array<class_Array>` **get_selected_nodes** **(** **)**
  46. Get the list of selected nodes.
  47. ----
  48. .. _class_EditorSelection_method_get_transformable_selected_nodes:
  49. - :ref:`Array<class_Array>` **get_transformable_selected_nodes** **(** **)**
  50. Get the list of selected nodes, optimized for transform operations (ie, moving them, rotating, etc). This list avoids situations where a node is selected and also chid/grandchild.
  51. ----
  52. .. _class_EditorSelection_method_remove_node:
  53. - void **remove_node** **(** :ref:`Node<class_Node>` node **)**
  54. Remove a node from the selection.