123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- :github_url: hide
- .. meta::
- :keywords: tilemap
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/modules/gridmap/doc_classes/GridMapEditorPlugin.xml.
- .. _class_GridMapEditorPlugin:
- GridMapEditorPlugin
- ===================
- **Inherits:** :ref:`EditorPlugin<class_EditorPlugin>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- Editor for :ref:`GridMap<class_GridMap>` nodes.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- GridMapEditorPlugin provides access to the :ref:`GridMap<class_GridMap>` editor functionality.
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`clear_selection<class_GridMapEditorPlugin_method_clear_selection>`\ (\ ) |
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`GridMap<class_GridMap>` | :ref:`get_current_grid_map<class_GridMapEditorPlugin_method_get_current_grid_map>`\ (\ ) |const| |
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Array<class_Array>` | :ref:`get_selected_cells<class_GridMapEditorPlugin_method_get_selected_cells>`\ (\ ) |const| |
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_selected_palette_item<class_GridMapEditorPlugin_method_get_selected_palette_item>`\ (\ ) |const| |
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`AABB<class_AABB>` | :ref:`get_selection<class_GridMapEditorPlugin_method_get_selection>`\ (\ ) |const| |
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_selection<class_GridMapEditorPlugin_method_has_selection>`\ (\ ) |const| |
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`set_selected_palette_item<class_GridMapEditorPlugin_method_set_selected_palette_item>`\ (\ item\: :ref:`int<class_int>`\ ) |const| |
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`set_selection<class_GridMapEditorPlugin_method_set_selection>`\ (\ begin\: :ref:`Vector3i<class_Vector3i>`, end\: :ref:`Vector3i<class_Vector3i>`\ ) |
- +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_GridMapEditorPlugin_method_clear_selection:
- .. rst-class:: classref-method
- |void| **clear_selection**\ (\ ) :ref:`🔗<class_GridMapEditorPlugin_method_clear_selection>`
- Deselects any currently selected cells.
- .. rst-class:: classref-item-separator
- ----
- .. _class_GridMapEditorPlugin_method_get_current_grid_map:
- .. rst-class:: classref-method
- :ref:`GridMap<class_GridMap>` **get_current_grid_map**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_current_grid_map>`
- Returns the :ref:`GridMap<class_GridMap>` node currently edited by the grid map editor.
- .. rst-class:: classref-item-separator
- ----
- .. _class_GridMapEditorPlugin_method_get_selected_cells:
- .. rst-class:: classref-method
- :ref:`Array<class_Array>` **get_selected_cells**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selected_cells>`
- Returns an array of :ref:`Vector3i<class_Vector3i>`\ s with the selected cells' coordinates.
- .. rst-class:: classref-item-separator
- ----
- .. _class_GridMapEditorPlugin_method_get_selected_palette_item:
- .. rst-class:: classref-method
- :ref:`int<class_int>` **get_selected_palette_item**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selected_palette_item>`
- 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.
- \ **Note:** The indices might not be in the same order as they appear in the editor's interface.
- .. rst-class:: classref-item-separator
- ----
- .. _class_GridMapEditorPlugin_method_get_selection:
- .. rst-class:: classref-method
- :ref:`AABB<class_AABB>` **get_selection**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_get_selection>`
- 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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_GridMapEditorPlugin_method_has_selection:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **has_selection**\ (\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_has_selection>`
- Returns ``true`` if there are selected cells.
- .. rst-class:: classref-item-separator
- ----
- .. _class_GridMapEditorPlugin_method_set_selected_palette_item:
- .. rst-class:: classref-method
- |void| **set_selected_palette_item**\ (\ item\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_GridMapEditorPlugin_method_set_selected_palette_item>`
- 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.
- \ **Note:** The indices might not be in the same order as they appear in the editor's interface.
- .. rst-class:: classref-item-separator
- ----
- .. _class_GridMapEditorPlugin_method_set_selection:
- .. rst-class:: classref-method
- |void| **set_selection**\ (\ begin\: :ref:`Vector3i<class_Vector3i>`, end\: :ref:`Vector3i<class_Vector3i>`\ ) :ref:`🔗<class_GridMapEditorPlugin_method_set_selection>`
- Selects the cells inside the given bounds from ``begin`` to ``end``.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|