class_editorselection.rst 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/EditorSelection.xml.
  6. .. _class_EditorSelection:
  7. EditorSelection
  8. ===============
  9. **Inherits:** :ref:`Object<class_Object>`
  10. Manages the SceneTree selection in the editor.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This object manages the SceneTree selection in the editor.
  15. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_selection<class_EditorInterface_method_get_selection>`.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`add_node<class_EditorSelection_method_add_node>` **(** :ref:`Node<class_Node>` node **)** |
  23. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`clear<class_EditorSelection_method_clear>` **(** **)** |
  25. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`Node[]<class_Node>` | :ref:`get_selected_nodes<class_EditorSelection_method_get_selected_nodes>` **(** **)** |
  27. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`Node[]<class_Node>` | :ref:`get_transformable_selected_nodes<class_EditorSelection_method_get_transformable_selected_nodes>` **(** **)** |
  29. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`remove_node<class_EditorSelection_method_remove_node>` **(** :ref:`Node<class_Node>` node **)** |
  31. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  32. .. rst-class:: classref-section-separator
  33. ----
  34. .. rst-class:: classref-descriptions-group
  35. Signals
  36. -------
  37. .. _class_EditorSelection_signal_selection_changed:
  38. .. rst-class:: classref-signal
  39. **selection_changed** **(** **)**
  40. Emitted when the selection changes.
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Method Descriptions
  45. -------------------
  46. .. _class_EditorSelection_method_add_node:
  47. .. rst-class:: classref-method
  48. void **add_node** **(** :ref:`Node<class_Node>` node **)**
  49. Adds a node to the selection.
  50. \ **Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use :ref:`EditorInterface.edit_node<class_EditorInterface_method_edit_node>`.
  51. .. rst-class:: classref-item-separator
  52. ----
  53. .. _class_EditorSelection_method_clear:
  54. .. rst-class:: classref-method
  55. void **clear** **(** **)**
  56. Clear the selection.
  57. .. rst-class:: classref-item-separator
  58. ----
  59. .. _class_EditorSelection_method_get_selected_nodes:
  60. .. rst-class:: classref-method
  61. :ref:`Node[]<class_Node>` **get_selected_nodes** **(** **)**
  62. Gets the list of selected nodes.
  63. .. rst-class:: classref-item-separator
  64. ----
  65. .. _class_EditorSelection_method_get_transformable_selected_nodes:
  66. .. rst-class:: classref-method
  67. :ref:`Node[]<class_Node>` **get_transformable_selected_nodes** **(** **)**
  68. 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.
  69. .. rst-class:: classref-item-separator
  70. ----
  71. .. _class_EditorSelection_method_remove_node:
  72. .. rst-class:: classref-method
  73. void **remove_node** **(** :ref:`Node<class_Node>` node **)**
  74. Removes a node from the selection.
  75. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  76. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  77. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  78. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  79. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  80. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  81. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`