GridMapEditorPlugin.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="GridMapEditorPlugin" inherits="EditorPlugin" keywords="tilemap" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. Editor for [GridMap] nodes.
  5. </brief_description>
  6. <description>
  7. GridMapEditorPlugin provides access to the [GridMap] editor functionality.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="clear_selection">
  13. <return type="void" />
  14. <description>
  15. Deselects any currently selected cells.
  16. </description>
  17. </method>
  18. <method name="get_current_grid_map" qualifiers="const">
  19. <return type="GridMap" />
  20. <description>
  21. Returns the [GridMap] node currently edited by the grid map editor.
  22. </description>
  23. </method>
  24. <method name="get_selected_cells" qualifiers="const">
  25. <return type="Array" />
  26. <description>
  27. Returns an array of [Vector3i]s with the selected cells' coordinates.
  28. </description>
  29. </method>
  30. <method name="get_selected_palette_item" qualifiers="const">
  31. <return type="int" />
  32. <description>
  33. Returns the index of the selected [MeshLibrary] item in the grid map editor's palette or [code]-1[/code] if no item is selected.
  34. [b]Note:[/b] The indices might not be in the same order as they appear in the editor's interface.
  35. </description>
  36. </method>
  37. <method name="get_selection" qualifiers="const">
  38. <return type="AABB" />
  39. <description>
  40. Returns the cell coordinate bounds of the current selection. Use [method has_selection] to check if there is an active selection.
  41. </description>
  42. </method>
  43. <method name="has_selection" qualifiers="const">
  44. <return type="bool" />
  45. <description>
  46. Returns [code]true[/code] if there are selected cells.
  47. </description>
  48. </method>
  49. <method name="set_selected_palette_item" qualifiers="const">
  50. <return type="void" />
  51. <param index="0" name="item" type="int" />
  52. <description>
  53. Selects the [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.
  54. [b]Note:[/b] The indices might not be in the same order as they appear in the editor's interface.
  55. </description>
  56. </method>
  57. <method name="set_selection">
  58. <return type="void" />
  59. <param index="0" name="begin" type="Vector3i" />
  60. <param index="1" name="end" type="Vector3i" />
  61. <description>
  62. Selects the cells inside the given bounds from [param begin] to [param end].
  63. </description>
  64. </method>
  65. </methods>
  66. </class>