From c8519b8ce6176d71060c48f678ddb09478e946f1 Mon Sep 17 00:00:00 2001
From: Cory Petkovsek <632766+TokisanGames@users.noreply.github.com>
Date: Thu, 26 Dec 2024 14:09:15 +0700
Subject: [PATCH] Embed XML API documentation into the engine
---
SConstruct | 5 +
Terrain3D.vcxproj | 20 +-
Terrain3D.vcxproj.filters | 20 +-
doc/api/class_terrain3d.rst | 286 +++++------
doc/api/class_terrain3dassets.rst | 94 ++--
doc/api/class_terrain3ddata.rst | 466 +++++++++---------
doc/api/class_terrain3deditor.rst | 70 +--
doc/api/class_terrain3dinstancer.rst | 86 ++--
doc/api/class_terrain3dmaterial.rst | 214 ++++----
doc/api/class_terrain3dmeshasset.rst | 136 ++---
doc/api/class_terrain3dregion.rst | 216 ++++----
doc/api/class_terrain3dtextureasset.rst | 80 +--
doc/api/class_terrain3dutil.rst | 170 +++----
doc/api/index.rst | 34 +-
doc/build_docs.sh | 7 +-
doc/{classes => doc_classes}/Terrain3D.xml | 4 +-
.../Terrain3DAssets.xml | 2 +-
.../Terrain3DData.xml | 8 +-
.../Terrain3DEditor.xml | 2 +-
.../Terrain3DInstancer.xml | 2 +-
.../Terrain3DMaterial.xml | 2 +-
.../Terrain3DMeshAsset.xml | 2 +-
.../Terrain3DRegion.xml | 6 +-
.../Terrain3DTextureAsset.xml | 4 +-
.../Terrain3DUtil.xml | 2 +-
25 files changed, 961 insertions(+), 977 deletions(-)
rename doc/{classes => doc_classes}/Terrain3D.xml (98%)
rename doc/{classes => doc_classes}/Terrain3DAssets.xml (98%)
rename doc/{classes => doc_classes}/Terrain3DData.xml (98%)
rename doc/{classes => doc_classes}/Terrain3DEditor.xml (98%)
rename doc/{classes => doc_classes}/Terrain3DInstancer.xml (98%)
rename doc/{classes => doc_classes}/Terrain3DMaterial.xml (99%)
rename doc/{classes => doc_classes}/Terrain3DMeshAsset.xml (98%)
rename doc/{classes => doc_classes}/Terrain3DRegion.xml (94%)
rename doc/{classes => doc_classes}/Terrain3DTextureAsset.xml (92%)
rename doc/{classes => doc_classes}/Terrain3DUtil.xml (99%)
diff --git a/SConstruct b/SConstruct
index e30aa4b6..0782c7b2 100644
--- a/SConstruct
+++ b/SConstruct
@@ -24,6 +24,11 @@ if scons_cache_path != None:
CacheDir(scons_cache_path)
print("Scons cache enabled... (path: '" + scons_cache_path + "')")
+# Embed documentation into the engine
+if env["target"] in ["editor", "template_debug"]:
+ doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("doc/doc_classes/*.xml"))
+ sources.append(doc_data)
+
# Create the library target (e.g. libexample.linux.debug.x86_64.so).
debug_or_release = "release" if env["target"] == "template_release" else "debug"
if env["platform"] == "macos":
diff --git a/Terrain3D.vcxproj b/Terrain3D.vcxproj
index 96968e6f..11d7df4c 100644
--- a/Terrain3D.vcxproj
+++ b/Terrain3D.vcxproj
@@ -236,16 +236,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/Terrain3D.vcxproj.filters b/Terrain3D.vcxproj.filters
index 347df66b..ff4facc3 100644
--- a/Terrain3D.vcxproj.filters
+++ b/Terrain3D.vcxproj.filters
@@ -299,34 +299,34 @@
-
+
3. XML
-
+
3. XML
-
+
3. XML
-
+
3. XML
-
+
3. XML
-
+
3. XML
-
+
3. XML
-
+
3. XML
-
+
3. XML
-
+
3. XML
diff --git a/doc/api/class_terrain3d.rst b/doc/api/class_terrain3d.rst
index 5302b8a4..10f5bac7 100644
--- a/doc/api/class_terrain3d.rst
+++ b/doc/api/class_terrain3d.rst
@@ -2,15 +2,15 @@
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
-.. Generator: https://github.com/godotengine/godot/tree/4.3/doc/tools/make_rst.py.
-.. XML source: https://github.com/godotengine/godot/tree/4.3/../_plugins/Terrain3D/doc/classes/Terrain3D.xml.
+.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
+.. XML source: https://github.com/godotengine/godot/tree/master/../_plugins/Terrain3D/doc/doc_classes/Terrain3D.xml.
.. _class_Terrain3D:
Terrain3D
=========
-**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object`
+**Inherits:** ``Node3D``
.. rst-class:: classref-introduction-group
@@ -19,7 +19,7 @@ Description
Terrain3D is a high performance, editable terrain system for Godot 4. It provides a clipmap based terrain that supports terrains from 64x64m up to 65.5x65.5km with multiple LODs, 32 textures, and editor tools for importing or creating terrains.
-This class handles mesh and collision generation, and management of the whole system. See `System Architecture <../docs/system_architecture.html>`__ for design details.
+This class handles mesh and collision generation, and management of the whole system. See `System Architecture `__ for design details.
.. rst-class:: classref-reftable-group
@@ -29,57 +29,57 @@ Properties
.. table::
:widths: auto
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`Terrain3DAssets` | :ref:`assets` | |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`ShadowCastingSetting` | :ref:`cast_shadows` | ``1`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`bool` | :ref:`collision_enabled` | ``true`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`int` | :ref:`collision_layer` | ``1`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`int` | :ref:`collision_mask` | ``1`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`float` | :ref:`collision_priority` | ``1.0`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`float` | :ref:`cull_margin` | ``0.0`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`Terrain3DData` | :ref:`data` | |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`String` | :ref:`data_directory` | ``""`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`int` | :ref:`debug_level` | ``0`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`GIMode` | :ref:`gi_mode` | ``1`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`Terrain3DInstancer` | :ref:`instancer` | |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`float` | :ref:`label_distance` | ``0.0`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`int` | :ref:`label_size` | ``48`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`Terrain3DMaterial` | :ref:`material` | |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`int` | :ref:`mesh_lods` | ``7`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`int` | :ref:`mesh_size` | ``48`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`int` | :ref:`mouse_layer` | ``32`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`RegionSize` | :ref:`region_size` | ``256`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`int` | :ref:`render_layers` | ``2147483649`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`bool` | :ref:`save_16_bit` | ``false`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`bool` | :ref:`show_grid` | ``false`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`String` | :ref:`version` | ``"1.0.0-dev"`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
- | :ref:`float` | :ref:`vertex_spacing` | ``1.0`` |
- +------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | :ref:`Terrain3DAssets` | :ref:`assets` | |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | RenderingServer.ShadowCastingSetting | :ref:`cast_shadows` | ``1`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``bool`` | :ref:`collision_enabled` | ``true`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``int`` | :ref:`collision_layer` | ``1`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``int`` | :ref:`collision_mask` | ``1`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``float`` | :ref:`collision_priority` | ``1.0`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``float`` | :ref:`cull_margin` | ``0.0`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | :ref:`Terrain3DData` | :ref:`data` | |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``String`` | :ref:`data_directory` | ``""`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``int`` | :ref:`debug_level` | ``0`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | GeometryInstance3D.GIMode | :ref:`gi_mode` | ``1`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | :ref:`Terrain3DInstancer` | :ref:`instancer` | |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``float`` | :ref:`label_distance` | ``0.0`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``int`` | :ref:`label_size` | ``48`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | :ref:`Terrain3DMaterial` | :ref:`material` | |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``int`` | :ref:`mesh_lods` | ``7`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``int`` | :ref:`mesh_size` | ``48`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``int`` | :ref:`mouse_layer` | ``32`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | :ref:`RegionSize` | :ref:`region_size` | ``256`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``int`` | :ref:`render_layers` | ``2147483649`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``bool`` | :ref:`save_16_bit` | ``false`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``bool`` | :ref:`show_grid` | ``false`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``String`` | :ref:`version` | ``"1.0.0-dev"`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
+ | ``float`` | :ref:`vertex_spacing` | ``1.0`` |
+ +-----------------------------------------------------+------------------------------------------------------------------------+-----------------+
.. rst-class:: classref-reftable-group
@@ -89,29 +89,29 @@ Methods
.. table::
:widths: auto
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Mesh` | :ref:`bake_mesh`\ (\ lod\: :ref:`int`, filter\: :ref:`HeightFilter`\ ) |const| |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedVector3Array` | :ref:`generate_nav_mesh_source_geometry`\ (\ global_aabb\: :ref:`AABB`, require_nav\: :ref:`bool` = true\ ) |const| |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Camera3D` | :ref:`get_camera`\ (\ ) |const| |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`RID` | :ref:`get_collision_rid`\ (\ ) |const| |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Terrain3DEditor` | :ref:`get_editor`\ (\ ) |const| |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3` | :ref:`get_intersection`\ (\ src_pos\: :ref:`Vector3`, direction\: :ref:`Vector3`, gpu_mode\: :ref:`bool` = false\ ) |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`EditorPlugin` | :ref:`get_plugin`\ (\ ) |const| |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool` | :ref:`is_compatibility_mode`\ (\ ) |const| |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`set_camera`\ (\ camera\: :ref:`Camera3D`\ ) |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`set_editor`\ (\ editor\: :ref:`Terrain3DEditor`\ ) |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`set_plugin`\ (\ plugin\: :ref:`EditorPlugin`\ ) |
- +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | ``Mesh`` | :ref:`bake_mesh`\ (\ lod\: ``int``, filter\: :ref:`HeightFilter`\ ) |const| |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | ``PackedVector3Array`` | :ref:`generate_nav_mesh_source_geometry`\ (\ global_aabb\: ``AABB``, require_nav\: ``bool`` = true\ ) |const| |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | ``Camera3D`` | :ref:`get_camera`\ (\ ) |const| |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | ``RID`` | :ref:`get_collision_rid`\ (\ ) |const| |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | :ref:`Terrain3DEditor` | :ref:`get_editor`\ (\ ) |const| |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | ``Vector3`` | :ref:`get_intersection`\ (\ src_pos\: ``Vector3``, direction\: ``Vector3``, gpu_mode\: ``bool`` = false\ ) |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | ``EditorPlugin`` | :ref:`get_plugin`\ (\ ) |const| |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | ``bool`` | :ref:`is_compatibility_mode`\ (\ ) |const| |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`set_camera`\ (\ camera\: ``Camera3D``\ ) |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`set_editor`\ (\ editor\: :ref:`Terrain3DEditor`\ ) |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+ | |void| | :ref:`set_plugin`\ (\ plugin\: ``EditorPlugin``\ ) |
+ +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
@@ -261,12 +261,12 @@ The list of texture and mesh assets used by Terrain3D. You can optionally save t
.. rst-class:: classref-property
-:ref:`ShadowCastingSetting` **cast_shadows** = ``1`` :ref:`🔗`
+RenderingServer.ShadowCastingSetting **cast_shadows** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_cast_shadows**\ (\ value\: :ref:`ShadowCastingSetting`\ )
-- :ref:`ShadowCastingSetting` **get_cast_shadows**\ (\ )
+- |void| **set_cast_shadows**\ (\ value\: RenderingServer.ShadowCastingSetting\ )
+- RenderingServer.ShadowCastingSetting **get_cast_shadows**\ (\ )
Tells the renderer how to cast shadows from the terrain onto other objects. This sets ``GeometryInstance3D.ShadowCastingSetting`` in the engine.
@@ -278,12 +278,12 @@ Tells the renderer how to cast shadows from the terrain onto other objects. This
.. rst-class:: classref-property
-:ref:`bool` **collision_enabled** = ``true`` :ref:`🔗`
+``bool`` **collision_enabled** = ``true`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_collision_enabled**\ (\ value\: :ref:`bool`\ )
-- :ref:`bool` **get_collision_enabled**\ (\ )
+- |void| **set_collision_enabled**\ (\ value\: ``bool``\ )
+- ``bool`` **get_collision_enabled**\ (\ )
If enabled, collision is generated according to the mode selected. By default collision is generated for all regions at run time only using the physics server. Also see :ref:`collision_mode`.
@@ -295,12 +295,12 @@ If enabled, collision is generated according to the mode selected. By default co
.. rst-class:: classref-property
-:ref:`int` **collision_layer** = ``1`` :ref:`🔗`
+``int`` **collision_layer** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_collision_layer**\ (\ value\: :ref:`int`\ )
-- :ref:`int` **get_collision_layer**\ (\ )
+- |void| **set_collision_layer**\ (\ value\: ``int``\ )
+- ``int`` **get_collision_layer**\ (\ )
The physics layers the terrain lives in. Also see :ref:`collision_mask`.
@@ -312,12 +312,12 @@ The physics layers the terrain lives in. Also see :ref:`collision_mask` **collision_mask** = ``1`` :ref:`🔗`
+``int`` **collision_mask** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_collision_mask**\ (\ value\: :ref:`int`\ )
-- :ref:`int` **get_collision_mask**\ (\ )
+- |void| **set_collision_mask**\ (\ value\: ``int``\ )
+- ``int`` **get_collision_mask**\ (\ )
The physics layers the terrain scans for colliding objects. Also see :ref:`collision_layer`.
@@ -350,12 +350,12 @@ If collision is enabled, collision_mode specifies when and where collision is ge
.. rst-class:: classref-property
-:ref:`float` **collision_priority** = ``1.0`` :ref:`🔗`
+``float`` **collision_priority** = ``1.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_collision_priority**\ (\ value\: :ref:`float`\ )
-- :ref:`float` **get_collision_priority**\ (\ )
+- |void| **set_collision_priority**\ (\ value\: ``float``\ )
+- ``float`` **get_collision_priority**\ (\ )
The priority used to solve collisions. The higher priority, the lower the penetration of a colliding object.
@@ -367,12 +367,12 @@ The priority used to solve collisions. The higher priority, the lower the penetr
.. rst-class:: classref-property
-:ref:`float` **cull_margin** = ``0.0`` :ref:`🔗`
+``float`` **cull_margin** = ``0.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_cull_margin**\ (\ value\: :ref:`float`\ )
-- :ref:`float` **get_cull_margin**\ (\ )
+- |void| **set_cull_margin**\ (\ value\: ``float``\ )
+- ``float`` **get_cull_margin**\ (\ )
This margin is added to the vertical component of the terrain bounding box (AABB). The terrain already sets its AABB from :ref:`Terrain3DData.get_height_range`, which is calculated while sculpting. This setting only needs to be used if the shader has expanded the terrain beyond the AABB and the terrain meshes are being culled at certain viewing angles. This might happen from using :ref:`Terrain3DMaterial.world_background` with NOISE and a height value larger than the terrain heights. This setting is similar to ``GeometryInstance3D.extra_cull_margin``, but it only affects the Y axis.
@@ -400,12 +400,12 @@ This class manages loading, saving, adding, and removing of Terrain3DRegions and
.. rst-class:: classref-property
-:ref:`String` **data_directory** = ``""`` :ref:`🔗`
+``String`` **data_directory** = ``""`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_data_directory**\ (\ value\: :ref:`String`\ )
-- :ref:`String` **get_data_directory**\ (\ )
+- |void| **set_data_directory**\ (\ value\: ``String``\ )
+- ``String`` **get_data_directory**\ (\ )
The directory where terrain data will be saved to and loaded from.
@@ -417,12 +417,12 @@ The directory where terrain data will be saved to and loaded from.
.. rst-class:: classref-property
-:ref:`int` **debug_level** = ``0`` :ref:`🔗`
+``int`` **debug_level** = ``0`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_debug_level**\ (\ value\: :ref:`int`\ )
-- :ref:`int` **get_debug_level**\ (\ )
+- |void| **set_debug_level**\ (\ value\: ``int``\ )
+- ``int`` **get_debug_level**\ (\ )
The verbosity of debug messages printed to the console. Errors and warnings are always printed. This can also be set via command line using ``--terrain3d-debug=LEVEL`` where ``LEVEL`` is one of ``ERROR, INFO, DEBUG, EXTREME``. The last includes continuously recurring messages like position updates for the mesh as the camera moves around.
@@ -434,12 +434,12 @@ The verbosity of debug messages printed to the console. Errors and warnings are
.. rst-class:: classref-property
-:ref:`GIMode` **gi_mode** = ``1`` :ref:`🔗`
+GeometryInstance3D.GIMode **gi_mode** = ``1`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_gi_mode**\ (\ value\: :ref:`GIMode`\ )
-- :ref:`GIMode` **get_gi_mode**\ (\ )
+- |void| **set_gi_mode**\ (\ value\: GeometryInstance3D.GIMode\ )
+- GeometryInstance3D.GIMode **get_gi_mode**\ (\ )
Tells the renderer which global illumination mode to use for Terrain3D. This sets ``GeometryInstance3D.gi_mode`` in the engine.
@@ -467,12 +467,12 @@ The active :ref:`Terrain3DInstancer` object.
.. rst-class:: classref-property
-:ref:`float` **label_distance** = ``0.0`` :ref:`🔗`
+``float`` **label_distance** = ``0.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_label_distance**\ (\ value\: :ref:`float`\ )
-- :ref:`float` **get_label_distance**\ (\ )
+- |void| **set_label_distance**\ (\ value\: ``float``\ )
+- ``float`` **get_label_distance**\ (\ )
If label_distance is non-zero (try 1024-4096) it will generate and display region coordinates in the viewport so you can identify the exact region files you are editing. This setting is the visible distance of the labels.
@@ -484,12 +484,12 @@ If label_distance is non-zero (try 1024-4096) it will generate and display regio
.. rst-class:: classref-property
-:ref:`int` **label_size** = ``48`` :ref:`🔗`
+``int`` **label_size** = ``48`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_label_size**\ (\ value\: :ref:`int`\ )
-- :ref:`int` **get_label_size**\ (\ )
+- |void| **set_label_size**\ (\ value\: ``int``\ )
+- ``int`` **get_label_size**\ (\ )
Sets the font size for region labels. See :ref:`label_distance`.
@@ -518,12 +518,12 @@ A custom material for Terrain3D. You can optionally save this as an external ``.
.. rst-class:: classref-property
-:ref:`int` **mesh_lods** = ``7`` :ref:`🔗`
+``int`` **mesh_lods** = ``7`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_mesh_lods**\ (\ value\: :ref:`int`\ )
-- :ref:`int` **get_mesh_lods**\ (\ )
+- |void| **set_mesh_lods**\ (\ value\: ``int``\ )
+- ``int`` **get_mesh_lods**\ (\ )
The number of lods generated in the mesh. Enable wireframe mode in the viewport to see them.
@@ -535,12 +535,12 @@ The number of lods generated in the mesh. Enable wireframe mode in the viewport
.. rst-class:: classref-property
-:ref:`int` **mesh_size** = ``48`` :ref:`🔗`
+``int`` **mesh_size** = ``48`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_mesh_size**\ (\ value\: :ref:`int`\ )
-- :ref:`int` **get_mesh_size**\ (\ )
+- |void| **set_mesh_size**\ (\ value\: ``int``\ )
+- ``int`` **get_mesh_size**\ (\ )
The correlated size of the terrain meshes. Lod0 has ``4*mesh_size + 2`` quads per side. E.g. when mesh_size=8, lod0 has 34 quads to a side, including 2 quads for seams.
@@ -552,12 +552,12 @@ The correlated size of the terrain meshes. Lod0 has ``4*mesh_size + 2`` quads pe
.. rst-class:: classref-property
-:ref:`int` **mouse_layer** = ``32`` :ref:`🔗`
+``int`` **mouse_layer** = ``32`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_mouse_layer**\ (\ value\: :ref:`int`\ )
-- :ref:`int` **get_mouse_layer**\ (\ )
+- |void| **set_mouse_layer**\ (\ value\: ``int``\ )
+- ``int`` **get_mouse_layer**\ (\ )
Godot supports 32 render layers. For most objects, only layers 1-20 are available for selection in the inspector. 21-32 are settable via code, and are considered reserved for editor plugins.
@@ -592,12 +592,12 @@ The number of vertices in each region, and the number of pixels for each map in
.. rst-class:: classref-property
-:ref:`int` **render_layers** = ``2147483649`` :ref:`🔗`
+``int`` **render_layers** = ``2147483649`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_render_layers**\ (\ value\: :ref:`int`\ )
-- :ref:`int` **get_render_layers**\ (\ )
+- |void| **set_render_layers**\ (\ value\: ``int``\ )
+- ``int`` **get_render_layers**\ (\ )
The render layers the terrain is drawn on. This sets ``VisualInstance3D.layers`` in the engine. The defaults is layer 1 and 32 (for the mouse cursor). When you set this, make sure the layer for :ref:`mouse_layer` is included, or set that variable again after this so that the mouse cursor works.
@@ -609,12 +609,12 @@ The render layers the terrain is drawn on. This sets ``VisualInstance3D.layers``
.. rst-class:: classref-property
-:ref:`bool` **save_16_bit** = ``false`` :ref:`🔗`
+``bool`` **save_16_bit** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_save_16_bit**\ (\ value\: :ref:`bool`\ )
-- :ref:`bool` **get_save_16_bit**\ (\ )
+- |void| **set_save_16_bit**\ (\ value\: ``bool``\ )
+- ``bool`` **get_save_16_bit**\ (\ )
If enabled, heightmaps are saved as 16-bit half-precision to reduce file size. Files are always loaded in 32-bit for editing. Upon save, a copy of the heightmap is converted to 16-bit for writing. It does not change what is currently in memory.
@@ -628,12 +628,12 @@ This process is lossy. 16-bit precision gets increasingly worse with every power
.. rst-class:: classref-property
-:ref:`bool` **show_grid** = ``false`` :ref:`🔗`
+``bool`` **show_grid** = ``false`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_show_grid**\ (\ value\: :ref:`bool`\ )
-- :ref:`bool` **get_show_grid**\ (\ )
+- |void| **set_show_grid**\ (\ value\: ``bool``\ )
+- ``bool`` **get_show_grid**\ (\ )
Draws the region grid directly on the terrain. This is more accurate than the region grid gizmo for determining where the region border is when editing.
@@ -645,11 +645,11 @@ Draws the region grid directly on the terrain. This is more accurate than the re
.. rst-class:: classref-property
-:ref:`String` **version** = ``"1.0.0-dev"`` :ref:`🔗`
+``String`` **version** = ``"1.0.0-dev"`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- :ref:`String` **get_version**\ (\ )
+- ``String`` **get_version**\ (\ )
The current version of Terrain3D.
@@ -661,12 +661,12 @@ The current version of Terrain3D.
.. rst-class:: classref-property
-:ref:`float` **vertex_spacing** = ``1.0`` :ref:`🔗`
+``float`` **vertex_spacing** = ``1.0`` :ref:`🔗`
.. rst-class:: classref-property-setget
-- |void| **set_vertex_spacing**\ (\ value\: :ref:`float`\ )
-- :ref:`float` **get_vertex_spacing**\ (\ )
+- |void| **set_vertex_spacing**\ (\ value\: ``float``\ )
+- ``float`` **get_vertex_spacing**\ (\ )
The distance between vertices. Godot units are typically considered to be meters. This laterally scales the terrain on X and Z axes.
@@ -689,7 +689,7 @@ Method Descriptions
.. rst-class:: classref-method
-:ref:`Mesh` **bake_mesh**\ (\ lod\: :ref:`int`, filter\: :ref:`HeightFilter`\ ) |const| :ref:`🔗`
+``Mesh`` **bake_mesh**\ (\ lod\: ``int``, filter\: :ref:`HeightFilter`\ ) |const| :ref:`🔗`
Generates a static ArrayMesh for the terrain.
@@ -705,7 +705,7 @@ Generates a static ArrayMesh for the terrain.
.. rst-class:: classref-method
-:ref:`PackedVector3Array` **generate_nav_mesh_source_geometry**\ (\ global_aabb\: :ref:`AABB`, require_nav\: :ref:`bool` = true\ ) |const| :ref:`🔗`
+``PackedVector3Array`` **generate_nav_mesh_source_geometry**\ (\ global_aabb\: ``AABB``, require_nav\: ``bool`` = true\ ) |const| :ref:`🔗`
Generates source geometry faces for input to nav mesh baking. Geometry is only generated where there are no holes and the terrain has been painted as navigable.
@@ -721,7 +721,7 @@ Generates source geometry faces for input to nav mesh baking. Geometry is only g
.. rst-class:: classref-method
-:ref:`Camera3D` **get_camera**\ (\ ) |const| :ref:`🔗`
+``Camera3D`` **get_camera**\ (\ ) |const| :ref:`🔗`
Returns the camera the terrain is currently snapping to.
@@ -733,7 +733,7 @@ Returns the camera the terrain is currently snapping to.
.. rst-class:: classref-method
-:ref:`RID` **get_collision_rid**\ (\ ) |const| :ref:`🔗`
+``RID`` **get_collision_rid**\ (\ ) |const| :ref:`🔗`
Returns the RID of the active StaticBody.
@@ -757,7 +757,7 @@ Returns the current Terrain3DEditor instance, if it has been set.
.. rst-class:: classref-method
-:ref:`Vector3` **get_intersection**\ (\ src_pos\: :ref:`Vector3`, direction\: :ref:`Vector3`, gpu_mode\: :ref:`bool` = false\ ) :ref:`🔗`
+``Vector3`` **get_intersection**\ (\ src_pos\: ``Vector3``, direction\: ``Vector3``, gpu_mode\: ``bool`` = false\ ) :ref:`🔗`
Casts a ray from ``src_pos`` pointing towards ``direction``, attempting to intersect the terrain. This operation is does not use physics, so enabling collision is unnecessary.
@@ -807,7 +807,7 @@ Possible return values:
.. rst-class:: classref-method
-:ref:`EditorPlugin