EditorSelection.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="EditorSelection" inherits="Object" version="4.0">
  3. <brief_description>
  4. Manages the SceneTree selection in the editor.
  5. </brief_description>
  6. <description>
  7. This object manages the SceneTree selection in the editor.
  8. [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_selection].
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="add_node">
  14. <return type="void" />
  15. <argument index="0" name="node" type="Node" />
  16. <description>
  17. Adds a node to the selection.
  18. [b]Note:[/b] The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node].
  19. </description>
  20. </method>
  21. <method name="clear">
  22. <return type="void" />
  23. <description>
  24. Clear the selection.
  25. </description>
  26. </method>
  27. <method name="get_selected_nodes">
  28. <return type="Node[]" />
  29. <description>
  30. Gets the list of selected nodes.
  31. </description>
  32. </method>
  33. <method name="get_transformable_selected_nodes">
  34. <return type="Array" />
  35. <description>
  36. 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.
  37. </description>
  38. </method>
  39. <method name="remove_node">
  40. <return type="void" />
  41. <argument index="0" name="node" type="Node" />
  42. <description>
  43. Removes a node from the selection.
  44. </description>
  45. </method>
  46. </methods>
  47. <signals>
  48. <signal name="selection_changed">
  49. <description>
  50. Emitted when the selection changes.
  51. </description>
  52. </signal>
  53. </signals>
  54. </class>