class_gridmapeditorplugin.rst 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. :github_url: hide
  2. .. meta::
  3. :keywords: tilemap
  4. .. DO NOT EDIT THIS FILE!!!
  5. .. Generated automatically from Godot engine sources.
  6. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  7. .. XML source: https://github.com/godotengine/godot/tree/master/modules/gridmap/doc_classes/GridMapEditorPlugin.xml.
  8. .. _class_GridMapEditorPlugin:
  9. GridMapEditorPlugin
  10. ===================
  11. **Inherits:** :ref:`EditorPlugin<class_EditorPlugin>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  12. Editor for :ref:`GridMap<class_GridMap>` nodes.
  13. .. rst-class:: classref-introduction-group
  14. Description
  15. -----------
  16. GridMapEditorPlugin provides access to the :ref:`GridMap<class_GridMap>` editor functionality.
  17. .. rst-class:: classref-reftable-group
  18. Methods
  19. -------
  20. .. table::
  21. :widths: auto
  22. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | |void| | :ref:`clear_selection<class_GridMapEditorPlugin_method_clear_selection>`\ (\ ) |
  24. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`GridMap<class_GridMap>` | :ref:`get_current_grid_map<class_GridMapEditorPlugin_method_get_current_grid_map>`\ (\ ) |const| |
  26. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`Array<class_Array>` | :ref:`get_selected_cells<class_GridMapEditorPlugin_method_get_selected_cells>`\ (\ ) |const| |
  28. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`get_selected_palette_item<class_GridMapEditorPlugin_method_get_selected_palette_item>`\ (\ ) |const| |
  30. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`AABB<class_AABB>` | :ref:`get_selection<class_GridMapEditorPlugin_method_get_selection>`\ (\ ) |const| |
  32. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`bool<class_bool>` | :ref:`has_selection<class_GridMapEditorPlugin_method_has_selection>`\ (\ ) |const| |
  34. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | |void| | :ref:`set_selected_palette_item<class_GridMapEditorPlugin_method_set_selected_palette_item>`\ (\ item\: :ref:`int<class_int>`\ ) |const| |
  36. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | |void| | :ref:`set_selection<class_GridMapEditorPlugin_method_set_selection>`\ (\ begin\: :ref:`Vector3i<class_Vector3i>`, end\: :ref:`Vector3i<class_Vector3i>`\ ) |
  38. +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. .. rst-class:: classref-section-separator
  40. ----
  41. .. rst-class:: classref-descriptions-group
  42. Method Descriptions
  43. -------------------
  44. .. _class_GridMapEditorPlugin_method_clear_selection:
  45. .. rst-class:: classref-method
  46. |void| **clear_selection**\ (\ ) :ref:`🔗<class_GridMapEditorPlugin_method_clear_selection>`
  47. Deselects any currently selected cells.
  48. .. rst-class:: classref-item-separator
  49. ----
  50. .. _class_GridMapEditorPlugin_method_get_current_grid_map:
  51. .. rst-class:: classref-method
  52. :ref:`GridMap<class_GridMap>` **get_current_grid_map**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_current_grid_map>`
  53. Returns the :ref:`GridMap<class_GridMap>` node currently edited by the grid map editor.
  54. .. rst-class:: classref-item-separator
  55. ----
  56. .. _class_GridMapEditorPlugin_method_get_selected_cells:
  57. .. rst-class:: classref-method
  58. :ref:`Array<class_Array>` **get_selected_cells**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selected_cells>`
  59. Returns an array of :ref:`Vector3i<class_Vector3i>`\ s with the selected cells' coordinates.
  60. .. rst-class:: classref-item-separator
  61. ----
  62. .. _class_GridMapEditorPlugin_method_get_selected_palette_item:
  63. .. rst-class:: classref-method
  64. :ref:`int<class_int>` **get_selected_palette_item**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selected_palette_item>`
  65. Returns the index of the selected :ref:`MeshLibrary<class_MeshLibrary>` item in the grid map editor's palette or ``-1`` if no item is selected.
  66. \ **Note:** The indices might not be in the same order as they appear in the editor's interface.
  67. .. rst-class:: classref-item-separator
  68. ----
  69. .. _class_GridMapEditorPlugin_method_get_selection:
  70. .. rst-class:: classref-method
  71. :ref:`AABB<class_AABB>` **get_selection**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selection>`
  72. Returns the cell coordinate bounds of the current selection. Use :ref:`has_selection()<class_GridMapEditorPlugin_method_has_selection>` to check if there is an active selection.
  73. .. rst-class:: classref-item-separator
  74. ----
  75. .. _class_GridMapEditorPlugin_method_has_selection:
  76. .. rst-class:: classref-method
  77. :ref:`bool<class_bool>` **has_selection**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_has_selection>`
  78. Returns ``true`` if there are selected cells.
  79. .. rst-class:: classref-item-separator
  80. ----
  81. .. _class_GridMapEditorPlugin_method_set_selected_palette_item:
  82. .. rst-class:: classref-method
  83. |void| **set_selected_palette_item**\ (\ item\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_set_selected_palette_item>`
  84. Selects the :ref:`MeshLibrary<class_MeshLibrary>` item with the given index in the grid map editor's palette. If a negative index is given, no item will be selected. If a value greater than the last index is given, the last item will be selected.
  85. \ **Note:** The indices might not be in the same order as they appear in the editor's interface.
  86. .. rst-class:: classref-item-separator
  87. ----
  88. .. _class_GridMapEditorPlugin_method_set_selection:
  89. .. rst-class:: classref-method
  90. |void| **set_selection**\ (\ begin\: :ref:`Vector3i<class_Vector3i>`, end\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_GridMapEditorPlugin_method_set_selection>`
  91. Selects the cells inside the given bounds from ``begin`` to ``end``.
  92. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  93. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  94. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  95. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  96. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  97. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  98. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  99. .. |void| replace:: :abbr:`void (No return value.)`