summaryrefslogtreecommitdiff
path: root/modules/gridmap
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gridmap')
-rw-r--r--modules/gridmap/doc_classes/GridMap.xml22
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp2
-rw-r--r--modules/gridmap/icons/icon_grid_map.svg5
3 files changed, 17 insertions, 12 deletions
diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml
index f8f9fc1af9..325432579f 100644
--- a/modules/gridmap/doc_classes/GridMap.xml
+++ b/modules/gridmap/doc_classes/GridMap.xml
@@ -86,14 +86,14 @@
<return type="Array">
</return>
<description>
- Array of [Transform] and [Mesh] references corresponding to the non empty cells in the grid. The transforms are specified in world space.
+ Array of [Transform] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in world space.
</description>
</method>
<method name="get_used_cells" qualifiers="const">
<return type="Array">
</return>
<description>
- Array of [Vector3] with the non empty cell coordinates in the grid map.
+ Array of [Vector3] with the non-empty cell coordinates in the grid map.
</description>
</method>
<method name="make_baked_meshes">
@@ -189,28 +189,28 @@
</method>
</methods>
<members>
- <member name="cell_center_x" type="bool" setter="set_center_x" getter="get_center_x">
+ <member name="cell_center_x" type="bool" setter="set_center_x" getter="get_center_x" default="true">
If [code]true[/code], grid items are centered on the X axis.
</member>
- <member name="cell_center_y" type="bool" setter="set_center_y" getter="get_center_y">
+ <member name="cell_center_y" type="bool" setter="set_center_y" getter="get_center_y" default="true">
If [code]true[/code], grid items are centered on the Y axis.
</member>
- <member name="cell_center_z" type="bool" setter="set_center_z" getter="get_center_z">
+ <member name="cell_center_z" type="bool" setter="set_center_z" getter="get_center_z" default="true">
If [code]true[/code], grid items are centered on the Z axis.
</member>
- <member name="cell_octant_size" type="int" setter="set_octant_size" getter="get_octant_size">
+ <member name="cell_octant_size" type="int" setter="set_octant_size" getter="get_octant_size" default="8">
The size of each octant measured in number of cells. This applies to all three axis.
</member>
- <member name="cell_scale" type="float" setter="set_cell_scale" getter="get_cell_scale">
+ <member name="cell_scale" type="float" setter="set_cell_scale" getter="get_cell_scale" default="1.0">
</member>
- <member name="cell_size" type="Vector3" setter="set_cell_size" getter="get_cell_size">
+ <member name="cell_size" type="Vector3" setter="set_cell_size" getter="get_cell_size" default="Vector3( 2, 2, 2 )">
The dimensions of the grid's cells.
</member>
- <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1">
</member>
- <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
</member>
- <member name="mesh_library" type="MeshLibrary" setter="set_mesh_library" getter="get_mesh_library">
+ <member name="mesh_library" type="MeshLibrary" setter="set_mesh_library" getter="get_mesh_library" default="null">
The assigned [MeshLibrary].
</member>
<member name="theme" type="MeshLibrary" setter="set_theme" getter="get_theme">
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 03619aa0bd..20e454c218 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -235,7 +235,7 @@ void GridMapEditor::_menu_option(int p_option) {
options->get_popup()->set_item_checked(idx, !options->get_popup()->is_item_checked(idx));
} break;
- case MENU_OPTION_SELECTION_DUPLICATE: // fallthrough
+ case MENU_OPTION_SELECTION_DUPLICATE:
case MENU_OPTION_SELECTION_CUT: {
if (!(selection.active && input_action == INPUT_NONE))
break;
diff --git a/modules/gridmap/icons/icon_grid_map.svg b/modules/gridmap/icons/icon_grid_map.svg
new file mode 100644
index 0000000000..eafe1211f2
--- /dev/null
+++ b/modules/gridmap/icons/icon_grid_map.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1-6 3v8l6 3 6-3v-2l-2-1-4 2-2-1v-4l2-1v-2l2-1zm4 2-2 1v2l2 1 2-1v-2z" fill="#fc9c9c" fill-opacity=".99608"/>
+</g>
+</svg>