class_editorselection.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/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. Description
  12. -----------
  13. This object manages the SceneTree selection in the editor.
  14. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_selection<class_EditorInterface_method_get_selection>`.
  15. Methods
  16. -------
  17. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`add_node<class_EditorSelection_method_add_node>` **(** :ref:`Node<class_Node>` node **)** |
  19. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`clear<class_EditorSelection_method_clear>` **(** **)** |
  21. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`Node[]<class_Node>` | :ref:`get_selected_nodes<class_EditorSelection_method_get_selected_nodes>` **(** **)** |
  23. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Array<class_Array>` | :ref:`get_transformable_selected_nodes<class_EditorSelection_method_get_transformable_selected_nodes>` **(** **)** |
  25. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`remove_node<class_EditorSelection_method_remove_node>` **(** :ref:`Node<class_Node>` node **)** |
  27. +---------------------------+--------------------------------------------------------------------------------------------------------------------+
  28. Signals
  29. -------
  30. .. _class_EditorSelection_signal_selection_changed:
  31. - **selection_changed** **(** **)**
  32. Emitted when the selection changes.
  33. Method Descriptions
  34. -------------------
  35. .. _class_EditorSelection_method_add_node:
  36. - void **add_node** **(** :ref:`Node<class_Node>` node **)**
  37. Adds a node to the selection.
  38. \ **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>`.
  39. ----
  40. .. _class_EditorSelection_method_clear:
  41. - void **clear** **(** **)**
  42. Clear the selection.
  43. ----
  44. .. _class_EditorSelection_method_get_selected_nodes:
  45. - :ref:`Node[]<class_Node>` **get_selected_nodes** **(** **)**
  46. Gets the list of selected nodes.
  47. ----
  48. .. _class_EditorSelection_method_get_transformable_selected_nodes:
  49. - :ref:`Array<class_Array>` **get_transformable_selected_nodes** **(** **)**
  50. 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.
  51. ----
  52. .. _class_EditorSelection_method_remove_node:
  53. - void **remove_node** **(** :ref:`Node<class_Node>` node **)**
  54. Removes a node from the selection.
  55. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  56. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  57. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  58. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  59. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  60. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`