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` **get_plugin**\ (\ ) |const| :ref:`🔗` +``EditorPlugin`` **get_plugin**\ (\ ) |const| :ref:`🔗` Returns the EditorPlugin connected to Terrain3D. @@ -819,7 +819,7 @@ Returns the EditorPlugin connected to Terrain3D. .. rst-class:: classref-method -:ref:`bool` **is_compatibility_mode**\ (\ ) |const| :ref:`🔗` +``bool`` **is_compatibility_mode**\ (\ ) |const| :ref:`🔗` Returns true if Terrain3D has detected that the Compatibility renderer is in use. @@ -831,7 +831,7 @@ Returns true if Terrain3D has detected that the Compatibility renderer is in use .. rst-class:: classref-method -|void| **set_camera**\ (\ camera\: :ref:`Camera3D`\ ) :ref:`🔗` +|void| **set_camera**\ (\ camera\: ``Camera3D``\ ) :ref:`🔗` Sets the camera the terrain snaps to. @@ -855,7 +855,7 @@ Sets the current Terrain3DEditor instance. .. rst-class:: classref-method -|void| **set_plugin**\ (\ plugin\: :ref:`EditorPlugin`\ ) :ref:`🔗` +|void| **set_plugin**\ (\ plugin\: ``EditorPlugin``\ ) :ref:`🔗` Sets the EditorPlugin connected to Terrain3D. diff --git a/doc/api/class_terrain3dassets.rst b/doc/api/class_terrain3dassets.rst index 201c971b..7710adfc 100644 --- a/doc/api/class_terrain3dassets.rst +++ b/doc/api/class_terrain3dassets.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/Terrain3DAssets.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/Terrain3DAssets.xml. .. _class_Terrain3DAssets: Terrain3DAssets =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** ``Resource`` .. rst-class:: classref-introduction-group @@ -41,37 +41,37 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`create_mesh_thumbnails`\ (\ id\: :ref:`int` = -1, size\: :ref:`Vector2i` = Vector2i(128, 128)\ ) | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_albedo_array_rid`\ (\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Terrain3DMeshAsset` | :ref:`get_mesh_asset`\ (\ id\: :ref:`int`\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_mesh_count`\ (\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_normal_array_rid`\ (\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Terrain3DTextureAsset` | :ref:`get_texture`\ (\ id\: :ref:`int`\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedColorArray` | :ref:`get_texture_colors`\ (\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_texture_count`\ (\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`get_texture_detiles`\ (\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`get_texture_uv_scales`\ (\ ) |const| | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save`\ (\ path\: :ref:`String` = ""\ ) | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_mesh_asset`\ (\ id\: :ref:`int`, mesh\: :ref:`Terrain3DMeshAsset`\ ) | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_texture`\ (\ id\: :ref:`int`, texture\: :ref:`Terrain3DTextureAsset`\ ) | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`update_mesh_list`\ (\ ) | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`update_texture_list`\ (\ ) | - +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`create_mesh_thumbnails`\ (\ id\: ``int`` = -1, size\: ``Vector2i`` = Vector2i(128, 128)\ ) | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``RID`` | :ref:`get_albedo_array_rid`\ (\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Terrain3DMeshAsset` | :ref:`get_mesh_asset`\ (\ id\: ``int``\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_mesh_count`\ (\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``RID`` | :ref:`get_normal_array_rid`\ (\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Terrain3DTextureAsset` | :ref:`get_texture`\ (\ id\: ``int``\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``PackedColorArray`` | :ref:`get_texture_colors`\ (\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_texture_count`\ (\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``PackedFloat32Array`` | :ref:`get_texture_detiles`\ (\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``PackedFloat32Array`` | :ref:`get_texture_uv_scales`\ (\ ) |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Error | :ref:`save`\ (\ path\: ``String`` = ""\ ) | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_mesh_asset`\ (\ id\: ``int``, mesh\: :ref:`Terrain3DMeshAsset`\ ) | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_texture`\ (\ id\: ``int``, texture\: :ref:`Terrain3DTextureAsset`\ ) | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_mesh_list`\ (\ ) | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_texture_list`\ (\ ) | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -210,7 +210,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **create_mesh_thumbnails**\ (\ id\: :ref:`int` = -1, size\: :ref:`Vector2i` = Vector2i(128, 128)\ ) :ref:`🔗` +|void| **create_mesh_thumbnails**\ (\ id\: ``int`` = -1, size\: ``Vector2i`` = Vector2i(128, 128)\ ) :ref:`🔗` Generates mesh asset preview thumbnails for the asset dock, stored within each mesh asset. Specify id -1 to generate all. @@ -222,7 +222,7 @@ Generates mesh asset preview thumbnails for the asset dock, stored within each m .. rst-class:: classref-method -:ref:`RID` **get_albedo_array_rid**\ (\ ) |const| :ref:`🔗` +``RID`` **get_albedo_array_rid**\ (\ ) |const| :ref:`🔗` Returns the resource ID of the TextureArray generated from combining all albedo and height textures. @@ -234,7 +234,7 @@ Returns the resource ID of the TextureArray generated from combining all albedo .. rst-class:: classref-method -:ref:`Terrain3DMeshAsset` **get_mesh_asset**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` +:ref:`Terrain3DMeshAsset` **get_mesh_asset**\ (\ id\: ``int``\ ) |const| :ref:`🔗` Returns the specified Terrain3DMeshAsset resource. @@ -246,7 +246,7 @@ Returns the specified Terrain3DMeshAsset resource. .. rst-class:: classref-method -:ref:`int` **get_mesh_count**\ (\ ) |const| :ref:`🔗` +``int`` **get_mesh_count**\ (\ ) |const| :ref:`🔗` Returns the number of mesh assets in the list. @@ -258,7 +258,7 @@ Returns the number of mesh assets in the list. .. rst-class:: classref-method -:ref:`RID` **get_normal_array_rid**\ (\ ) |const| :ref:`🔗` +``RID`` **get_normal_array_rid**\ (\ ) |const| :ref:`🔗` Returns the resource ID of the TextureArray generated from combining all normal and roughness textures. @@ -270,7 +270,7 @@ Returns the resource ID of the TextureArray generated from combining all normal .. rst-class:: classref-method -:ref:`Terrain3DTextureAsset` **get_texture**\ (\ id\: :ref:`int`\ ) |const| :ref:`🔗` +:ref:`Terrain3DTextureAsset` **get_texture**\ (\ id\: ``int``\ ) |const| :ref:`🔗` Returns the Terrain3DTextureAsset with the requested ID. @@ -282,7 +282,7 @@ Returns the Terrain3DTextureAsset with the requested ID. .. rst-class:: classref-method -:ref:`PackedColorArray` **get_texture_colors**\ (\ ) |const| :ref:`🔗` +``PackedColorArray`` **get_texture_colors**\ (\ ) |const| :ref:`🔗` Returns the array of all albedo colors used in the texture assets, indexed by asset id. @@ -294,7 +294,7 @@ Returns the array of all albedo colors used in the texture assets, indexed by as .. rst-class:: classref-method -:ref:`int` **get_texture_count**\ (\ ) |const| :ref:`🔗` +``int`` **get_texture_count**\ (\ ) |const| :ref:`🔗` Returns the number of texture slots used. @@ -306,7 +306,7 @@ Returns the number of texture slots used. .. rst-class:: classref-method -:ref:`PackedFloat32Array` **get_texture_detiles**\ (\ ) |const| :ref:`🔗` +``PackedFloat32Array`` **get_texture_detiles**\ (\ ) |const| :ref:`🔗` Returns the array of all detiling values used in the texture assets, indexed by asset id. @@ -318,7 +318,7 @@ Returns the array of all detiling values used in the texture assets, indexed by .. rst-class:: classref-method -:ref:`PackedFloat32Array` **get_texture_uv_scales**\ (\ ) |const| :ref:`🔗` +``PackedFloat32Array`` **get_texture_uv_scales**\ (\ ) |const| :ref:`🔗` Returns the array of all uv scale values used in the texture assets, indexed by asset id. @@ -330,7 +330,7 @@ Returns the array of all uv scale values used in the texture assets, indexed by .. rst-class:: classref-method -:ref:`Error` **save**\ (\ path\: :ref:`String` = ""\ ) :ref:`🔗` +Error **save**\ (\ path\: ``String`` = ""\ ) :ref:`🔗` Saves this texture list resource to disk, if saved as an external ``.tres`` or ``.res`` resource file. @@ -344,7 +344,7 @@ path - specifies a directory and file name to use from now on. .. rst-class:: classref-method -|void| **set_mesh_asset**\ (\ id\: :ref:`int`, mesh\: :ref:`Terrain3DMeshAsset`\ ) :ref:`🔗` +|void| **set_mesh_asset**\ (\ id\: ``int``, mesh\: :ref:`Terrain3DMeshAsset`\ ) :ref:`🔗` Assigns the Terrain3DMeshAsset to the specified ID slot. It can be null to clear the slot. See :ref:`set_texture`. @@ -356,7 +356,7 @@ Assigns the Terrain3DMeshAsset to the specified ID slot. It can be null to clear .. rst-class:: classref-method -|void| **set_texture**\ (\ id\: :ref:`int`, texture\: :ref:`Terrain3DTextureAsset`\ ) :ref:`🔗` +|void| **set_texture**\ (\ id\: ``int``, texture\: :ref:`Terrain3DTextureAsset`\ ) :ref:`🔗` Adds a Terrain3DTextureAsset at the specified ID slot. The texture can be null to clear the slot, or remove it if its the last in the list. If the specified slot is full, it will be swapped with the source texture ID, or will find the next available ID. diff --git a/doc/api/class_terrain3ddata.rst b/doc/api/class_terrain3ddata.rst index 57c6e0dd..a040aa75 100644 --- a/doc/api/class_terrain3ddata.rst +++ b/doc/api/class_terrain3ddata.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/Terrain3DData.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/Terrain3DData.xml. .. _class_Terrain3DData: Terrain3DData ============= -**Inherits:** :ref:`Object` +**Inherits:** ``Object`` .. rst-class:: classref-introduction-group @@ -27,15 +27,15 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------+------------------------------------------------------------------------+--------+ - | :ref:`Array`\[:ref:`Image`\] | :ref:`color_maps` | ``[]`` | - +--------------------------------------------------------------+------------------------------------------------------------------------+--------+ - | :ref:`Array`\[:ref:`Image`\] | :ref:`control_maps` | ``[]`` | - +--------------------------------------------------------------+------------------------------------------------------------------------+--------+ - | :ref:`Array`\[:ref:`Image`\] | :ref:`height_maps` | ``[]`` | - +--------------------------------------------------------------+------------------------------------------------------------------------+--------+ - | :ref:`Array`\[:ref:`Vector2i`\] | :ref:`region_locations` | ``[]`` | - +--------------------------------------------------------------+------------------------------------------------------------------------+--------+ + +-------------------------------------------+------------------------------------------------------------------------+--------+ + | :ref:`Array`\[``Image``\] | :ref:`color_maps` | ``[]`` | + +-------------------------------------------+------------------------------------------------------------------------+--------+ + | :ref:`Array`\[``Image``\] | :ref:`control_maps` | ``[]`` | + +-------------------------------------------+------------------------------------------------------------------------+--------+ + | :ref:`Array`\[``Image``\] | :ref:`height_maps` | ``[]`` | + +-------------------------------------------+------------------------------------------------------------------------+--------+ + | :ref:`Array`\[``Vector2i``\] | :ref:`region_locations` | ``[]`` | + +-------------------------------------------+------------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group @@ -45,143 +45,143 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`add_region`\ (\ region\: :ref:`Terrain3DRegion`, update\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Terrain3DRegion` | :ref:`add_region_blank`\ (\ region_location\: :ref:`Vector2i`, update\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Terrain3DRegion` | :ref:`add_region_blankp`\ (\ global_position\: :ref:`Vector3`, update\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`calc_height_range`\ (\ recursive\: :ref:`bool` = false\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`change_region_size`\ (\ region_size\: :ref:`int`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`do_for_regions`\ (\ area\: :ref:`Rect2i`, callback\: :ref:`Callable`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`export_image`\ (\ file_name\: :ref:`String`, map_type\: :ref:`MapType`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`force_update_maps`\ (\ map_type\: :ref:`MapType` = 3, generate_mipmaps\: :ref:`bool` = false\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_color`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_color_maps_rid`\ (\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_control`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_control_angle`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_control_auto`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_control_base_id`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_control_blend`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_control_hole`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_control_maps_rid`\ (\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_control_navigation`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_control_overlay_id`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_control_scale`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_height`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_height_maps_rid`\ (\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_height_range`\ (\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Image`\] | :ref:`get_maps`\ (\ map_type\: :ref:`MapType`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_mesh_vertex`\ (\ lod\: :ref:`int`, filter\: :ref:`HeightFilter`, global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_normal`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_pixel`\ (\ map_type\: :ref:`MapType`, global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Terrain3DRegion` | :ref:`get_region`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_region_count`\ (\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_region_id`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_region_idp`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_region_location`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_region_map`\ (\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_region_map_index`\ (\ region_location\: :ref:`Vector2i`\ ) |static| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Terrain3DRegion` | :ref:`get_regionp`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Terrain3DRegion`\] | :ref:`get_regions_active`\ (\ copy\: :ref:`bool` = false, deep\: :ref:`bool` = false\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_regions_all`\ (\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_roughness`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_texture_id`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_region`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_regionp`\ (\ global_position\: :ref:`Vector3`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`import_images`\ (\ images\: :ref:`Array`\[:ref:`Image`\], global_position\: :ref:`Vector3` = Vector3(0, 0, 0), offset\: :ref:`float` = 0.0, scale\: :ref:`float` = 1.0\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_slope`\ (\ global_position\: :ref:`Vector3`, slope_range\: :ref:`Vector2`, invert\: :ref:`bool` = false\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_region_deleted`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_region_modified`\ (\ region_location\: :ref:`Vector2i`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`layered_to_image`\ (\ map_type\: :ref:`MapType`\ ) |const| | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`load_directory`\ (\ directory\: :ref:`String`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`load_region`\ (\ directory\: :ref:`Vector2i`, region_location\: :ref:`String`, update\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_region`\ (\ region\: :ref:`Terrain3DRegion`, update\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_regionl`\ (\ region_location\: :ref:`Vector2i`, update\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_regionp`\ (\ global_position\: :ref:`Vector3`, update\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`save_directory`\ (\ directory\: :ref:`String`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`save_region`\ (\ directory\: :ref:`Vector2i`, region_location\: :ref:`String`, 16_bit\: :ref:`bool` = false\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_color`\ (\ global_position\: :ref:`Vector3`, color\: :ref:`Color`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control`\ (\ global_position\: :ref:`Vector3`, control\: :ref:`int`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control_angle`\ (\ global_position\: :ref:`Vector3`, degrees\: :ref:`float`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control_auto`\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control_base_id`\ (\ global_position\: :ref:`Vector3`, texture_id\: :ref:`int`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control_blend`\ (\ global_position\: :ref:`Vector3`, blend_value\: :ref:`float`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control_hole`\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control_navigation`\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control_overlay_id`\ (\ global_position\: :ref:`Vector3`, texture_id\: :ref:`int`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_control_scale`\ (\ global_position\: :ref:`Vector3`, percentage_modifier\: :ref:`float`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_height`\ (\ global_position\: :ref:`Vector3`, height\: :ref:`float`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_pixel`\ (\ map_type\: :ref:`MapType`, global_position\: :ref:`Vector3`, pixel\: :ref:`Color`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_region_deleted`\ (\ region_location\: :ref:`Vector2i`, deleted\: :ref:`bool`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_region_modified`\ (\ region_location\: :ref:`Vector2i`, modified\: :ref:`bool`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_roughness`\ (\ global_position\: :ref:`Vector3`, roughness\: :ref:`float`\ ) | - +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Error | :ref:`add_region`\ (\ region\: :ref:`Terrain3DRegion`, update\: ``bool`` = true\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Terrain3DRegion` | :ref:`add_region_blank`\ (\ region_location\: ``Vector2i``, update\: ``bool`` = true\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Terrain3DRegion` | :ref:`add_region_blankp`\ (\ global_position\: ``Vector3``, update\: ``bool`` = true\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`calc_height_range`\ (\ recursive\: ``bool`` = false\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`change_region_size`\ (\ region_size\: ``int``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`do_for_regions`\ (\ area\: ``Rect2i``, callback\: ``Callable``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Error | :ref:`export_image`\ (\ file_name\: ``String``, map_type\: :ref:`MapType`\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_maps`\ (\ map_type\: :ref:`MapType` = 3, generate_mipmaps\: ``bool`` = false\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Color`` | :ref:`get_color`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``RID`` | :ref:`get_color_maps_rid`\ (\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_control`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``float`` | :ref:`get_control_angle`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`get_control_auto`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_control_base_id`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``float`` | :ref:`get_control_blend`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`get_control_hole`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``RID`` | :ref:`get_control_maps_rid`\ (\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`get_control_navigation`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_control_overlay_id`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``float`` | :ref:`get_control_scale`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``float`` | :ref:`get_height`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``RID`` | :ref:`get_height_maps_rid`\ (\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Vector2`` | :ref:`get_height_range`\ (\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[``Image``\] | :ref:`get_maps`\ (\ map_type\: :ref:`MapType`\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Vector3`` | :ref:`get_mesh_vertex`\ (\ lod\: ``int``, filter\: :ref:`HeightFilter`, global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Vector3`` | :ref:`get_normal`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Color`` | :ref:`get_pixel`\ (\ map_type\: :ref:`MapType`, global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Terrain3DRegion` | :ref:`get_region`\ (\ region_location\: ``Vector2i``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_region_count`\ (\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_region_id`\ (\ region_location\: ``Vector2i``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_region_idp`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Vector2i`` | :ref:`get_region_location`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``PackedInt32Array`` | :ref:`get_region_map`\ (\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_region_map_index`\ (\ region_location\: ``Vector2i``\ ) |static| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Terrain3DRegion` | :ref:`get_regionp`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Terrain3DRegion`\] | :ref:`get_regions_active`\ (\ copy\: ``bool`` = false, deep\: ``bool`` = false\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Dictionary`` | :ref:`get_regions_all`\ (\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``float`` | :ref:`get_roughness`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Vector3`` | :ref:`get_texture_id`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`has_region`\ (\ region_location\: ``Vector2i``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`has_regionp`\ (\ global_position\: ``Vector3``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`import_images`\ (\ images\: :ref:`Array`\[``Image``\], global_position\: ``Vector3`` = Vector3(0, 0, 0), offset\: ``float`` = 0.0, scale\: ``float`` = 1.0\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`is_in_slope`\ (\ global_position\: ``Vector3``, slope_range\: ``Vector2``, invert\: ``bool`` = false\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`is_region_deleted`\ (\ region_location\: ``Vector2i``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`is_region_modified`\ (\ region_location\: ``Vector2i``\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`layered_to_image`\ (\ map_type\: :ref:`MapType`\ ) |const| | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`load_directory`\ (\ directory\: ``String``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`load_region`\ (\ directory\: ``Vector2i``, region_location\: ``String``, update\: ``bool`` = true\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_region`\ (\ region\: :ref:`Terrain3DRegion`, update\: ``bool`` = true\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_regionl`\ (\ region_location\: ``Vector2i``, update\: ``bool`` = true\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_regionp`\ (\ global_position\: ``Vector3``, update\: ``bool`` = true\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_directory`\ (\ directory\: ``String``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_region`\ (\ directory\: ``Vector2i``, region_location\: ``String``, 16_bit\: ``bool`` = false\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_color`\ (\ global_position\: ``Vector3``, color\: ``Color``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control`\ (\ global_position\: ``Vector3``, control\: ``int``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_angle`\ (\ global_position\: ``Vector3``, degrees\: ``float``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_auto`\ (\ global_position\: ``Vector3``, enable\: ``bool``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_base_id`\ (\ global_position\: ``Vector3``, texture_id\: ``int``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_blend`\ (\ global_position\: ``Vector3``, blend_value\: ``float``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_hole`\ (\ global_position\: ``Vector3``, enable\: ``bool``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_navigation`\ (\ global_position\: ``Vector3``, enable\: ``bool``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_overlay_id`\ (\ global_position\: ``Vector3``, texture_id\: ``int``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_control_scale`\ (\ global_position\: ``Vector3``, percentage_modifier\: ``float``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_height`\ (\ global_position\: ``Vector3``, height\: ``float``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_pixel`\ (\ map_type\: :ref:`MapType`, global_position\: ``Vector3``, pixel\: ``Color``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_region_deleted`\ (\ region_location\: ``Vector2i``, deleted\: ``bool``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_region_modified`\ (\ region_location\: ``Vector2i``, modified\: ``bool``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_roughness`\ (\ global_position\: ``Vector3``, roughness\: ``float``\ ) | + +----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -244,7 +244,7 @@ Emitted when the region map or any map array has been regenerated. .. rst-class:: classref-signal -**maps_edited**\ (\ edited_area\: :ref:`AABB`\ ) :ref:`🔗` +**maps_edited**\ (\ edited_area\: ``AABB``\ ) :ref:`🔗` This signal is emitted whenever the editor (:ref:`Terrain3DEditor`) is used to: @@ -329,13 +329,13 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Array`\[:ref:`Image`\] **color_maps** = ``[]`` :ref:`🔗` +:ref:`Array`\[``Image``\] **color_maps** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Array`\[:ref:`Image`\] **get_color_maps**\ (\ ) +- :ref:`Array`\[``Image``\] **get_color_maps**\ (\ ) -An Array\ :ref:`Image` containing references to all of the color maps in all regions. See :ref:`Terrain3DRegion.color_map`. +An Array\ ``Image`` containing references to all of the color maps in all regions. See :ref:`Terrain3DRegion.color_map`. .. rst-class:: classref-item-separator @@ -345,13 +345,13 @@ An Array\ :ref:`Image` containing references to all of the color ma .. rst-class:: classref-property -:ref:`Array`\[:ref:`Image`\] **control_maps** = ``[]`` :ref:`🔗` +:ref:`Array`\[``Image``\] **control_maps** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Array`\[:ref:`Image`\] **get_control_maps**\ (\ ) +- :ref:`Array`\[``Image``\] **get_control_maps**\ (\ ) -An Array\ :ref:`Image` containing references to all of the control maps in all regions. See :ref:`Terrain3DRegion.control_map`. +An Array\ ``Image`` containing references to all of the control maps in all regions. See :ref:`Terrain3DRegion.control_map`. .. rst-class:: classref-item-separator @@ -361,13 +361,13 @@ An Array\ :ref:`Image` containing references to all of the control .. rst-class:: classref-property -:ref:`Array`\[:ref:`Image`\] **height_maps** = ``[]`` :ref:`🔗` +:ref:`Array`\[``Image``\] **height_maps** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget -- :ref:`Array`\[:ref:`Image`\] **get_height_maps**\ (\ ) +- :ref:`Array`\[``Image``\] **get_height_maps**\ (\ ) -An Array\ :ref:`Image` containing references to all of the height maps in all regions. See :ref:`Terrain3DRegion.height_map`. +An Array\ ``Image`` containing references to all of the height maps in all regions. See :ref:`Terrain3DRegion.height_map`. .. rst-class:: classref-item-separator @@ -377,12 +377,12 @@ An Array\ :ref:`Image` containing references to all of the height m .. rst-class:: classref-property -:ref:`Array`\[:ref:`Vector2i`\] **region_locations** = ``[]`` :ref:`🔗` +:ref:`Array`\[``Vector2i``\] **region_locations** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_region_locations**\ (\ value\: :ref:`Array`\[:ref:`Vector2i`\]\ ) -- :ref:`Array`\[:ref:`Vector2i`\] **get_region_locations**\ (\ ) +- |void| **set_region_locations**\ (\ value\: :ref:`Array`\[``Vector2i``\]\ ) +- :ref:`Array`\[``Vector2i``\] **get_region_locations**\ (\ ) The array of all active region locations; those not marked for deletion. @@ -399,7 +399,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`Error` **add_region**\ (\ region\: :ref:`Terrain3DRegion`, update\: :ref:`bool` = true\ ) :ref:`🔗` +Error **add_region**\ (\ region\: :ref:`Terrain3DRegion`, update\: ``bool`` = true\ ) :ref:`🔗` Adds a region for sculpting and painting. @@ -417,7 +417,7 @@ Upon saving, this region will be written to a data file stored in :ref:`Terrain3 .. rst-class:: classref-method -:ref:`Terrain3DRegion` **add_region_blank**\ (\ region_location\: :ref:`Vector2i`, update\: :ref:`bool` = true\ ) :ref:`🔗` +:ref:`Terrain3DRegion` **add_region_blank**\ (\ region_location\: ``Vector2i``, update\: ``bool`` = true\ ) :ref:`🔗` Creates and adds a blank region at the specified location. See :ref:`add_region`. @@ -429,7 +429,7 @@ Creates and adds a blank region at the specified location. See :ref:`add_region< .. rst-class:: classref-method -:ref:`Terrain3DRegion` **add_region_blankp**\ (\ global_position\: :ref:`Vector3`, update\: :ref:`bool` = true\ ) :ref:`🔗` +:ref:`Terrain3DRegion` **add_region_blankp**\ (\ global_position\: ``Vector3``, update\: ``bool`` = true\ ) :ref:`🔗` Creates and adds a blank region at a region location encompassing the specified global position. See :ref:`add_region`. @@ -441,7 +441,7 @@ Creates and adds a blank region at a region location encompassing the specified .. rst-class:: classref-method -|void| **calc_height_range**\ (\ recursive\: :ref:`bool` = false\ ) :ref:`🔗` +|void| **calc_height_range**\ (\ recursive\: ``bool`` = false\ ) :ref:`🔗` Recalculates the master height range for the whole terrain by summing the height ranges of all active regions. @@ -455,7 +455,7 @@ Recursive mode does the same, but has each region recalculate heights from each .. rst-class:: classref-method -|void| **change_region_size**\ (\ region_size\: :ref:`int`\ ) :ref:`🔗` +|void| **change_region_size**\ (\ region_size\: ``int``\ ) :ref:`🔗` Reslices terrain data to fit the new region size. This is a destructive process for which there is no undo. However Godot does make an undo entry, which will reslice in reverse. Files on disk are not added or removed until the scene is saved. @@ -467,7 +467,7 @@ Reslices terrain data to fit the new region size. This is a destructive process .. rst-class:: classref-method -|void| **do_for_regions**\ (\ area\: :ref:`Rect2i`, callback\: :ref:`Callable`\ ) :ref:`🔗` +|void| **do_for_regions**\ (\ area\: ``Rect2i``, callback\: ``Callable``\ ) :ref:`🔗` Calls the callback function for every region within the given area. If using vertex_spacing, area values should be descaled. @@ -483,7 +483,7 @@ You may wish to append .bind() to the callback to pass along variables. For inst .. rst-class:: classref-method -:ref:`Error` **export_image**\ (\ file_name\: :ref:`String`, map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` +Error **export_image**\ (\ file_name\: ``String``, map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` Exports the specified map type as one of r16/raw, exr, jpg, png, webp, res, tres. @@ -501,7 +501,7 @@ Res/tres stores in Godot's native data format. .. rst-class:: classref-method -|void| **force_update_maps**\ (\ map_type\: :ref:`MapType` = 3, generate_mipmaps\: :ref:`bool` = false\ ) :ref:`🔗` +|void| **force_update_maps**\ (\ map_type\: :ref:`MapType` = 3, generate_mipmaps\: ``bool`` = false\ ) :ref:`🔗` Regenerates the region map and TextureArrays that house the requested map types. Using the default :ref:`MapType` TYPE_MAX(3) will regenerate all map types. @@ -517,7 +517,7 @@ This function needs to be called after editing any of the maps. .. rst-class:: classref-method -:ref:`Color` **get_color**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``Color`` **get_color**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the associated pixel on the color map at the requested position. @@ -531,9 +531,9 @@ Returns ``Color(NAN, NAN, NAN, NAN)`` if the position is outside of defined regi .. rst-class:: classref-method -:ref:`RID` **get_color_maps_rid**\ (\ ) |const| :ref:`🔗` +``RID`` **get_color_maps_rid**\ (\ ) |const| :ref:`🔗` -Returns the resource ID of the generated height map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips <../docs/tips.html#using-the-generated-height-map-in-other-shaders>`__ for an example. +Returns the resource ID of the generated height map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips `__ for an example. .. rst-class:: classref-item-separator @@ -543,7 +543,7 @@ Returns the resource ID of the generated height map Texture Array sent to the sh .. rst-class:: classref-method -:ref:`int` **get_control**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``int`` **get_control**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the associated pixel on the control map at the requested position. @@ -557,7 +557,7 @@ Returns ``4,294,967,295`` aka ``UINT32_MAX`` if the position is outside of defin .. rst-class:: classref-method -:ref:`float` **get_control_angle**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``float`` **get_control_angle**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the angle, aka uv rotation, on the control map at the requested position. Values are fixed to 22.5 degree intervals, for a maximum of 16 angles. 360 / 16 = 22.5. @@ -571,7 +571,7 @@ Returns ``NAN`` if the position is outside of defined regions. .. rst-class:: classref-method -:ref:`bool` **get_control_auto**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``bool`` **get_control_auto**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns whether the autoshader is enabled on the control map at the requested position. @@ -585,7 +585,7 @@ Returns ``false`` if the position is outside of defined regions. .. rst-class:: classref-method -:ref:`int` **get_control_base_id**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``int`` **get_control_base_id**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the base texture ID on the control map at the requested position. Values are 0 - 31, which matches the ID of the texture asset in the asset dock. @@ -599,7 +599,7 @@ Returns ``4,294,967,295`` aka ``UINT32_MAX`` if the position is outside of defin .. rst-class:: classref-method -:ref:`float` **get_control_blend**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``float`` **get_control_blend**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the blend value between the base texture ID and the overlay texture ID. The value is clamped between 0.0 - 1.0 where 0.0 shows only the base texture, and 1.0 shows only the overlay texture. @@ -613,7 +613,7 @@ Returns ``NAN`` if the position is outside of defined regions. .. rst-class:: classref-method -:ref:`bool` **get_control_hole**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``bool`` **get_control_hole**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns whether there is a hole on the control map at the requested position. @@ -627,9 +627,9 @@ Returns ``false`` if the position is outside of defined regions. .. rst-class:: classref-method -:ref:`RID` **get_control_maps_rid**\ (\ ) |const| :ref:`🔗` +``RID`` **get_control_maps_rid**\ (\ ) |const| :ref:`🔗` -Returns the resource ID of the generated control map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips <../docs/tips.html#using-the-generated-height-map-in-other-shaders>`__ for an example. +Returns the resource ID of the generated control map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips `__ for an example. .. rst-class:: classref-item-separator @@ -639,7 +639,7 @@ Returns the resource ID of the generated control map Texture Array sent to the s .. rst-class:: classref-method -:ref:`bool` **get_control_navigation**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``bool`` **get_control_navigation**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns whether navigation is enabled on the control map at the requested position. @@ -653,7 +653,7 @@ Returns ``false`` if the position is outside of defined regions. .. rst-class:: classref-method -:ref:`int` **get_control_overlay_id**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``int`` **get_control_overlay_id**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the overlay texture ID on the control map at the requested position. Values are 0 - 31, which matches the ID of the texture asset in the asset dock. @@ -667,7 +667,7 @@ Returns ``4,294,967,295`` aka ``UINT32_MAX`` if the position is outside of defin .. rst-class:: classref-method -:ref:`float` **get_control_scale**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``float`` **get_control_scale**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the uv scale on the control map at the requested position. The value is rounded to the nearest 20% difference from 100%, ranging between -60% to +80%. Eg. +20% or -40%. @@ -681,7 +681,7 @@ Returns ``NAN`` if the position is outside of defined regions. .. rst-class:: classref-method -:ref:`float` **get_height**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``float`` **get_height**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the height at the requested position. If the position is close to a vertex, the pixel height on the heightmap is returned. Otherwise the value is interpolated from the 4 vertices surrounding the position. @@ -695,9 +695,9 @@ Returns ``NAN`` if the requested position is a hole or outside of defined region .. rst-class:: classref-method -:ref:`RID` **get_height_maps_rid**\ (\ ) |const| :ref:`🔗` +``RID`` **get_height_maps_rid**\ (\ ) |const| :ref:`🔗` -Returns the resource ID of the generated height map texture array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips <../docs/tips.html#using-the-generated-height-map-in-other-shaders>`__ for an example. +Returns the resource ID of the generated height map texture array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See `Tips `__ for an example. .. rst-class:: classref-item-separator @@ -707,7 +707,7 @@ Returns the resource ID of the generated height map texture array sent to the sh .. rst-class:: classref-method -:ref:`Vector2` **get_height_range**\ (\ ) |const| :ref:`🔗` +``Vector2`` **get_height_range**\ (\ ) |const| :ref:`🔗` Returns the highest and lowest heights for the sculpted terrain used to set the world AABB. See :ref:`calc_height_range`. @@ -721,7 +721,7 @@ Any :ref:`Terrain3DMaterial.world_background`\[:ref:`Image`\] **get_maps**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` +:ref:`Array`\[``Image``\] **get_maps**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` Returns an Array of Images from all regions of the specified map type. @@ -733,7 +733,7 @@ Returns an Array of Images from all regions of the specified map type. .. rst-class:: classref-method -:ref:`Vector3` **get_mesh_vertex**\ (\ lod\: :ref:`int`, filter\: :ref:`HeightFilter`, global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``Vector3`` **get_mesh_vertex**\ (\ lod\: ``int``, filter\: :ref:`HeightFilter`, global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the position of a terrain vertex at a certain LOD. If the position is outside of defined regions or there is a hole, it returns ``NAN`` in the vector's Y coordinate. @@ -751,7 +751,7 @@ Returns the position of a terrain vertex at a certain LOD. If the position is ou .. rst-class:: classref-method -:ref:`Vector3` **get_normal**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``Vector3`` **get_normal**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the terrain normal at the specified position. This function uses :ref:`get_height`. @@ -765,7 +765,7 @@ Returns ``Vector3(NAN, NAN, NAN)`` if the requested position is a hole or outsid .. rst-class:: classref-method -:ref:`Color` **get_pixel**\ (\ map_type\: :ref:`MapType`, global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``Color`` **get_pixel**\ (\ map_type\: :ref:`MapType`, global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the pixel for the map type associated with the specified position. @@ -779,7 +779,7 @@ Returns ``Color(NAN, NAN, NAN, NAN)`` if the position is outside of defined regi .. rst-class:: classref-method -:ref:`Terrain3DRegion` **get_region**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` +:ref:`Terrain3DRegion` **get_region**\ (\ region_location\: ``Vector2i``\ ) |const| :ref:`🔗` Return the :ref:`Terrain3DRegion` at the specified location. This will return inactive regions marked for deletion. Check with :ref:`Terrain3DRegion.deleted`. @@ -791,7 +791,7 @@ Return the :ref:`Terrain3DRegion` at the specified locati .. rst-class:: classref-method -:ref:`int` **get_region_count**\ (\ ) |const| :ref:`🔗` +``int`` **get_region_count**\ (\ ) |const| :ref:`🔗` Returns the number of active regions; those not marked for deletion. @@ -803,7 +803,7 @@ Returns the number of active regions; those not marked for deletion. .. rst-class:: classref-method -:ref:`int` **get_region_id**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` +``int`` **get_region_id**\ (\ region_location\: ``Vector2i``\ ) |const| :ref:`🔗` Returns -1 if no region or out of bounds at the given location, otherwise returns the current region id. @@ -817,7 +817,7 @@ The region_id is the index into the TextureArrays sent to the shader, and can ch .. rst-class:: classref-method -:ref:`int` **get_region_idp**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``int`` **get_region_idp**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the region id at a global position. See :ref:`get_region_id`. @@ -829,7 +829,7 @@ Returns the region id at a global position. See :ref:`get_region_id` **get_region_location**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``Vector2i`` **get_region_location**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the calculated region location for the given global position. This is just a calculation and does no bounds checking or verification that a region exists. See :ref:`get_region_map_index` for bounds checking, or :ref:`has_region` for checking existance. @@ -841,7 +841,7 @@ Returns the calculated region location for the given global position. This is ju .. rst-class:: classref-method -:ref:`PackedInt32Array` **get_region_map**\ (\ ) |const| :ref:`🔗` +``PackedInt32Array`` **get_region_map**\ (\ ) |const| :ref:`🔗` Returns a fully populated 32 x 32 array. The array location contains the region id + 1, or 0, which means no region. @@ -855,7 +855,7 @@ See :ref:`get_region_map_index` .. rst-class:: classref-method -:ref:`int` **get_region_map_index**\ (\ region_location\: :ref:`Vector2i`\ ) |static| :ref:`🔗` +``int`` **get_region_map_index**\ (\ region_location\: ``Vector2i``\ ) |static| :ref:`🔗` Given a region location, returns the index into the region map array. See :ref:`get_region_map`. @@ -869,7 +869,7 @@ You can use this function to quickly determine if a location is within the great .. rst-class:: classref-method -:ref:`Terrain3DRegion` **get_regionp**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +:ref:`Terrain3DRegion` **get_regionp**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the region at the specified global position. This will return inactive regions marked for deletion. Check with :ref:`Terrain3DRegion.deleted`. @@ -881,7 +881,7 @@ Returns the region at the specified global position. This will return inactive r .. rst-class:: classref-method -:ref:`Array`\[:ref:`Terrain3DRegion`\] **get_regions_active**\ (\ copy\: :ref:`bool` = false, deep\: :ref:`bool` = false\ ) |const| :ref:`🔗` +:ref:`Array`\[:ref:`Terrain3DRegion`\] **get_regions_active**\ (\ copy\: ``bool`` = false, deep\: ``bool`` = false\ ) |const| :ref:`🔗` Returns an array of active regions not marked for deletion. Each region knows its own location. See :ref:`Terrain3DRegion.location`. @@ -897,7 +897,7 @@ Returns an array of active regions not marked for deletion. Each region knows it .. rst-class:: classref-method -:ref:`Dictionary` **get_regions_all**\ (\ ) |const| :ref:`🔗` +``Dictionary`` **get_regions_all**\ (\ ) |const| :ref:`🔗` Returns all regions in a dictionary indexed by region location. Some regions may be marked for deletion. @@ -909,7 +909,7 @@ Returns all regions in a dictionary indexed by region location. Some regions may .. rst-class:: classref-method -:ref:`float` **get_roughness**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``float`` **get_roughness**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns the roughness modifier (wetness) on the color map alpha channel associated with the specified position. @@ -923,7 +923,7 @@ Returns ``Color(NAN, NAN, NAN, NAN)`` if the position is outside of defined regi .. rst-class:: classref-method -:ref:`Vector3` **get_texture_id**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``Vector3`` **get_texture_id**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns ``Vector3(base texture id, overlay id, blend value)``. @@ -943,7 +943,7 @@ Observing how this is done in The Witcher 3, there are only about 6 sounds used .. rst-class:: classref-method -:ref:`bool` **has_region**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` +``bool`` **has_region**\ (\ region_location\: ``Vector2i``\ ) |const| :ref:`🔗` Returns true if the specified region location has an active region. @@ -955,7 +955,7 @@ Returns true if the specified region location has an active region. .. rst-class:: classref-method -:ref:`bool` **has_regionp**\ (\ global_position\: :ref:`Vector3`\ ) |const| :ref:`🔗` +``bool`` **has_regionp**\ (\ global_position\: ``Vector3``\ ) |const| :ref:`🔗` Returns true if the specified global position has an active region. @@ -967,7 +967,7 @@ Returns true if the specified global position has an active region. .. rst-class:: classref-method -|void| **import_images**\ (\ images\: :ref:`Array`\[:ref:`Image`\], global_position\: :ref:`Vector3` = Vector3(0, 0, 0), offset\: :ref:`float` = 0.0, scale\: :ref:`float` = 1.0\ ) :ref:`🔗` +|void| **import_images**\ (\ images\: :ref:`Array`\[``Image``\], global_position\: ``Vector3`` = Vector3(0, 0, 0), offset\: ``float`` = 0.0, scale\: ``float`` = 1.0\ ) :ref:`🔗` Imports an Image set (Height, Control, Color) into this resource. It does NOT normalize values to 0-1. You must do that using get_min_max() and adjusting scale and offset. @@ -987,7 +987,7 @@ Imports an Image set (Height, Control, Color) into this resource. It does NOT no .. rst-class:: classref-method -:ref:`bool` **is_in_slope**\ (\ global_position\: :ref:`Vector3`, slope_range\: :ref:`Vector2`, invert\: :ref:`bool` = false\ ) |const| :ref:`🔗` +``bool`` **is_in_slope**\ (\ global_position\: ``Vector3``, slope_range\: ``Vector2``, invert\: ``bool`` = false\ ) |const| :ref:`🔗` Returns true if the slope of the terrain at the given position is within the slope range. If invert is true, it returns true if the position is outside the given range. @@ -999,7 +999,7 @@ Returns true if the slope of the terrain at the given position is within the slo .. rst-class:: classref-method -:ref:`bool` **is_region_deleted**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` +``bool`` **is_region_deleted**\ (\ region_location\: ``Vector2i``\ ) |const| :ref:`🔗` Returns true if the region at the location exists and is marked as deleted. Syntactic sugar for :ref:`Terrain3DRegion.deleted`. @@ -1011,7 +1011,7 @@ Returns true if the region at the location exists and is marked as deleted. Syn .. rst-class:: classref-method -:ref:`bool` **is_region_modified**\ (\ region_location\: :ref:`Vector2i`\ ) |const| :ref:`🔗` +``bool`` **is_region_modified**\ (\ region_location\: ``Vector2i``\ ) |const| :ref:`🔗` Returns true if the region at the location exists and is marked as modified. Syntactic sugar for :ref:`Terrain3DRegion.modified`. @@ -1023,7 +1023,7 @@ Returns true if the region at the location exists and is marked as modified. Syn .. rst-class:: classref-method -:ref:`Image` **layered_to_image**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` +``Image`` **layered_to_image**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` Returns an Image of the given map type that contains all regions in one large image. If the world has multiple islands, this function will return an image large enough to encompass all used regions, with black areas in between the islands. @@ -1035,7 +1035,7 @@ Returns an Image of the given map type that contains all regions in one large im .. rst-class:: classref-method -|void| **load_directory**\ (\ directory\: :ref:`String`\ ) :ref:`🔗` +|void| **load_directory**\ (\ directory\: ``String``\ ) :ref:`🔗` Loads all of the Terrain3DRegion files found in the specified directory. Then it rebuilds all map arrays. @@ -1047,7 +1047,7 @@ Loads all of the Terrain3DRegion files found in the specified directory. Then it .. rst-class:: classref-method -|void| **load_region**\ (\ directory\: :ref:`Vector2i`, region_location\: :ref:`String`, update\: :ref:`bool` = true\ ) :ref:`🔗` +|void| **load_region**\ (\ directory\: ``Vector2i``, region_location\: ``String``, update\: ``bool`` = true\ ) :ref:`🔗` Loads the specified region location file. @@ -1061,7 +1061,7 @@ Loads the specified region location file. .. rst-class:: classref-method -|void| **remove_region**\ (\ region\: :ref:`Terrain3DRegion`, update\: :ref:`bool` = true\ ) :ref:`🔗` +|void| **remove_region**\ (\ region\: :ref:`Terrain3DRegion`, update\: ``bool`` = true\ ) :ref:`🔗` Marks the specified region as deleted. This deactivates it so it won't render it on screen once maps are updated, unless marked not deleted. The file will be deleted from disk upon saving. @@ -1073,7 +1073,7 @@ Marks the specified region as deleted. This deactivates it so it won't render it .. rst-class:: classref-method -|void| **remove_regionl**\ (\ region_location\: :ref:`Vector2i`, update\: :ref:`bool` = true\ ) :ref:`🔗` +|void| **remove_regionl**\ (\ region_location\: ``Vector2i``, update\: ``bool`` = true\ ) :ref:`🔗` Removes the region at the specified location. See :ref:`remove_region`. @@ -1085,7 +1085,7 @@ Removes the region at the specified location. See :ref:`remove_region`, update\: :ref:`bool` = true\ ) :ref:`🔗` +|void| **remove_regionp**\ (\ global_position\: ``Vector3``, update\: ``bool`` = true\ ) :ref:`🔗` Removes the region at the specified global_position. See :ref:`remove_region`. @@ -1097,7 +1097,7 @@ Removes the region at the specified global_position. See :ref:`remove_region`\ ) :ref:`🔗` +|void| **save_directory**\ (\ directory\: ``String``\ ) :ref:`🔗` This saves all active regions into the specified directory. @@ -1109,7 +1109,7 @@ This saves all active regions into the specified directory. .. rst-class:: classref-method -|void| **save_region**\ (\ directory\: :ref:`Vector2i`, region_location\: :ref:`String`, 16_bit\: :ref:`bool` = false\ ) :ref:`🔗` +|void| **save_region**\ (\ directory\: ``Vector2i``, region_location\: ``String``, 16_bit\: ``bool`` = false\ ) :ref:`🔗` Saves the specified active region to the directory. See :ref:`Terrain3DRegion.save`. @@ -1125,7 +1125,7 @@ Saves the specified active region to the directory. See :ref:`Terrain3DRegion.sa .. rst-class:: classref-method -|void| **set_color**\ (\ global_position\: :ref:`Vector3`, color\: :ref:`Color`\ ) :ref:`🔗` +|void| **set_color**\ (\ global_position\: ``Vector3``, color\: ``Color``\ ) :ref:`🔗` Sets the color on the color map pixel associated with the specified position. See :ref:`set_pixel` for important information. @@ -1137,7 +1137,7 @@ Sets the color on the color map pixel associated with the specified position. Se .. rst-class:: classref-method -|void| **set_control**\ (\ global_position\: :ref:`Vector3`, control\: :ref:`int`\ ) :ref:`🔗` +|void| **set_control**\ (\ global_position\: ``Vector3``, control\: ``int``\ ) :ref:`🔗` Sets the value on the control map pixel associated with the specified position. See :ref:`set_pixel` for important information. @@ -1149,7 +1149,7 @@ Sets the value on the control map pixel associated with the specified position. .. rst-class:: classref-method -|void| **set_control_angle**\ (\ global_position\: :ref:`Vector3`, degrees\: :ref:`float`\ ) :ref:`🔗` +|void| **set_control_angle**\ (\ global_position\: ``Vector3``, degrees\: ``float``\ ) :ref:`🔗` Sets the angle, aka uv rotation, on the control map at the requested position. Values are rounded to the nearest 22.5 degree interval, for a maximum of 16 angles. 360 / 16 = 22.5. @@ -1163,7 +1163,7 @@ See :ref:`set_pixel` for important informa .. rst-class:: classref-method -|void| **set_control_auto**\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) :ref:`🔗` +|void| **set_control_auto**\ (\ global_position\: ``Vector3``, enable\: ``bool``\ ) :ref:`🔗` Sets if the material should render the autoshader or manual texturing on the control map at the requested position. @@ -1177,7 +1177,7 @@ See :ref:`set_pixel` for important informa .. rst-class:: classref-method -|void| **set_control_base_id**\ (\ global_position\: :ref:`Vector3`, texture_id\: :ref:`int`\ ) :ref:`🔗` +|void| **set_control_base_id**\ (\ global_position\: ``Vector3``, texture_id\: ``int``\ ) :ref:`🔗` Sets the base texture ID on the control map at the requested position. Values are clamped to 0 - 31, matching the ID of the texture asset in the asset dock. @@ -1191,7 +1191,7 @@ See :ref:`set_pixel` for important informa .. rst-class:: classref-method -|void| **set_control_blend**\ (\ global_position\: :ref:`Vector3`, blend_value\: :ref:`float`\ ) :ref:`🔗` +|void| **set_control_blend**\ (\ global_position\: ``Vector3``, blend_value\: ``float``\ ) :ref:`🔗` Sets the blend value between the base texture ID, and the overlay texture ID. The value is clamped between 0.0 - 1.0 where 0.0 shows only the base texture, and 1.0 shows only the overlay texture. @@ -1205,7 +1205,7 @@ See :ref:`set_pixel` for important informa .. rst-class:: classref-method -|void| **set_control_hole**\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) :ref:`🔗` +|void| **set_control_hole**\ (\ global_position\: ``Vector3``, enable\: ``bool``\ ) :ref:`🔗` Sets if a hole should be rendered on the control map at the requested position. See :ref:`set_pixel` for important information. @@ -1217,7 +1217,7 @@ Sets if a hole should be rendered on the control map at the requested position. .. rst-class:: classref-method -|void| **set_control_navigation**\ (\ global_position\: :ref:`Vector3`, enable\: :ref:`bool`\ ) :ref:`🔗` +|void| **set_control_navigation**\ (\ global_position\: ``Vector3``, enable\: ``bool``\ ) :ref:`🔗` Sets if navigation generation is enabled on the control map at the requested position. See :ref:`set_pixel` for important information. @@ -1229,7 +1229,7 @@ Sets if navigation generation is enabled on the control map at the requested pos .. rst-class:: classref-method -|void| **set_control_overlay_id**\ (\ global_position\: :ref:`Vector3`, texture_id\: :ref:`int`\ ) :ref:`🔗` +|void| **set_control_overlay_id**\ (\ global_position\: ``Vector3``, texture_id\: ``int``\ ) :ref:`🔗` Sets the overlay texture ID on the control map at the requested position. Values are clamped to 0 - 31, matching the ID of the texture asset in the asset dock. @@ -1243,7 +1243,7 @@ See :ref:`set_pixel` for important informa .. rst-class:: classref-method -|void| **set_control_scale**\ (\ global_position\: :ref:`Vector3`, percentage_modifier\: :ref:`float`\ ) :ref:`🔗` +|void| **set_control_scale**\ (\ global_position\: ``Vector3``, percentage_modifier\: ``float``\ ) :ref:`🔗` Sets the uv scale on the control map at the requested position. The value is rounded to the nearest 20% difference from 100%, ranging between -60% to +80%. @@ -1257,7 +1257,7 @@ See :ref:`set_pixel` for important informa .. rst-class:: classref-method -|void| **set_height**\ (\ global_position\: :ref:`Vector3`, height\: :ref:`float`\ ) :ref:`🔗` +|void| **set_height**\ (\ global_position\: ``Vector3``, height\: ``float``\ ) :ref:`🔗` Sets the height value on the heightmap pixel associated with the specified position. See :ref:`set_pixel` for important information. @@ -1271,7 +1271,7 @@ Unlike :ref:`get_height`, which interpola .. rst-class:: classref-method -|void| **set_pixel**\ (\ map_type\: :ref:`MapType`, global_position\: :ref:`Vector3`, pixel\: :ref:`Color`\ ) :ref:`🔗` +|void| **set_pixel**\ (\ map_type\: :ref:`MapType`, global_position\: ``Vector3``, pixel\: ``Color``\ ) :ref:`🔗` Sets the pixel for the map type associated with the specified position. This method is fine for setting a few pixels, but if you wish to modify thousands of pixels quickly, you should get the region and use :ref:`Terrain3DRegion.get_map`, then edit the images directly. @@ -1285,7 +1285,7 @@ After setting pixels you need to call :ref:`force_update_maps`, deleted\: :ref:`bool`\ ) :ref:`🔗` +|void| **set_region_deleted**\ (\ region_location\: ``Vector2i``, deleted\: ``bool``\ ) :ref:`🔗` Marks a region as deleted. It will stop displaying when maps are updated. The file will be removed on save. @@ -1297,7 +1297,7 @@ Marks a region as deleted. It will stop displaying when maps are updated. The fi .. rst-class:: classref-method -|void| **set_region_modified**\ (\ region_location\: :ref:`Vector2i`, modified\: :ref:`bool`\ ) :ref:`🔗` +|void| **set_region_modified**\ (\ region_location\: ``Vector2i``, modified\: ``bool``\ ) :ref:`🔗` Sets the region as modified. It will be written to disk when saved. Syntactic sugar for :ref:`Terrain3DRegion.modified`. @@ -1309,7 +1309,7 @@ Sets the region as modified. It will be written to disk when saved. Syntactic su .. rst-class:: classref-method -|void| **set_roughness**\ (\ global_position\: :ref:`Vector3`, roughness\: :ref:`float`\ ) :ref:`🔗` +|void| **set_roughness**\ (\ global_position\: ``Vector3``, roughness\: ``float``\ ) :ref:`🔗` Sets the roughness modifier (wetness) on the color map alpha channel associated with the specified position. See :ref:`set_pixel` for important information. diff --git a/doc/api/class_terrain3deditor.rst b/doc/api/class_terrain3deditor.rst index 4bb197a8..563dfe5b 100644 --- a/doc/api/class_terrain3deditor.rst +++ b/doc/api/class_terrain3deditor.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/Terrain3DEditor.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/Terrain3DEditor.xml. .. _class_Terrain3DEditor: Terrain3DEditor =============== -**Inherits:** :ref:`Object` +**Inherits:** ``Object`` .. rst-class:: classref-introduction-group @@ -27,33 +27,33 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`apply_undo`\ (\ data\: :ref:`Dictionary`\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`backup_region`\ (\ region\: :ref:`Terrain3DRegion`\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Operation` | :ref:`get_operation`\ (\ ) |const| | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Terrain3D` | :ref:`get_terrain`\ (\ ) |const| | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Tool` | :ref:`get_tool`\ (\ ) |const| | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_operating`\ (\ ) |const| | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`operate`\ (\ position\: :ref:`Vector3`, camera_direction\: :ref:`float`\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_brush_data`\ (\ data\: :ref:`Dictionary`\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_operation`\ (\ operation\: :ref:`Operation`\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_terrain`\ (\ terrain\: :ref:`Terrain3D`\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_tool`\ (\ tool\: :ref:`Tool`\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`start_operation`\ (\ position\: :ref:`Vector3`\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`stop_operation`\ (\ ) | - +--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`apply_undo`\ (\ data\: ``Dictionary``\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`backup_region`\ (\ region\: :ref:`Terrain3DRegion`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Operation` | :ref:`get_operation`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Terrain3D` | :ref:`get_terrain`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Tool` | :ref:`get_tool`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`is_operating`\ (\ ) |const| | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`operate`\ (\ position\: ``Vector3``, camera_direction\: ``float``\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_brush_data`\ (\ data\: ``Dictionary``\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_operation`\ (\ operation\: :ref:`Operation`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_terrain`\ (\ terrain\: :ref:`Terrain3D`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_tool`\ (\ tool\: :ref:`Tool`\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start_operation`\ (\ position\: ``Vector3``\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_operation`\ (\ ) | + +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -249,7 +249,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **apply_undo**\ (\ data\: :ref:`Dictionary`\ ) :ref:`🔗` +|void| **apply_undo**\ (\ data\: ``Dictionary``\ ) :ref:`🔗` Undo the previous changes, with the provided data. Used by Godot, not gamedevs. @@ -309,7 +309,7 @@ Returns the current tool selected in the editor plugin. .. rst-class:: classref-method -:ref:`bool` **is_operating**\ (\ ) |const| :ref:`🔗` +``bool`` **is_operating**\ (\ ) |const| :ref:`🔗` Returns true if currently in the middle of a brushing operation. @@ -321,7 +321,7 @@ Returns true if currently in the middle of a brushing operation. .. rst-class:: classref-method -|void| **operate**\ (\ position\: :ref:`Vector3`, camera_direction\: :ref:`float`\ ) :ref:`🔗` +|void| **operate**\ (\ position\: ``Vector3``, camera_direction\: ``float``\ ) :ref:`🔗` Start brushing. @@ -333,7 +333,7 @@ Start brushing. .. rst-class:: classref-method -|void| **set_brush_data**\ (\ data\: :ref:`Dictionary`\ ) :ref:`🔗` +|void| **set_brush_data**\ (\ data\: ``Dictionary``\ ) :ref:`🔗` Sets all brush settings used in the editor plugin. @@ -381,7 +381,7 @@ Sets the tool selected in the editor plugin. .. rst-class:: classref-method -|void| **start_operation**\ (\ position\: :ref:`Vector3`\ ) :ref:`🔗` +|void| **start_operation**\ (\ position\: ``Vector3``\ ) :ref:`🔗` Begin a sculpting or painting operation. diff --git a/doc/api/class_terrain3dinstancer.rst b/doc/api/class_terrain3dinstancer.rst index 175d5190..a03d57c4 100644 --- a/doc/api/class_terrain3dinstancer.rst +++ b/doc/api/class_terrain3dinstancer.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/Terrain3DInstancer.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/Terrain3DInstancer.xml. .. _class_Terrain3DInstancer: Terrain3DInstancer ================== -**Inherits:** :ref:`Object` +**Inherits:** ``Object`` .. rst-class:: classref-introduction-group @@ -47,35 +47,35 @@ Methods .. table:: :widths: auto - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_instances`\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_multimesh`\ (\ mesh_id\: :ref:`int`, multimesh\: :ref:`MultiMesh`, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: :ref:`bool` = true\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_transforms`\ (\ mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray` = PackedColorArray(), update\: :ref:`bool` = true\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`append_location`\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`append_region`\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_by_location`\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_by_mesh`\ (\ mesh_id\: :ref:`int`\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear_by_region`\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`dump_data`\ (\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`dump_mmis`\ (\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`force_update_mmis`\ (\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_instances`\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`swap_ids`\ (\ src_id\: :ref:`int`, dest_id\: :ref:`int`\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`update_transforms`\ (\ aabb\: :ref:`AABB`\ ) | - +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_instances`\ (\ global_position\: ``Vector3``, params\: ``Dictionary``\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_multimesh`\ (\ mesh_id\: ``int``, multimesh\: ``MultiMesh``, transform\: ``Transform3D`` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: ``bool`` = true\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_transforms`\ (\ mesh_id\: ``int``, transforms\: :ref:`Array`\[``Transform3D``\], colors\: ``PackedColorArray`` = PackedColorArray(), update\: ``bool`` = true\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_location`\ (\ region_location\: ``Vector2i``, mesh_id\: ``int``, transforms\: :ref:`Array`\[``Transform3D``\], colors\: ``PackedColorArray``, update\: ``bool`` = true\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`append_region`\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: ``int``, transforms\: :ref:`Array`\[``Transform3D``\], colors\: ``PackedColorArray``, update\: ``bool`` = true\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_by_location`\ (\ region_location\: ``Vector2i``, mesh_id\: ``int``\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_by_mesh`\ (\ mesh_id\: ``int``\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_by_region`\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: ``int``\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`dump_data`\ (\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`dump_mmis`\ (\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_mmis`\ (\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_instances`\ (\ global_position\: ``Vector3``, params\: ``Dictionary``\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`swap_ids`\ (\ src_id\: ``int``, dest_id\: ``int``\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_transforms`\ (\ aabb\: ``AABB``\ ) | + +--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -90,7 +90,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **add_instances**\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) :ref:`🔗` +|void| **add_instances**\ (\ global_position\: ``Vector3``, params\: ``Dictionary``\ ) :ref:`🔗` Used by Terrain3DEditor to place instances given many brush parameters. In addition to the brush position, it also uses the following parameters: asset_id, size, strength, fixed_scale, random_scale, fixed_spin, random_spin, fixed_tilt, random_tilt, align_to_normal, height_offset, random_height, vertex_color, random_hue, random_darken. All of these settings are set in the editor through tool_settings.gd. @@ -102,7 +102,7 @@ Used by Terrain3DEditor to place instances given many brush parameters. In addit .. rst-class:: classref-method -|void| **add_multimesh**\ (\ mesh_id\: :ref:`int`, multimesh\: :ref:`MultiMesh`, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: :ref:`bool` = true\ ) :ref:`🔗` +|void| **add_multimesh**\ (\ mesh_id\: ``int``, multimesh\: ``MultiMesh``, transform\: ``Transform3D`` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), update\: ``bool`` = true\ ) :ref:`🔗` Allows procedural placement of meshes, or importing from another MultiMeshInstancer placement tool. The specified mesh_id should already be setup as a :ref:`Terrain3DMeshAsset` in the asset dock. This function extracts the instance transforms and colors from a multimesh and passes it to :ref:`add_transforms`. @@ -116,7 +116,7 @@ Update will regenerate the MultiMeshInstances. Disable for bulk adding, then cal .. rst-class:: classref-method -|void| **add_transforms**\ (\ mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray` = PackedColorArray(), update\: :ref:`bool` = true\ ) :ref:`🔗` +|void| **add_transforms**\ (\ mesh_id\: ``int``, transforms\: :ref:`Array`\[``Transform3D``\], colors\: ``PackedColorArray`` = PackedColorArray(), update\: ``bool`` = true\ ) :ref:`🔗` Allows procedural placement of meshes. The mesh_id should already be setup as a :ref:`Terrain3DMeshAsset` in the asset dock. You provide the array of Transform3Ds and optional Colors, which will be parsed into our data storage. @@ -132,7 +132,7 @@ Update will regenerate the MultiMeshInstances. Disable for bulk adding, then cal .. rst-class:: classref-method -|void| **append_location**\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) :ref:`🔗` +|void| **append_location**\ (\ region_location\: ``Vector2i``, mesh_id\: ``int``, transforms\: :ref:`Array`\[``Transform3D``\], colors\: ``PackedColorArray``, update\: ``bool`` = true\ ) :ref:`🔗` Appends new transforms to the existing data within a region location. The mesh_id should already be setup as a :ref:`Terrain3DMeshAsset` in the asset dock. @@ -146,7 +146,7 @@ Update will regenerate the MultiMeshInstances. Disable for bulk adding, then cal .. rst-class:: classref-method -|void| **append_region**\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`, transforms\: :ref:`Array`\[:ref:`Transform3D`\], colors\: :ref:`PackedColorArray`, update\: :ref:`bool` = true\ ) :ref:`🔗` +|void| **append_region**\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: ``int``, transforms\: :ref:`Array`\[``Transform3D``\], colors\: ``PackedColorArray``, update\: ``bool`` = true\ ) :ref:`🔗` Appends new transforms to the existing data within a region location. The mesh_id should already be setup as a :ref:`Terrain3DMeshAsset` in the asset dock. @@ -160,7 +160,7 @@ Update will regenerate the MultiMeshInstances. Disable for bulk adding, then cal .. rst-class:: classref-method -|void| **clear_by_location**\ (\ region_location\: :ref:`Vector2i`, mesh_id\: :ref:`int`\ ) :ref:`🔗` +|void| **clear_by_location**\ (\ region_location\: ``Vector2i``, mesh_id\: ``int``\ ) :ref:`🔗` Removes all instancer data and MultiMeshInstance nodes attached to the tree for the specified region location and mesh id. @@ -172,7 +172,7 @@ Removes all instancer data and MultiMeshInstance nodes attached to the tree for .. rst-class:: classref-method -|void| **clear_by_mesh**\ (\ mesh_id\: :ref:`int`\ ) :ref:`🔗` +|void| **clear_by_mesh**\ (\ mesh_id\: ``int``\ ) :ref:`🔗` Removes all instancer data and MultiMeshInstance nodes attached to the tree for all regions for the specified mesh id. @@ -184,7 +184,7 @@ Removes all instancer data and MultiMeshInstance nodes attached to the tree for .. rst-class:: classref-method -|void| **clear_by_region**\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: :ref:`int`\ ) :ref:`🔗` +|void| **clear_by_region**\ (\ region\: :ref:`Terrain3DRegion`, mesh_id\: ``int``\ ) :ref:`🔗` Removes all instancer data and MultiMeshInstance nodes attached to the tree for the specified region and mesh id. @@ -232,7 +232,7 @@ Removes and rebuilds all MultiMeshInstance3Ds attached to the tree. .. rst-class:: classref-method -|void| **remove_instances**\ (\ global_position\: :ref:`Vector3`, params\: :ref:`Dictionary`\ ) :ref:`🔗` +|void| **remove_instances**\ (\ global_position\: ``Vector3``, params\: ``Dictionary``\ ) :ref:`🔗` Uses parameters asset_id, size, strength, fixed_scale, random_scale, to randomly remove instances within the indicated brush position and size. @@ -244,7 +244,7 @@ Uses parameters asset_id, size, strength, fixed_scale, random_scale, to randomly .. rst-class:: classref-method -|void| **swap_ids**\ (\ src_id\: :ref:`int`, dest_id\: :ref:`int`\ ) :ref:`🔗` +|void| **swap_ids**\ (\ src_id\: ``int``, dest_id\: ``int``\ ) :ref:`🔗` Swaps the ID of two meshes without changing the mesh instances on the ground. @@ -256,7 +256,7 @@ Swaps the ID of two meshes without changing the mesh instances on the ground. .. rst-class:: classref-method -|void| **update_transforms**\ (\ aabb\: :ref:`AABB`\ ) :ref:`🔗` +|void| **update_transforms**\ (\ aabb\: ``AABB``\ ) :ref:`🔗` Reviews all existing instance transforms within an AABB and adjusts their heights to match the terrain. diff --git a/doc/api/class_terrain3dmaterial.rst b/doc/api/class_terrain3dmaterial.rst index 43480837..31eb8156 100644 --- a/doc/api/class_terrain3dmaterial.rst +++ b/doc/api/class_terrain3dmaterial.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/Terrain3DMaterial.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/Terrain3DMaterial.xml. .. _class_Terrain3DMaterial: Terrain3DMaterial ================= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** ``Resource`` A custom shader material resource for Terrain3D. @@ -34,49 +34,49 @@ Properties :widths: auto +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`Dictionary` | :ref:`_shader_parameters` | ``{}`` | + | ``Dictionary`` | :ref:`_shader_parameters` | ``{}`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`auto_shader` | ``false`` | + | ``bool`` | :ref:`auto_shader` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`dual_scaling` | ``false`` | + | ``bool`` | :ref:`dual_scaling` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`Shader` | :ref:`shader_override` | | + | ``Shader`` | :ref:`shader_override` | | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`shader_override_enabled` | ``false`` | + | ``bool`` | :ref:`shader_override_enabled` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_autoshader` | ``false`` | + | ``bool`` | :ref:`show_autoshader` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_checkered` | ``false`` | + | ``bool`` | :ref:`show_checkered` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_colormap` | ``false`` | + | ``bool`` | :ref:`show_colormap` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_control_angle` | ``false`` | + | ``bool`` | :ref:`show_control_angle` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_control_blend` | ``false`` | + | ``bool`` | :ref:`show_control_blend` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_control_scale` | ``false`` | + | ``bool`` | :ref:`show_control_scale` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_control_texture` | ``false`` | + | ``bool`` | :ref:`show_control_texture` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_grey` | ``false`` | + | ``bool`` | :ref:`show_grey` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_heightmap` | ``false`` | + | ``bool`` | :ref:`show_heightmap` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_instancer_grid` | ``false`` | + | ``bool`` | :ref:`show_instancer_grid` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_navigation` | ``false`` | + | ``bool`` | :ref:`show_navigation` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_region_grid` | ``false`` | + | ``bool`` | :ref:`show_region_grid` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_roughmap` | ``false`` | + | ``bool`` | :ref:`show_roughmap` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_texture_height` | ``false`` | + | ``bool`` | :ref:`show_texture_height` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_texture_normal` | ``false`` | + | ``bool`` | :ref:`show_texture_normal` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_texture_rough` | ``false`` | + | ``bool`` | :ref:`show_texture_rough` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`show_vertex_grid` | ``false`` | + | ``bool`` | :ref:`show_vertex_grid` | ``false`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ | :ref:`TextureFiltering` | :ref:`texture_filtering` | ``0`` | +------------------------------------------------------------------+------------------------------------------------------------------------------------------+-----------+ @@ -91,19 +91,19 @@ Methods .. table:: :widths: auto - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_material_rid`\ (\ ) |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_shader_param`\ (\ name\: :ref:`StringName`\ ) |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_shader_rid`\ (\ ) |const| | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save`\ (\ path\: :ref:`String` = ""\ ) | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_shader_param`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`update`\ (\ ) | - +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------+----------------------------------------------------------------------------------------------------------------------------+ + | ``RID`` | :ref:`get_material_rid`\ (\ ) |const| | + +-------------+----------------------------------------------------------------------------------------------------------------------------+ + | ``Variant`` | :ref:`get_shader_param`\ (\ name\: ``StringName``\ ) |const| | + +-------------+----------------------------------------------------------------------------------------------------------------------------+ + | ``RID`` | :ref:`get_shader_rid`\ (\ ) |const| | + +-------------+----------------------------------------------------------------------------------------------------------------------------+ + | Error | :ref:`save`\ (\ path\: ``String`` = ""\ ) | + +-------------+----------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_shader_param`\ (\ name\: ``StringName``, value\: ``Variant``\ ) | + +-------------+----------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update`\ (\ ) | + +-------------+----------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -183,7 +183,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Dictionary` **_shader_parameters** = ``{}`` :ref:`🔗` +``Dictionary`` **_shader_parameters** = ``{}`` :ref:`🔗` This private dictionary stores all of the shader parameters in the resource. It is not a cache. @@ -195,12 +195,12 @@ This private dictionary stores all of the shader parameters in the resource. It .. rst-class:: classref-property -:ref:`bool` **auto_shader** = ``false`` :ref:`🔗` +``bool`` **auto_shader** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_auto_shader**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_auto_shader**\ (\ ) +- |void| **set_auto_shader**\ (\ value\: ``bool``\ ) +- ``bool`` **get_auto_shader**\ (\ ) Enables selecting two texture IDs that will automatically be applied to the terrain based upon slope. @@ -212,12 +212,12 @@ Enables selecting two texture IDs that will automatically be applied to the terr .. rst-class:: classref-property -:ref:`bool` **dual_scaling** = ``false`` :ref:`🔗` +``bool`` **dual_scaling** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_dual_scaling**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_dual_scaling**\ (\ ) +- |void| **set_dual_scaling**\ (\ value\: ``bool``\ ) +- ``bool`` **get_dual_scaling**\ (\ ) Enables selecting one texture ID that will have multiple scales applied based upon camera distance. Use it for something like a rock texture so up close it will be nicely detailed, and far away mountains can be covered in the same rock texture. The two blend together at a specified distance. @@ -229,12 +229,12 @@ Enables selecting one texture ID that will have multiple scales applied based up .. rst-class:: classref-property -:ref:`Shader` **shader_override** :ref:`🔗` +``Shader`` **shader_override** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_shader_override**\ (\ value\: :ref:`Shader`\ ) -- :ref:`Shader` **get_shader_override**\ (\ ) +- |void| **set_shader_override**\ (\ value\: ``Shader``\ ) +- ``Shader`` **get_shader_override**\ (\ ) If shader_override_enabled is true and this Shader is valid, the material will use this custom shader code. If this is blank when you enable the override, the system will generate a shader with the current settings. So if you have a debug view enabled, the generated shader will have all of that code. A visual shader will also work here. However we only generate a text based shader so currently a visual shader needs to be constructed with the base code before it can work. @@ -246,12 +246,12 @@ If shader_override_enabled is true and this Shader is valid, the material will u .. rst-class:: classref-property -:ref:`bool` **shader_override_enabled** = ``false`` :ref:`🔗` +``bool`` **shader_override_enabled** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **enable_shader_override**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **is_shader_override_enabled**\ (\ ) +- |void| **enable_shader_override**\ (\ value\: ``bool``\ ) +- ``bool`` **is_shader_override_enabled**\ (\ ) Enables use of the :ref:`shader_override` shader code. Generates default code if shader_override is blank. @@ -263,12 +263,12 @@ Enables use of the :ref:`shader_override` **show_autoshader** = ``false`` :ref:`🔗` +``bool`` **show_autoshader** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_autoshader**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_autoshader**\ (\ ) +- |void| **set_show_autoshader**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_autoshader**\ (\ ) Display the area designated for use by the autoshader, which shows materials based upon slope. @@ -280,12 +280,12 @@ Display the area designated for use by the autoshader, which shows materials bas .. rst-class:: classref-property -:ref:`bool` **show_checkered** = ``false`` :ref:`🔗` +``bool`` **show_checkered** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_checkered**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_checkered**\ (\ ) +- |void| **set_show_checkered**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_checkered**\ (\ ) Shows a checkerboard display using a shader rendered pattern. This is turned on if the Texture List is empty. @@ -299,12 +299,12 @@ Note that when a blank texture slot is created, a 1k checkerboard texture is gen .. rst-class:: classref-property -:ref:`bool` **show_colormap** = ``false`` :ref:`🔗` +``bool`` **show_colormap** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_colormap**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_colormap**\ (\ ) +- |void| **set_show_colormap**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_colormap**\ (\ ) Places the color map in the albedo channel. @@ -316,12 +316,12 @@ Places the color map in the albedo channel. .. rst-class:: classref-property -:ref:`bool` **show_control_angle** = ``false`` :ref:`🔗` +``bool`` **show_control_angle** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_control_angle**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_control_angle**\ (\ ) +- |void| **set_show_control_angle**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_control_angle**\ (\ ) Albedo shows the painted angle. Orange means 0°, Yellow 270°, Cyan 180°, Violet 90°. Or warm colors towards -Z, cool colors +Z, greens/yellows +X, reds/blues -X. Draw all angles coming from the center of a circle for a better understanding. @@ -333,12 +333,12 @@ Albedo shows the painted angle. Orange means 0°, Yellow 270°, Cyan 180°, Viol .. rst-class:: classref-property -:ref:`bool` **show_control_blend** = ``false`` :ref:`🔗` +``bool`` **show_control_blend** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_control_blend**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_control_blend**\ (\ ) +- |void| **set_show_control_blend**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_control_blend**\ (\ ) Albedo shows the blend value used to blend the base and overlay textures as greyscale. This is especially helpful to see how the noise texture adjusts the blending edges. @@ -350,12 +350,12 @@ Albedo shows the blend value used to blend the base and overlay textures as grey .. rst-class:: classref-property -:ref:`bool` **show_control_scale** = ``false`` :ref:`🔗` +``bool`` **show_control_scale** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_control_scale**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_control_scale**\ (\ ) +- |void| **set_show_control_scale**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_control_scale**\ (\ ) Albedo shows the painted scale. Larger scales are more red, smaller scales are more blue. 0.5 middle grey is the default 100% scale. @@ -367,12 +367,12 @@ Albedo shows the painted scale. Larger scales are more red, smaller scales are m .. rst-class:: classref-property -:ref:`bool` **show_control_texture** = ``false`` :ref:`🔗` +``bool`` **show_control_texture** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_control_texture**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_control_texture**\ (\ ) +- |void| **set_show_control_texture**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_control_texture**\ (\ ) Albedo shows the base and overlay texture indices defined by the control map. Red pixels indicate the base texture, with brightness showing texture ids 0 to 31. Green pixels indicate the overlay texture. Yellow indicates both. @@ -384,12 +384,12 @@ Albedo shows the base and overlay texture indices defined by the control map. Re .. rst-class:: classref-property -:ref:`bool` **show_grey** = ``false`` :ref:`🔗` +``bool`` **show_grey** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_grey**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_grey**\ (\ ) +- |void| **set_show_grey**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_grey**\ (\ ) Albedo is set to 0.2 grey. @@ -401,12 +401,12 @@ Albedo is set to 0.2 grey. .. rst-class:: classref-property -:ref:`bool` **show_heightmap** = ``false`` :ref:`🔗` +``bool`` **show_heightmap** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_heightmap**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_heightmap**\ (\ ) +- |void| **set_show_heightmap**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_heightmap**\ (\ ) Albedo is a white to black gradient depending on height. The gradient is scaled to a height of 300, so above that or far below 0 will be all white or black. @@ -418,12 +418,12 @@ Albedo is a white to black gradient depending on height. The gradient is scaled .. rst-class:: classref-property -:ref:`bool` **show_instancer_grid** = ``false`` :ref:`🔗` +``bool`` **show_instancer_grid** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_instancer_grid**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_instancer_grid**\ (\ ) +- |void| **set_show_instancer_grid**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_instancer_grid**\ (\ ) Draws the 32x32m cell grid on the terrain, which shows how the instancer data is partitioned. @@ -435,12 +435,12 @@ Draws the 32x32m cell grid on the terrain, which shows how the instancer data is .. rst-class:: classref-property -:ref:`bool` **show_navigation** = ``false`` :ref:`🔗` +``bool`` **show_navigation** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_navigation**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_navigation**\ (\ ) +- |void| **set_show_navigation**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_navigation**\ (\ ) Displays the area designated for generating the navigation mesh. @@ -452,12 +452,12 @@ Displays the area designated for generating the navigation mesh. .. rst-class:: classref-property -:ref:`bool` **show_region_grid** = ``false`` :ref:`🔗` +``bool`` **show_region_grid** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_region_grid**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_region_grid**\ (\ ) +- |void| **set_show_region_grid**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_region_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. @@ -469,12 +469,12 @@ Draws the region grid directly on the terrain. This is more accurate than the re .. rst-class:: classref-property -:ref:`bool` **show_roughmap** = ``false`` :ref:`🔗` +``bool`` **show_roughmap** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_roughmap**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_roughmap**\ (\ ) +- |void| **set_show_roughmap**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_roughmap**\ (\ ) Albedo is set to the roughness modification map as grey scale. Middle grey, 0.5 means no roughness modification. Black would be high gloss while white is very rough. @@ -486,12 +486,12 @@ Albedo is set to the roughness modification map as grey scale. Middle grey, 0.5 .. rst-class:: classref-property -:ref:`bool` **show_texture_height** = ``false`` :ref:`🔗` +``bool`` **show_texture_height** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_texture_height**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_texture_height**\ (\ ) +- |void| **set_show_texture_height**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_texture_height**\ (\ ) Albedo is set to the painted Height textures. @@ -503,12 +503,12 @@ Albedo is set to the painted Height textures. .. rst-class:: classref-property -:ref:`bool` **show_texture_normal** = ``false`` :ref:`🔗` +``bool`` **show_texture_normal** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_texture_normal**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_texture_normal**\ (\ ) +- |void| **set_show_texture_normal**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_texture_normal**\ (\ ) Albedo is set to the painted Normal textures. @@ -520,12 +520,12 @@ Albedo is set to the painted Normal textures. .. rst-class:: classref-property -:ref:`bool` **show_texture_rough** = ``false`` :ref:`🔗` +``bool`` **show_texture_rough** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_texture_rough**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_texture_rough**\ (\ ) +- |void| **set_show_texture_rough**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_texture_rough**\ (\ ) Albedo is set to the painted Roughness textures. This is different from the roughness modification map above. @@ -537,12 +537,12 @@ Albedo is set to the painted Roughness textures. This is different from the roug .. rst-class:: classref-property -:ref:`bool` **show_vertex_grid** = ``false`` :ref:`🔗` +``bool`` **show_vertex_grid** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_show_vertex_grid**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_show_vertex_grid**\ (\ ) +- |void| **set_show_vertex_grid**\ (\ value\: ``bool``\ ) +- ``bool`` **get_show_vertex_grid**\ (\ ) Show a grid on the vertices, overlaying any above shader. @@ -593,7 +593,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`RID` **get_material_rid**\ (\ ) |const| :ref:`🔗` +``RID`` **get_material_rid**\ (\ ) |const| :ref:`🔗` Returns the RID of the material used with the Rendering Server. This is set per instance of this class. @@ -605,7 +605,7 @@ Returns the RID of the material used with the Rendering Server. This is set per .. rst-class:: classref-method -:ref:`Variant` **get_shader_param**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`🔗` +``Variant`` **get_shader_param**\ (\ name\: ``StringName``\ ) |const| :ref:`🔗` Retrieve a parameter from the active shader (built-in or override shader). @@ -617,7 +617,7 @@ Retrieve a parameter from the active shader (built-in or override shader). .. rst-class:: classref-method -:ref:`RID` **get_shader_rid**\ (\ ) |const| :ref:`🔗` +``RID`` **get_shader_rid**\ (\ ) |const| :ref:`🔗` Returns the RID of the built in shader used with the Rendering Server. This is different from any shader override which has its own RID. @@ -629,7 +629,7 @@ Returns the RID of the built in shader used with the Rendering Server. This is d .. rst-class:: classref-method -:ref:`Error` **save**\ (\ path\: :ref:`String` = ""\ ) :ref:`🔗` +Error **save**\ (\ path\: ``String`` = ""\ ) :ref:`🔗` Saves this material resource to disk, if saved as an external ``.tres`` or ``.res`` resource file. @@ -643,7 +643,7 @@ path - specifies a directory and file name to use from now on. .. rst-class:: classref-method -|void| **set_shader_param**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`🔗` +|void| **set_shader_param**\ (\ name\: ``StringName``, value\: ``Variant``\ ) :ref:`🔗` Set a parameter in the active shader (built-in or override shader). diff --git a/doc/api/class_terrain3dmeshasset.rst b/doc/api/class_terrain3dmeshasset.rst index 8524d8b0..8aba489b 100644 --- a/doc/api/class_terrain3dmeshasset.rst +++ b/doc/api/class_terrain3dmeshasset.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/Terrain3DMeshAsset.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/Terrain3DMeshAsset.xml. .. _class_Terrain3DMeshAsset: Terrain3DMeshAsset ================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** ``Resource`` .. rst-class:: classref-introduction-group @@ -33,29 +33,29 @@ Properties .. table:: :widths: auto - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`ShadowCastingSetting` | :ref:`cast_shadows` | ``1`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`density` | ``-1.0`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`int` | :ref:`generated_faces` | ``2`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`generated_size` | ``Vector2(1, 1)`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`GenType` | :ref:`generated_type` | ``0`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`height_offset` | ``0.0`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`int` | :ref:`id` | ``0`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`Material` | :ref:`material_override` | | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`String` | :ref:`name` | ``"New Mesh"`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`PackedScene` | :ref:`scene_file` | | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`visibility_range` | ``100.0`` | - +---------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | GeometryInstance3D.ShadowCastingSetting | :ref:`cast_shadows` | ``1`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``float`` | :ref:`density` | ``-1.0`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``int`` | :ref:`generated_faces` | ``2`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``Vector2`` | :ref:`generated_size` | ``Vector2(1, 1)`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | :ref:`GenType` | :ref:`generated_type` | ``0`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``float`` | :ref:`height_offset` | ``0.0`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``int`` | :ref:`id` | ``0`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``Material`` | :ref:`material_override` | | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``String`` | :ref:`name` | ``"New Mesh"`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``PackedScene`` | :ref:`scene_file` | | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ + | ``float`` | :ref:`visibility_range` | ``100.0`` | + +-------------------------------------------------+-------------------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group @@ -65,15 +65,15 @@ Methods .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clear`\ (\ ) | - +-----------------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`Mesh` | :ref:`get_mesh`\ (\ index\: :ref:`int` = 0\ ) | - +-----------------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_mesh_count`\ (\ ) |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_thumbnail`\ (\ ) |const| | - +-----------------------------------+----------------------------------------------------------------------------------------------------+ + +---------------+--------------------------------------------------------------------------------------+ + | |void| | :ref:`clear`\ (\ ) | + +---------------+--------------------------------------------------------------------------------------+ + | ``Mesh`` | :ref:`get_mesh`\ (\ index\: ``int`` = 0\ ) | + +---------------+--------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_mesh_count`\ (\ ) |const| | + +---------------+--------------------------------------------------------------------------------------+ + | ``Texture2D`` | :ref:`get_thumbnail`\ (\ ) |const| | + +---------------+--------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -188,12 +188,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`ShadowCastingSetting` **cast_shadows** = ``1`` :ref:`🔗` +GeometryInstance3D.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\: GeometryInstance3D.ShadowCastingSetting\ ) +- GeometryInstance3D.ShadowCastingSetting **get_cast_shadows**\ (\ ) Tells the renderer how to cast shadows from this mesh asset onto the terrain and other objects. This sets ``GeometryInstance3D.cast_shadow`` on all MultiMeshInstances used by this mesh. @@ -205,12 +205,12 @@ Tells the renderer how to cast shadows from this mesh asset onto the terrain and .. rst-class:: classref-property -:ref:`float` **density** = ``-1.0`` :ref:`🔗` +``float`` **density** = ``-1.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_density**\ (\ value\: :ref:`float`\ ) -- :ref:`float` **get_density**\ (\ ) +- |void| **set_density**\ (\ value\: ``float``\ ) +- ``float`` **get_density**\ (\ ) Density is used to set the approximate default spacing between instances based on the size of the mesh. When painting meshes on the terrain, mesh density is multiplied by brush strength. @@ -224,12 +224,12 @@ This value is not tied to any real world unit. It is calculated as ``10.f / mesh .. rst-class:: classref-property -:ref:`int` **generated_faces** = ``2`` :ref:`🔗` +``int`` **generated_faces** = ``2`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_generated_faces**\ (\ value\: :ref:`int`\ ) -- :ref:`int` **get_generated_faces**\ (\ ) +- |void| **set_generated_faces**\ (\ value\: ``int``\ ) +- ``int`` **get_generated_faces**\ (\ ) Select if you want the generated texture card to have a single QuadMesh, 2 meshes rotated at 90° in a cross, or 3 roated at 60°. @@ -241,12 +241,12 @@ Select if you want the generated texture card to have a single QuadMesh, 2 meshe .. rst-class:: classref-property -:ref:`Vector2` **generated_size** = ``Vector2(1, 1)`` :ref:`🔗` +``Vector2`` **generated_size** = ``Vector2(1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_generated_size**\ (\ value\: :ref:`Vector2`\ ) -- :ref:`Vector2` **get_generated_size**\ (\ ) +- |void| **set_generated_size**\ (\ value\: ``Vector2``\ ) +- ``Vector2`` **get_generated_size**\ (\ ) Sets the base size of the QuadMesh texture card. Increasing this size will expand from bottom, not the middle. @@ -275,12 +275,12 @@ If enabled, this mesh asset will be set to a generated QuadMesh to be used as a .. rst-class:: classref-property -:ref:`float` **height_offset** = ``0.0`` :ref:`🔗` +``float`` **height_offset** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_height_offset**\ (\ value\: :ref:`float`\ ) -- :ref:`float` **get_height_offset**\ (\ ) +- |void| **set_height_offset**\ (\ value\: ``float``\ ) +- ``float`` **get_height_offset**\ (\ ) Vertically offset the origin point of a mesh asset. You can also set this when painting. For example, if you have a 2 meter diameter rock with the mesh origin point in the center, but you want all rocks to be sitting on the ground, you could enter 1 or 0.9 here and it will be placed near its edge. @@ -292,12 +292,12 @@ Vertically offset the origin point of a mesh asset. You can also set this when p .. rst-class:: classref-property -:ref:`int` **id** = ``0`` :ref:`🔗` +``int`` **id** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_id**\ (\ value\: :ref:`int`\ ) -- :ref:`int` **get_id**\ (\ ) +- |void| **set_id**\ (\ value\: ``int``\ ) +- ``int`` **get_id**\ (\ ) The user settable ID of the mesh. You can change this to reorder meshes in the list. @@ -309,12 +309,12 @@ The user settable ID of the mesh. You can change this to reorder meshes in the l .. rst-class:: classref-property -:ref:`Material` **material_override** :ref:`🔗` +``Material`` **material_override** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_material_override**\ (\ value\: :ref:`Material`\ ) -- :ref:`Material` **get_material_override**\ (\ ) +- |void| **set_material_override**\ (\ value\: ``Material``\ ) +- ``Material`` **get_material_override**\ (\ ) This material will override the material on either packed scenes or generated mesh cards. @@ -326,12 +326,12 @@ This material will override the material on either packed scenes or generated me .. rst-class:: classref-property -:ref:`String` **name** = ``"New Mesh"`` :ref:`🔗` +``String`` **name** = ``"New Mesh"`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_name**\ (\ value\: :ref:`String`\ ) -- :ref:`String` **get_name**\ (\ ) +- |void| **set_name**\ (\ value\: ``String``\ ) +- ``String`` **get_name**\ (\ ) A user specified name for this asset. @@ -343,12 +343,12 @@ A user specified name for this asset. .. rst-class:: classref-property -:ref:`PackedScene` **scene_file** :ref:`🔗` +``PackedScene`` **scene_file** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_scene_file**\ (\ value\: :ref:`PackedScene`\ ) -- :ref:`PackedScene` **get_scene_file**\ (\ ) +- |void| **set_scene_file**\ (\ value\: ``PackedScene``\ ) +- ``PackedScene`` **get_scene_file**\ (\ ) A packed scene to load the mesh from. See the top description. @@ -360,12 +360,12 @@ A packed scene to load the mesh from. See the top description. .. rst-class:: classref-property -:ref:`float` **visibility_range** = ``100.0`` :ref:`🔗` +``float`` **visibility_range** = ``100.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_visibility_range**\ (\ value\: :ref:`float`\ ) -- :ref:`float` **get_visibility_range**\ (\ ) +- |void| **set_visibility_range**\ (\ value\: ``float``\ ) +- ``float`` **get_visibility_range**\ (\ ) Sets ``GeometryInstance3D.visibility_range_end`` on all MultiMeshInstances used by this mesh. Allows the renderer to cull MMIs beyond this distance. Set to 0 to disable culling. @@ -394,7 +394,7 @@ Reset this resource to default settings. .. rst-class:: classref-method -:ref:`Mesh` **get_mesh**\ (\ index\: :ref:`int` = 0\ ) :ref:`🔗` +``Mesh`` **get_mesh**\ (\ index\: ``int`` = 0\ ) :ref:`🔗` Returns the specified Mesh resource indicated. Only id 0 is used currently. @@ -406,7 +406,7 @@ Returns the specified Mesh resource indicated. Only id 0 is used currently. .. rst-class:: classref-method -:ref:`int` **get_mesh_count**\ (\ ) |const| :ref:`🔗` +``int`` **get_mesh_count**\ (\ ) |const| :ref:`🔗` Returns the number of Mesh resources found in the scene file and stored. @@ -418,7 +418,7 @@ Returns the number of Mesh resources found in the scene file and stored. .. rst-class:: classref-method -:ref:`Texture2D` **get_thumbnail**\ (\ ) |const| :ref:`🔗` +``Texture2D`` **get_thumbnail**\ (\ ) |const| :ref:`🔗` Returns the thumbnail generated by :ref:`Terrain3DAssets`. diff --git a/doc/api/class_terrain3dregion.rst b/doc/api/class_terrain3dregion.rst index 785925bd..8a50a18e 100644 --- a/doc/api/class_terrain3dregion.rst +++ b/doc/api/class_terrain3dregion.rst @@ -2,22 +2,22 @@ .. 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/Terrain3DRegion.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/Terrain3DRegion.xml. .. _class_Terrain3DRegion: Terrain3DRegion =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** ``Resource`` .. rst-class:: classref-introduction-group Description ----------- -This resource stores all map data for Terrain3D. See `Controlmap Format <../docs/controlmap_format.html>`__ and `Data Format Changelog <../docs/data_format.html>`__. +This resource stores all map data for Terrain3D. See `Controlmap Format `__ and `Data Format Changelog `__. .. rst-class:: classref-reftable-group @@ -27,31 +27,31 @@ Properties .. table:: :widths: auto - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`Image` | :ref:`color_map` | | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`Image` | :ref:`control_map` | | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`deleted` | | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`edited` | | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`Image` | :ref:`height_map` | | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`Vector2` | :ref:`height_range` | ``Vector2(0, 0)`` | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`Dictionary` | :ref:`instances` | ``{}`` | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`Vector2i` | :ref:`location` | | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`modified` | | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`int` | :ref:`region_size` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`version` | ``0.8`` | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ - | :ref:`float` | :ref:`vertex_spacing` | ``1.0`` | - +-------------------------------------+----------------------------------------------------------------------+-------------------+ + +----------------+----------------------------------------------------------------------+-------------------+ + | ``Image`` | :ref:`color_map` | | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``Image`` | :ref:`control_map` | | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``bool`` | :ref:`deleted` | | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``bool`` | :ref:`edited` | | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``Image`` | :ref:`height_map` | | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``Vector2`` | :ref:`height_range` | ``Vector2(0, 0)`` | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``Dictionary`` | :ref:`instances` | ``{}`` | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``Vector2i`` | :ref:`location` | | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``bool`` | :ref:`modified` | | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``int`` | :ref:`region_size` | ``0`` | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``float`` | :ref:`version` | ``0.8`` | + +----------------+----------------------------------------------------------------------+-------------------+ + | ``float`` | :ref:`vertex_spacing` | ``1.0`` | + +----------------+----------------------------------------------------------------------+-------------------+ .. rst-class:: classref-reftable-group @@ -61,35 +61,35 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`calc_height_range`\ (\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Terrain3DRegion` | :ref:`duplicate`\ (\ deep\: :ref:`bool` = false\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_data`\ (\ ) |const| | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`get_map`\ (\ map_type\: :ref:`MapType`\ ) |const| | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Image`\] | :ref:`get_maps`\ (\ ) |const| | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`sanitize_map`\ (\ map_type\: :ref:`MapType`, map\: :ref:`Image`\ ) |const| | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`sanitize_maps`\ (\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save`\ (\ path\: :ref:`String` = "", 16-bit\: :ref:`bool` = false\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_data`\ (\ data\: :ref:`Dictionary`\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_map`\ (\ map_type\: :ref:`MapType`, map\: :ref:`Image`\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_maps`\ (\ maps\: :ref:`Array`\[:ref:`Image`\]\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`update_height`\ (\ height\: :ref:`float`\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`update_heights`\ (\ low_high\: :ref:`Vector2`\ ) | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`validate_map_size`\ (\ map\: :ref:`Image`\ ) |const| | - +--------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`calc_height_range`\ (\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Terrain3DRegion` | :ref:`duplicate`\ (\ deep\: ``bool`` = false\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Dictionary`` | :ref:`get_data`\ (\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`get_map`\ (\ map_type\: :ref:`MapType`\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[``Image``\] | :ref:`get_maps`\ (\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`sanitize_map`\ (\ map_type\: :ref:`MapType`, map\: ``Image``\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`sanitize_maps`\ (\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Error | :ref:`save`\ (\ path\: ``String`` = "", 16-bit\: ``bool`` = false\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_data`\ (\ data\: ``Dictionary``\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_map`\ (\ map_type\: :ref:`MapType`, map\: ``Image``\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_maps`\ (\ maps\: :ref:`Array`\[``Image``\]\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_height`\ (\ height\: ``float``\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`update_heights`\ (\ low_high\: ``Vector2``\ ) | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`validate_map_size`\ (\ map\: ``Image``\ ) |const| | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -151,12 +151,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Image` **color_map** :ref:`🔗` +``Image`` **color_map** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_color_map**\ (\ value\: :ref:`Image`\ ) -- :ref:`Image` **get_color_map**\ (\ ) +- |void| **set_color_map**\ (\ value\: ``Image``\ ) +- ``Image`` **get_color_map**\ (\ ) This map is used to paint color that blends in to the terrain textures. @@ -174,18 +174,18 @@ Image format: FORMAT_RGBA8, 32-bits per pixel as four 8-bit components. .. rst-class:: classref-property -:ref:`Image` **control_map** :ref:`🔗` +``Image`` **control_map** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_control_map**\ (\ value\: :ref:`Image`\ ) -- :ref:`Image` **get_control_map**\ (\ ) +- |void| **set_control_map**\ (\ value\: ``Image``\ ) +- ``Image`` **get_control_map**\ (\ ) This map tells the shader which textures to use where, how to blend, where to place holes, etc. Image format: FORMAT_RF, 32-bit per pixel as full-precision floating-point. -However, we interpret these images as format: `RenderingDevice.DATA_FORMAT_R32_UINT `__ aka OpenGL RG32UI 32-bit per pixel as unsigned integer. See `Control map format <../docs/controlmap_format.html>`__. +However, we interpret these images as format: `RenderingDevice.DATA_FORMAT_R32_UINT `__ aka OpenGL RG32UI 32-bit per pixel as unsigned integer. See `Control map format `__. .. rst-class:: classref-item-separator @@ -195,12 +195,12 @@ However, we interpret these images as format: `RenderingDevice.DATA_FORMAT_R32_U .. rst-class:: classref-property -:ref:`bool` **deleted** :ref:`🔗` +``bool`` **deleted** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_deleted**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **is_deleted**\ (\ ) +- |void| **set_deleted**\ (\ value\: ``bool``\ ) +- ``bool`` **is_deleted**\ (\ ) This region is marked for deletion. It won't be rendered once :ref:`Terrain3DData.force_update_maps` rebuilds the map index. The file will be deleted from disk on :ref:`save`. @@ -212,12 +212,12 @@ This region is marked for deletion. It won't be rendered once :ref:`Terrain3DDat .. rst-class:: classref-property -:ref:`bool` **edited** :ref:`🔗` +``bool`` **edited** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_edited**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **is_edited**\ (\ ) +- |void| **set_edited**\ (\ value\: ``bool``\ ) +- ``bool`` **is_edited**\ (\ ) This region is marked for saving in the undo/redo system by :ref:`Terrain3DEditor` during an operation. @@ -229,12 +229,12 @@ This region is marked for saving in the undo/redo system by :ref:`Terrain3DEdito .. rst-class:: classref-property -:ref:`Image` **height_map** :ref:`🔗` +``Image`` **height_map** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_height_map**\ (\ value\: :ref:`Image`\ ) -- :ref:`Image` **get_height_map**\ (\ ) +- |void| **set_height_map**\ (\ value\: ``Image``\ ) +- ``Image`` **get_height_map**\ (\ ) This map contains the real value heights for the terrain. @@ -252,12 +252,12 @@ Editing is always done in 32-bit. We do provide an option to save as 16-bit, see .. rst-class:: classref-property -:ref:`Vector2` **height_range** = ``Vector2(0, 0)`` :ref:`🔗` +``Vector2`` **height_range** = ``Vector2(0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_height_range**\ (\ value\: :ref:`Vector2`\ ) -- :ref:`Vector2` **get_height_range**\ (\ ) +- |void| **set_height_range**\ (\ value\: ``Vector2``\ ) +- ``Vector2`` **get_height_range**\ (\ ) The current minimum and maximum height range for this region, used to calculate the AABB of the terrain. Update it with :ref:`update_height`, and recalculate it with :ref:`calc_height_range`. @@ -269,12 +269,12 @@ The current minimum and maximum height range for this region, used to calculate .. rst-class:: classref-property -:ref:`Dictionary` **instances** = ``{}`` :ref:`🔗` +``Dictionary`` **instances** = ``{}`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_instances**\ (\ value\: :ref:`Dictionary`\ ) -- :ref:`Dictionary` **get_instances**\ (\ ) +- |void| **set_instances**\ (\ value\: ``Dictionary``\ ) +- ``Dictionary`` **get_instances**\ (\ ) A Dictionary that stores the instancer transforms for this region. @@ -302,12 +302,12 @@ After changing this data, :ref:`Terrain3DInstancer.force_update_mmis` **location** :ref:`🔗` +``Vector2i`` **location** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_location**\ (\ value\: :ref:`Vector2i`\ ) -- :ref:`Vector2i` **get_location**\ (\ ) +- |void| **set_location**\ (\ value\: ``Vector2i``\ ) +- ``Vector2i`` **get_location**\ (\ ) The region location, or region grid coordinates in the world space where this region lives. @@ -319,12 +319,12 @@ The region location, or region grid coordinates in the world space where this re .. rst-class:: classref-property -:ref:`bool` **modified** :ref:`🔗` +``bool`` **modified** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_modified**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **is_modified**\ (\ ) +- |void| **set_modified**\ (\ value\: ``bool``\ ) +- ``bool`` **is_modified**\ (\ ) This region has been modified and will be saved. @@ -336,12 +336,12 @@ This region has been modified and will be saved. .. rst-class:: classref-property -:ref:`int` **region_size** = ``0`` :ref:`🔗` +``int`` **region_size** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_region_size**\ (\ value\: :ref:`int`\ ) -- :ref:`int` **get_region_size**\ (\ ) +- |void| **set_region_size**\ (\ value\: ``int``\ ) +- ``int`` **get_region_size**\ (\ ) The current region size for this region, calculated from the dimensions of the first loaded map. It should match :ref:`Terrain3D.region_size`. @@ -353,12 +353,12 @@ The current region size for this region, calculated from the dimensions of the f .. rst-class:: classref-property -:ref:`float` **version** = ``0.8`` :ref:`🔗` +``float`` **version** = ``0.8`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_version**\ (\ value\: :ref:`float`\ ) -- :ref:`float` **get_version**\ (\ ) +- |void| **set_version**\ (\ value\: ``float``\ ) +- ``float`` **get_version**\ (\ ) The data file version. This is independent of the Terrain3D version, though they often align. @@ -370,12 +370,12 @@ The data file version. This is independent of the Terrain3D version, though they .. 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**\ (\ ) Stored instancer transforms are laterally scaled by this value. This value is manage by the instancer on loading or when :ref:`Terrain3D.vertex_spacing` is set, and shouldn't be manually adjusted. @@ -404,7 +404,7 @@ Recalculates the height range for this region by looking at every pixel in the h .. rst-class:: classref-method -:ref:`Terrain3DRegion` **duplicate**\ (\ deep\: :ref:`bool` = false\ ) :ref:`🔗` +:ref:`Terrain3DRegion` **duplicate**\ (\ deep\: ``bool`` = false\ ) :ref:`🔗` Returns a duplicate copy of this node, with references to the same image maps and multimeshes. @@ -418,7 +418,7 @@ Returns a duplicate copy of this node, with references to the same image maps an .. rst-class:: classref-method -:ref:`Dictionary` **get_data**\ (\ ) |const| :ref:`🔗` +``Dictionary`` **get_data**\ (\ ) |const| :ref:`🔗` Returns all data in this region in a dictionary. @@ -430,7 +430,7 @@ Returns all data in this region in a dictionary. .. rst-class:: classref-method -:ref:`Image` **get_map**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` +``Image`` **get_map**\ (\ map_type\: :ref:`MapType`\ ) |const| :ref:`🔗` Returns the specified image map. @@ -442,9 +442,9 @@ Returns the specified image map. .. rst-class:: classref-method -:ref:`Array`\[:ref:`Image`\] **get_maps**\ (\ ) |const| :ref:`🔗` +:ref:`Array`\[``Image``\] **get_maps**\ (\ ) |const| :ref:`🔗` -Returns an Array\ :ref:`Image` with height, control, and color maps. +Returns an Array\ ``Image`` with height, control, and color maps. .. rst-class:: classref-item-separator @@ -454,7 +454,7 @@ Returns an Array\ :ref:`Image` with height, control, and color maps .. rst-class:: classref-method -:ref:`Image` **sanitize_map**\ (\ map_type\: :ref:`MapType`, map\: :ref:`Image`\ ) |const| :ref:`🔗` +``Image`` **sanitize_map**\ (\ map_type\: :ref:`MapType`, map\: ``Image``\ ) |const| :ref:`🔗` Validates and adjusts the map size and format if possible, or creates a usable blank image in the right size and format. @@ -478,7 +478,7 @@ Sanitizes all map types. See :ref:`sanitize_map` **save**\ (\ path\: :ref:`String` = "", 16-bit\: :ref:`bool` = false\ ) :ref:`🔗` +Error **save**\ (\ path\: ``String`` = "", 16-bit\: ``bool`` = false\ ) :ref:`🔗` Saves this region to the current file name. @@ -494,7 +494,7 @@ Saves this region to the current file name. .. rst-class:: classref-method -|void| **set_data**\ (\ data\: :ref:`Dictionary`\ ) :ref:`🔗` +|void| **set_data**\ (\ data\: ``Dictionary``\ ) :ref:`🔗` Overwrites all local variables with values in the dictionary. @@ -506,7 +506,7 @@ Overwrites all local variables with values in the dictionary. .. rst-class:: classref-method -|void| **set_map**\ (\ map_type\: :ref:`MapType`, map\: :ref:`Image`\ ) :ref:`🔗` +|void| **set_map**\ (\ map_type\: :ref:`MapType`, map\: ``Image``\ ) :ref:`🔗` Assigns the provided map to the desired map type. @@ -518,7 +518,7 @@ Assigns the provided map to the desired map type. .. rst-class:: classref-method -|void| **set_maps**\ (\ maps\: :ref:`Array`\[:ref:`Image`\]\ ) :ref:`🔗` +|void| **set_maps**\ (\ maps\: :ref:`Array`\[``Image``\]\ ) :ref:`🔗` Expects an array with three images in it, and assigns them to the height, control, and color maps. @@ -530,7 +530,7 @@ Expects an array with three images in it, and assigns them to the height, contro .. rst-class:: classref-method -|void| **update_height**\ (\ height\: :ref:`float`\ ) :ref:`🔗` +|void| **update_height**\ (\ height\: ``float``\ ) :ref:`🔗` When sculpting, this is called to provide the current height. It may expand the vertical bounds, which is used to calculate the terrain AABB. @@ -542,7 +542,7 @@ When sculpting, this is called to provide the current height. It may expand the .. rst-class:: classref-method -|void| **update_heights**\ (\ low_high\: :ref:`Vector2`\ ) :ref:`🔗` +|void| **update_heights**\ (\ low_high\: ``Vector2``\ ) :ref:`🔗` When sculpting the terrain, this is called to provide both a low and high height. It may expand the vertical bounds, which is used to calculate the terrain AABB. @@ -554,7 +554,7 @@ When sculpting the terrain, this is called to provide both a low and high height .. rst-class:: classref-method -:ref:`bool` **validate_map_size**\ (\ map\: :ref:`Image`\ ) |const| :ref:`🔗` +``bool`` **validate_map_size**\ (\ map\: ``Image``\ ) |const| :ref:`🔗` This validates the map size according to previously loaded maps. diff --git a/doc/api/class_terrain3dtextureasset.rst b/doc/api/class_terrain3dtextureasset.rst index 4169e1d2..207720a5 100644 --- a/doc/api/class_terrain3dtextureasset.rst +++ b/doc/api/class_terrain3dtextureasset.rst @@ -2,22 +2,22 @@ .. 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/Terrain3DTextureAsset.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/Terrain3DTextureAsset.xml. .. _class_Terrain3DTextureAsset: Terrain3DTextureAsset ===================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** ``Resource`` .. rst-class:: classref-introduction-group Description ----------- -A set of texture files and settings that gets added to a :ref:`Terrain3DAssets` resource. Textures must be prepared according to the `documentation <../docs/texture_prep.html>`__. +A set of texture files and settings that gets added to a :ref:`Terrain3DAssets` resource. Textures must be prepared according to the `documentation `__. .. rst-class:: classref-reftable-group @@ -27,21 +27,21 @@ Properties .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`albedo_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------+-----------------------+ - | :ref:`Texture2D` | :ref:`albedo_texture` | | - +-----------------------------------+----------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`detiling` | ``0.0`` | - +-----------------------------------+----------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`id` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------------+-----------------------+ - | :ref:`String` | :ref:`name` | ``"New Texture"`` | - +-----------------------------------+----------------------------------------------------------------------------+-----------------------+ - | :ref:`Texture2D` | :ref:`normal_texture` | | - +-----------------------------------+----------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`uv_scale` | ``0.1`` | - +-----------------------------------+----------------------------------------------------------------------------+-----------------------+ + +---------------+----------------------------------------------------------------------------+-----------------------+ + | ``Color`` | :ref:`albedo_color` | ``Color(1, 1, 1, 1)`` | + +---------------+----------------------------------------------------------------------------+-----------------------+ + | ``Texture2D`` | :ref:`albedo_texture` | | + +---------------+----------------------------------------------------------------------------+-----------------------+ + | ``float`` | :ref:`detiling` | ``0.0`` | + +---------------+----------------------------------------------------------------------------+-----------------------+ + | ``int`` | :ref:`id` | ``0`` | + +---------------+----------------------------------------------------------------------------+-----------------------+ + | ``String`` | :ref:`name` | ``"New Texture"`` | + +---------------+----------------------------------------------------------------------------+-----------------------+ + | ``Texture2D`` | :ref:`normal_texture` | | + +---------------+----------------------------------------------------------------------------+-----------------------+ + | ``float`` | :ref:`uv_scale` | ``0.1`` | + +---------------+----------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -109,12 +109,12 @@ Property Descriptions .. rst-class:: classref-property -:ref:`Color` **albedo_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` +``Color`` **albedo_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_albedo_color**\ (\ value\: :ref:`Color`\ ) -- :ref:`Color` **get_albedo_color**\ (\ ) +- |void| **set_albedo_color**\ (\ value\: ``Color``\ ) +- ``Color`` **get_albedo_color**\ (\ ) This color is multiplied by the albedo texture in the shader. @@ -126,12 +126,12 @@ This color is multiplied by the albedo texture in the shader. .. rst-class:: classref-property -:ref:`Texture2D` **albedo_texture** :ref:`🔗` +``Texture2D`` **albedo_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_albedo_texture**\ (\ value\: :ref:`Texture2D`\ ) -- :ref:`Texture2D` **get_albedo_texture**\ (\ ) +- |void| **set_albedo_texture**\ (\ value\: ``Texture2D``\ ) +- ``Texture2D`` **get_albedo_texture**\ (\ ) The texture file with albedo on RGB and height on A. @@ -143,12 +143,12 @@ The texture file with albedo on RGB and height on A. .. rst-class:: classref-property -:ref:`float` **detiling** = ``0.0`` :ref:`🔗` +``float`` **detiling** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_detiling**\ (\ value\: :ref:`float`\ ) -- :ref:`float` **get_detiling**\ (\ ) +- |void| **set_detiling**\ (\ value\: ``float``\ ) +- ``float`` **get_detiling**\ (\ ) The shader rotates UV lookups in a detiling pattern based on this value. @@ -160,12 +160,12 @@ The shader rotates UV lookups in a detiling pattern based on this value. .. rst-class:: classref-property -:ref:`int` **id** = ``0`` :ref:`🔗` +``int`` **id** = ``0`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_id**\ (\ value\: :ref:`int`\ ) -- :ref:`int` **get_id**\ (\ ) +- |void| **set_id**\ (\ value\: ``int``\ ) +- ``int`` **get_id**\ (\ ) The user settable ID of the texture, between 0 and 31. You can change this to reorder textures in the list, however it won't change the ID painted on the terrain. @@ -177,12 +177,12 @@ The user settable ID of the texture, between 0 and 31. You can change this to re .. rst-class:: classref-property -:ref:`String` **name** = ``"New Texture"`` :ref:`🔗` +``String`` **name** = ``"New Texture"`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_name**\ (\ value\: :ref:`String`\ ) -- :ref:`String` **get_name**\ (\ ) +- |void| **set_name**\ (\ value\: ``String``\ ) +- ``String`` **get_name**\ (\ ) A user specified name for this texture set. @@ -194,12 +194,12 @@ A user specified name for this texture set. .. rst-class:: classref-property -:ref:`Texture2D` **normal_texture** :ref:`🔗` +``Texture2D`` **normal_texture** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_normal_texture**\ (\ value\: :ref:`Texture2D`\ ) -- :ref:`Texture2D` **get_normal_texture**\ (\ ) +- |void| **set_normal_texture**\ (\ value\: ``Texture2D``\ ) +- ``Texture2D`` **get_normal_texture**\ (\ ) The texture file with normal on RGB and roughness on A. @@ -211,12 +211,12 @@ The texture file with normal on RGB and roughness on A. .. rst-class:: classref-property -:ref:`float` **uv_scale** = ``0.1`` :ref:`🔗` +``float`` **uv_scale** = ``0.1`` :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_uv_scale**\ (\ value\: :ref:`float`\ ) -- :ref:`float` **get_uv_scale**\ (\ ) +- |void| **set_uv_scale**\ (\ value\: ``float``\ ) +- ``float`` **get_uv_scale**\ (\ ) The scale of the textures. diff --git a/doc/api/class_terrain3dutil.rst b/doc/api/class_terrain3dutil.rst index db9e1217..2f2ad03b 100644 --- a/doc/api/class_terrain3dutil.rst +++ b/doc/api/class_terrain3dutil.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/Terrain3DUtil.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/Terrain3DUtil.xml. .. _class_Terrain3DUtil: Terrain3DUtil ============= -**Inherits:** :ref:`Object` +**Inherits:** ``Object`` .. rst-class:: classref-introduction-group @@ -47,61 +47,61 @@ Methods .. table:: :widths: auto - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`as_float`\ (\ value\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`as_uint`\ (\ value\: :ref:`float`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`black_to_alpha`\ (\ image\: :ref:`Image`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`enc_auto`\ (\ pixel\: :ref:`bool`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`enc_base`\ (\ base\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`enc_blend`\ (\ blend\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`enc_hole`\ (\ pixel\: :ref:`bool`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`enc_nav`\ (\ pixel\: :ref:`bool`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`enc_overlay`\ (\ overlay\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`enc_uv_rotation`\ (\ rotation\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`enc_uv_scale`\ (\ scale\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`filename_to_location`\ (\ filename\: :ref:`String`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_base`\ (\ pixel\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_blend`\ (\ pixel\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`get_filled_image`\ (\ size\: :ref:`Vector2i`, color\: :ref:`Color`, create_mipmaps\: :ref:`bool`, format\: :ref:`Format`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_min_max`\ (\ image\: :ref:`Image`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_overlay`\ (\ pixel\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`get_thumbnail`\ (\ image\: :ref:`Image`, size\: :ref:`Vector2i` = Vector2i(256, 256)\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_uv_rotation`\ (\ pixel\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_uv_scale`\ (\ pixel\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_auto`\ (\ pixel\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_hole`\ (\ pixel\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_nav`\ (\ pixel\: :ref:`int`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`load_image`\ (\ file_name\: :ref:`String`, cache_mode\: :ref:`int` = 0, r16_height_range\: :ref:`Vector2` = Vector2(0, 255), r16_size\: :ref:`Vector2i` = Vector2i(0, 0)\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`location_to_filename`\ (\ region_location\: :ref:`Vector2i`\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`luminance_to_height`\ (\ src_rgb\: :ref:`Image` = false\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`pack_image`\ (\ src_rgb\: :ref:`Image`, src_a\: :ref:`Image`, invert_green\: :ref:`bool` = false, invert_alpha\: :ref:`bool` = false, alpha_channel\: :ref:`int` = 0\ ) |static| | - +---------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``float`` | :ref:`as_float`\ (\ value\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`as_uint`\ (\ value\: ``float``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`black_to_alpha`\ (\ image\: ``Image``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`enc_auto`\ (\ pixel\: ``bool``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`enc_base`\ (\ base\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`enc_blend`\ (\ blend\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`enc_hole`\ (\ pixel\: ``bool``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`enc_nav`\ (\ pixel\: ``bool``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`enc_overlay`\ (\ overlay\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`enc_uv_rotation`\ (\ rotation\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`enc_uv_scale`\ (\ scale\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Vector2i`` | :ref:`filename_to_location`\ (\ filename\: ``String``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_base`\ (\ pixel\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_blend`\ (\ pixel\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`get_filled_image`\ (\ size\: ``Vector2i``, color\: ``Color``, create_mipmaps\: ``bool``, format\: Image.Format\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Vector2`` | :ref:`get_min_max`\ (\ image\: ``Image``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_overlay`\ (\ pixel\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`get_thumbnail`\ (\ image\: ``Image``, size\: ``Vector2i`` = Vector2i(256, 256)\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_uv_rotation`\ (\ pixel\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``int`` | :ref:`get_uv_scale`\ (\ pixel\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`is_auto`\ (\ pixel\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`is_hole`\ (\ pixel\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``bool`` | :ref:`is_nav`\ (\ pixel\: ``int``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`load_image`\ (\ file_name\: ``String``, cache_mode\: ``int`` = 0, r16_height_range\: ``Vector2`` = Vector2(0, 255), r16_size\: ``Vector2i`` = Vector2i(0, 0)\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``String`` | :ref:`location_to_filename`\ (\ region_location\: ``Vector2i``\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`luminance_to_height`\ (\ src_rgb\: ``Image`` = false\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``Image`` | :ref:`pack_image`\ (\ src_rgb\: ``Image``, src_a\: ``Image``, invert_green\: ``bool`` = false, invert_alpha\: ``bool`` = false, alpha_channel\: ``int`` = 0\ ) |static| | + +--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,7 +116,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **as_float**\ (\ value\: :ref:`int`\ ) |static| :ref:`🔗` +``float`` **as_float**\ (\ value\: ``int``\ ) |static| :ref:`🔗` Returns a float typed variable with the contents of the memory stored in value, an integer typed variable. @@ -134,7 +134,7 @@ See :ref:`as_uint` for the opposite. .. rst-class:: classref-method -:ref:`int` **as_uint**\ (\ value\: :ref:`float`\ ) |static| :ref:`🔗` +``int`` **as_uint**\ (\ value\: ``float``\ ) |static| :ref:`🔗` Returns an integer typed variable with the contents of the memory stored in value, a float typed variable. @@ -152,7 +152,7 @@ See :ref:`as_float` for the opposite. .. rst-class:: classref-method -:ref:`Image` **black_to_alpha**\ (\ image\: :ref:`Image`\ ) |static| :ref:`🔗` +``Image`` **black_to_alpha**\ (\ image\: ``Image``\ ) |static| :ref:`🔗` Receives an image with a black background and returns one with a transparent background, aka an alpha mask. @@ -164,7 +164,7 @@ Receives an image with a black background and returns one with a transparent bac .. rst-class:: classref-method -:ref:`int` **enc_auto**\ (\ pixel\: :ref:`bool`\ ) |static| :ref:`🔗` +``int`` **enc_auto**\ (\ pixel\: ``bool``\ ) |static| :ref:`🔗` Returns a control map uint with the auto shader bit set. See the top description for usage. @@ -176,7 +176,7 @@ Returns a control map uint with the auto shader bit set. See the top description .. rst-class:: classref-method -:ref:`int` **enc_base**\ (\ base\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **enc_base**\ (\ base\: ``int``\ ) |static| :ref:`🔗` Returns a control map uint with the base texture ID encoded. See the top description for usage. @@ -188,7 +188,7 @@ Returns a control map uint with the base texture ID encoded. See the top descrip .. rst-class:: classref-method -:ref:`int` **enc_blend**\ (\ blend\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **enc_blend**\ (\ blend\: ``int``\ ) |static| :ref:`🔗` Returns a control map uint with the blend value encoded. See the top description for usage. @@ -200,7 +200,7 @@ Returns a control map uint with the blend value encoded. See the top description .. rst-class:: classref-method -:ref:`int` **enc_hole**\ (\ pixel\: :ref:`bool`\ ) |static| :ref:`🔗` +``int`` **enc_hole**\ (\ pixel\: ``bool``\ ) |static| :ref:`🔗` Returns a control map uint with the hole bit set. See the top description for usage. @@ -212,7 +212,7 @@ Returns a control map uint with the hole bit set. See the top description for us .. rst-class:: classref-method -:ref:`int` **enc_nav**\ (\ pixel\: :ref:`bool`\ ) |static| :ref:`🔗` +``int`` **enc_nav**\ (\ pixel\: ``bool``\ ) |static| :ref:`🔗` Returns a control map uint with the nav bit set. See the top description for usage. @@ -224,7 +224,7 @@ Returns a control map uint with the nav bit set. See the top description for usa .. rst-class:: classref-method -:ref:`int` **enc_overlay**\ (\ overlay\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **enc_overlay**\ (\ overlay\: ``int``\ ) |static| :ref:`🔗` Returns a control map uint with the overlay texture ID encoded. See the top description for usage. @@ -236,7 +236,7 @@ Returns a control map uint with the overlay texture ID encoded. See the top desc .. rst-class:: classref-method -:ref:`int` **enc_uv_rotation**\ (\ rotation\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **enc_uv_rotation**\ (\ rotation\: ``int``\ ) |static| :ref:`🔗` Returns a control map uint with the texture rotation encoded. See the top description for usage. See :ref:`get_uv_rotation` for values. @@ -248,7 +248,7 @@ Returns a control map uint with the texture rotation encoded. See the top descri .. rst-class:: classref-method -:ref:`int` **enc_uv_scale**\ (\ scale\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **enc_uv_scale**\ (\ scale\: ``int``\ ) |static| :ref:`🔗` Returns a control map uint with the texture scale encoded. See the top description for usage. See :ref:`get_uv_scale` for values. @@ -260,7 +260,7 @@ Returns a control map uint with the texture scale encoded. See the top descripti .. rst-class:: classref-method -:ref:`Vector2i` **filename_to_location**\ (\ filename\: :ref:`String`\ ) |static| :ref:`🔗` +``Vector2i`` **filename_to_location**\ (\ filename\: ``String``\ ) |static| :ref:`🔗` Converts a file name string like ``terrain3d-01_02.res`` to a region location like ``(-1, 2)``. - is negative, \_ is positive. @@ -272,7 +272,7 @@ Converts a file name string like ``terrain3d-01_02.res`` to a region location li .. rst-class:: classref-method -:ref:`int` **get_base**\ (\ pixel\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **get_base**\ (\ pixel\: ``int``\ ) |static| :ref:`🔗` Returns the base texture ID from a control map pixel. @@ -284,7 +284,7 @@ Returns the base texture ID from a control map pixel. .. rst-class:: classref-method -:ref:`int` **get_blend**\ (\ pixel\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **get_blend**\ (\ pixel\: ``int``\ ) |static| :ref:`🔗` Returns the blend value from a control map pixel. @@ -296,7 +296,7 @@ Returns the blend value from a control map pixel. .. rst-class:: classref-method -:ref:`Image` **get_filled_image**\ (\ size\: :ref:`Vector2i`, color\: :ref:`Color`, create_mipmaps\: :ref:`bool`, format\: :ref:`Format`\ ) |static| :ref:`🔗` +``Image`` **get_filled_image**\ (\ size\: ``Vector2i``, color\: ``Color``, create_mipmaps\: ``bool``, format\: Image.Format\ ) |static| :ref:`🔗` Returns an Image filled with a specified color and format. @@ -318,7 +318,7 @@ The reason for this is the Image compression library is available only in the ed .. rst-class:: classref-method -:ref:`Vector2` **get_min_max**\ (\ image\: :ref:`Image`\ ) |static| :ref:`🔗` +``Vector2`` **get_min_max**\ (\ image\: ``Image``\ ) |static| :ref:`🔗` Returns the minimum and maximum r channel values of an Image. Used for heightmaps. @@ -330,7 +330,7 @@ Returns the minimum and maximum r channel values of an Image. Used for heightmap .. rst-class:: classref-method -:ref:`int` **get_overlay**\ (\ pixel\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **get_overlay**\ (\ pixel\: ``int``\ ) |static| :ref:`🔗` Returns the overlay texture ID from a control map pixel. @@ -342,7 +342,7 @@ Returns the overlay texture ID from a control map pixel. .. rst-class:: classref-method -:ref:`Image` **get_thumbnail**\ (\ image\: :ref:`Image`, size\: :ref:`Vector2i` = Vector2i(256, 256)\ ) |static| :ref:`🔗` +``Image`` **get_thumbnail**\ (\ image\: ``Image``, size\: ``Vector2i`` = Vector2i(256, 256)\ ) |static| :ref:`🔗` Returns an Image normalized and converted to RGB8. Used for creating a human viewable image of a heightmap, at any size. @@ -354,7 +354,7 @@ Returns an Image normalized and converted to RGB8. Used for creating a human vie .. rst-class:: classref-method -:ref:`int` **get_uv_rotation**\ (\ pixel\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **get_uv_rotation**\ (\ pixel\: ``int``\ ) |static| :ref:`🔗` Returns the texture rotation from a control map pixel. Values are 0 - 15, which provides degrees when multiplied by 22.5. (360/16). @@ -366,7 +366,7 @@ Returns the texture rotation from a control map pixel. Values are 0 - 15, which .. rst-class:: classref-method -:ref:`int` **get_uv_scale**\ (\ pixel\: :ref:`int`\ ) |static| :ref:`🔗` +``int`` **get_uv_scale**\ (\ pixel\: ``int``\ ) |static| :ref:`🔗` Returns the texture scale modification from a control map pixel. Values are an index into the array `{ 0, 20, 40, 60, 80, -60, -40, -20 }`. 0 indicates no scale modification. Index 2 indicates a 40% increase in texture scale at that pixel. Index -1 or 7 indicates a -20% texture scale change. @@ -378,7 +378,7 @@ Returns the texture scale modification from a control map pixel. Values are an i .. rst-class:: classref-method -:ref:`bool` **is_auto**\ (\ pixel\: :ref:`int`\ ) |static| :ref:`🔗` +``bool`` **is_auto**\ (\ pixel\: ``int``\ ) |static| :ref:`🔗` Returns true if the control map pixel has the autoshader bit set. @@ -390,7 +390,7 @@ Returns true if the control map pixel has the autoshader bit set. .. rst-class:: classref-method -:ref:`bool` **is_hole**\ (\ pixel\: :ref:`int`\ ) |static| :ref:`🔗` +``bool`` **is_hole**\ (\ pixel\: ``int``\ ) |static| :ref:`🔗` Returns true if the control map pixel has the hole bit set. @@ -402,7 +402,7 @@ Returns true if the control map pixel has the hole bit set. .. rst-class:: classref-method -:ref:`bool` **is_nav**\ (\ pixel\: :ref:`int`\ ) |static| :ref:`🔗` +``bool`` **is_nav**\ (\ pixel\: ``int``\ ) |static| :ref:`🔗` Returns true if the control map pixel has the nav bit set. @@ -414,7 +414,7 @@ Returns true if the control map pixel has the nav bit set. .. rst-class:: classref-method -:ref:`Image` **load_image**\ (\ file_name\: :ref:`String`, cache_mode\: :ref:`int` = 0, r16_height_range\: :ref:`Vector2` = Vector2(0, 255), r16_size\: :ref:`Vector2i` = Vector2i(0, 0)\ ) |static| :ref:`🔗` +``Image`` **load_image**\ (\ file_name\: ``String``, cache_mode\: ``int`` = 0, r16_height_range\: ``Vector2`` = Vector2(0, 255), r16_size\: ``Vector2i`` = Vector2i(0, 0)\ ) |static| :ref:`🔗` Loads a file from disk and returns an Image. @@ -434,7 +434,7 @@ Loads a file from disk and returns an Image. .. rst-class:: classref-method -:ref:`String` **location_to_filename**\ (\ region_location\: :ref:`Vector2i`\ ) |static| :ref:`🔗` +``String`` **location_to_filename**\ (\ region_location\: ``Vector2i``\ ) |static| :ref:`🔗` Converts a region location like ``(-1, 2)`` to a file name string like ``terrain3d-01_02.res``. - is negative, \_ is positive. @@ -446,7 +446,7 @@ Converts a region location like ``(-1, 2)`` to a file name string like ``terrain .. rst-class:: classref-method -:ref:`Image` **luminance_to_height**\ (\ src_rgb\: :ref:`Image` = false\ ) |static| :ref:`🔗` +``Image`` **luminance_to_height**\ (\ src_rgb\: ``Image`` = false\ ) |static| :ref:`🔗` Generates a greyscale RGB8 height texture from the luminance values of the source image. @@ -458,7 +458,7 @@ Generates a greyscale RGB8 height texture from the luminance values of the sourc .. rst-class:: classref-method -:ref:`Image` **pack_image**\ (\ src_rgb\: :ref:`Image`, src_a\: :ref:`Image`, invert_green\: :ref:`bool` = false, invert_alpha\: :ref:`bool` = false, alpha_channel\: :ref:`int` = 0\ ) |static| :ref:`🔗` +``Image`` **pack_image**\ (\ src_rgb\: ``Image``, src_a\: ``Image``, invert_green\: ``bool`` = false, invert_alpha\: ``bool`` = false, alpha_channel\: ``int`` = 0\ ) |static| :ref:`🔗` Returns an RGBA Image packed for terrain usage. diff --git a/doc/api/index.rst b/doc/api/index.rst index fcdd2656..47fd33e1 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -3,47 +3,29 @@ .. 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. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. _doc_class_reference: All classes =========== -Nodes -===== +Variant types +============= .. toctree:: :maxdepth: 1 - :name: toc-class-ref-nodes + :name: toc-class-ref-variants - class_node + class_variant class_terrain3d - -Resources -========= - -.. toctree:: - :maxdepth: 1 - :name: toc-class-ref-resources - - class_resource class_terrain3dassets + class_terrain3ddata + class_terrain3deditor + class_terrain3dinstancer class_terrain3dmaterial class_terrain3dmeshasset class_terrain3dregion class_terrain3dtextureasset - -Other objects -============= - -.. toctree:: - :maxdepth: 1 - :name: toc-class-ref-objects - - class_object - class_terrain3ddata - class_terrain3deditor - class_terrain3dinstancer class_terrain3dutil diff --git a/doc/build_docs.sh b/doc/build_docs.sh index 398c28b1..50fd0a9d 100644 --- a/doc/build_docs.sh +++ b/doc/build_docs.sh @@ -7,15 +7,12 @@ pushd $REPO echo Running Godot to dump XML files cd $REPO/project -$GODOT --doctool ../ | egrep 'Godot Engine' -rm -rf ../{modules,platform} +$GODOT --doctool ../doc --gdextension-docs cd $REPO/doc echo Running make_rst.py to produce sphinx output -$MAKERST --verbose --filter Terrain3D --output api classes/ - -find classes -type f ! -name 'Terrain3D*' -delete +$MAKERST --verbose --filter Terrain3D --output api path doc_classes/ 2>&1 | egrep -v 'Unresolved (type|enum)' make clean make html 2>&1 | grep -Pv 'WARNING: undefined label: (?!'\''class_terrain3d)' | egrep -v '(local id not found|copying images|writing output|reading sources)...' diff --git a/doc/classes/Terrain3D.xml b/doc/doc_classes/Terrain3D.xml similarity index 98% rename from doc/classes/Terrain3D.xml rename to doc/doc_classes/Terrain3D.xml index 620c942c..6671ea18 100644 --- a/doc/classes/Terrain3D.xml +++ b/doc/doc_classes/Terrain3D.xml @@ -1,10 +1,10 @@ - + 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 [url=../docs/system_architecture.html]System Architecture[/url] for design details. + This class handles mesh and collision generation, and management of the whole system. See [url=https://terrain3d.readthedocs.io/en/stable/docs/system_architecture.html]System Architecture[/url] for design details. diff --git a/doc/classes/Terrain3DAssets.xml b/doc/doc_classes/Terrain3DAssets.xml similarity index 98% rename from doc/classes/Terrain3DAssets.xml rename to doc/doc_classes/Terrain3DAssets.xml index c02afe93..84de2427 100644 --- a/doc/classes/Terrain3DAssets.xml +++ b/doc/doc_classes/Terrain3DAssets.xml @@ -1,5 +1,5 @@ - + diff --git a/doc/classes/Terrain3DData.xml b/doc/doc_classes/Terrain3DData.xml similarity index 98% rename from doc/classes/Terrain3DData.xml rename to doc/doc_classes/Terrain3DData.xml index de2c6823..0cf4e620 100644 --- a/doc/classes/Terrain3DData.xml +++ b/doc/doc_classes/Terrain3DData.xml @@ -1,5 +1,5 @@ - + @@ -92,7 +92,7 @@ - Returns the resource ID of the generated height map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See [url=../docs/tips.html#using-the-generated-height-map-in-other-shaders]Tips[/url] for an example. + Returns the resource ID of the generated height map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See [url=https://terrain3d.readthedocs.io/en/stable/docs/tips.html#using-the-generated-height-map-in-other-shaders]Tips[/url] for an example. @@ -146,7 +146,7 @@ - Returns the resource ID of the generated control map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See [url=../docs/tips.html#using-the-generated-height-map-in-other-shaders]Tips[/url] for an example. + Returns the resource ID of the generated control map Texture Array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See [url=https://terrain3d.readthedocs.io/en/stable/docs/tips.html#using-the-generated-height-map-in-other-shaders]Tips[/url] for an example. @@ -184,7 +184,7 @@ - Returns the resource ID of the generated height map texture array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See [url=../docs/tips.html#using-the-generated-height-map-in-other-shaders]Tips[/url] for an example. + Returns the resource ID of the generated height map texture array sent to the shader. You can use this RID with the RenderingServer to set it as a shader parameter for a sampler2DArray uniform in your own shader. See [url=https://terrain3d.readthedocs.io/en/stable/docs/tips.html#using-the-generated-height-map-in-other-shaders]Tips[/url] for an example. diff --git a/doc/classes/Terrain3DEditor.xml b/doc/doc_classes/Terrain3DEditor.xml similarity index 98% rename from doc/classes/Terrain3DEditor.xml rename to doc/doc_classes/Terrain3DEditor.xml index 546a6d24..271f41de 100644 --- a/doc/classes/Terrain3DEditor.xml +++ b/doc/doc_classes/Terrain3DEditor.xml @@ -1,5 +1,5 @@ - + diff --git a/doc/classes/Terrain3DInstancer.xml b/doc/doc_classes/Terrain3DInstancer.xml similarity index 98% rename from doc/classes/Terrain3DInstancer.xml rename to doc/doc_classes/Terrain3DInstancer.xml index f0c3ce68..270f1b46 100644 --- a/doc/classes/Terrain3DInstancer.xml +++ b/doc/doc_classes/Terrain3DInstancer.xml @@ -1,5 +1,5 @@ - + diff --git a/doc/classes/Terrain3DMaterial.xml b/doc/doc_classes/Terrain3DMaterial.xml similarity index 99% rename from doc/classes/Terrain3DMaterial.xml rename to doc/doc_classes/Terrain3DMaterial.xml index 932e9ad0..3c1251e4 100644 --- a/doc/classes/Terrain3DMaterial.xml +++ b/doc/doc_classes/Terrain3DMaterial.xml @@ -1,5 +1,5 @@ - + A custom shader material resource for Terrain3D. diff --git a/doc/classes/Terrain3DMeshAsset.xml b/doc/doc_classes/Terrain3DMeshAsset.xml similarity index 98% rename from doc/classes/Terrain3DMeshAsset.xml rename to doc/doc_classes/Terrain3DMeshAsset.xml index e5d1f959..61f34cb1 100644 --- a/doc/classes/Terrain3DMeshAsset.xml +++ b/doc/doc_classes/Terrain3DMeshAsset.xml @@ -1,5 +1,5 @@ - + diff --git a/doc/classes/Terrain3DRegion.xml b/doc/doc_classes/Terrain3DRegion.xml similarity index 94% rename from doc/classes/Terrain3DRegion.xml rename to doc/doc_classes/Terrain3DRegion.xml index 1d71d221..7dbe84f9 100644 --- a/doc/classes/Terrain3DRegion.xml +++ b/doc/doc_classes/Terrain3DRegion.xml @@ -1,9 +1,9 @@ - + - This resource stores all map data for Terrain3D. See [url=../docs/controlmap_format.html]Controlmap Format[/url] and [url=../docs/data_format.html]Data Format Changelog[/url]. + This resource stores all map data for Terrain3D. See [url=https://terrain3d.readthedocs.io/en/stable/docs/controlmap_format.html]Controlmap Format[/url] and [url=https://terrain3d.readthedocs.io/en/stable/docs/controlmap_format.html]Data Format Changelog[/url]. @@ -119,7 +119,7 @@ This map tells the shader which textures to use where, how to blend, where to place holes, etc. Image format: FORMAT_RF, 32-bit per pixel as full-precision floating-point. - However, we interpret these images as format: [url=https://docs.godotengine.org/en/stable/classes/class_renderingdevice.html#class-renderingdevice-constant-data-format-r32-uint]RenderingDevice.DATA_FORMAT_R32_UINT[/url] aka OpenGL RG32UI 32-bit per pixel as unsigned integer. See [url=../docs/controlmap_format.html]Control map format[/url]. + However, we interpret these images as format: [url=https://docs.godotengine.org/en/stable/classes/class_renderingdevice.html#class-renderingdevice-constant-data-format-r32-uint]RenderingDevice.DATA_FORMAT_R32_UINT[/url] aka OpenGL RG32UI 32-bit per pixel as unsigned integer. See [url=https://terrain3d.readthedocs.io/en/stable/docs/controlmap_format.html]Control map format[/url]. This region is marked for deletion. It won't be rendered once [method Terrain3DData.force_update_maps] rebuilds the map index. The file will be deleted from disk on [method save]. diff --git a/doc/classes/Terrain3DTextureAsset.xml b/doc/doc_classes/Terrain3DTextureAsset.xml similarity index 92% rename from doc/classes/Terrain3DTextureAsset.xml rename to doc/doc_classes/Terrain3DTextureAsset.xml index b6511950..79825421 100644 --- a/doc/classes/Terrain3DTextureAsset.xml +++ b/doc/doc_classes/Terrain3DTextureAsset.xml @@ -1,9 +1,9 @@ - + - A set of texture files and settings that gets added to a [Terrain3DAssets] resource. Textures must be prepared according to the [url=../docs/texture_prep.html]documentation[/url]. + A set of texture files and settings that gets added to a [Terrain3DAssets] resource. Textures must be prepared according to the [url=https://terrain3d.readthedocs.io/en/stable/docs/texture_prep.html]documentation[/url]. diff --git a/doc/classes/Terrain3DUtil.xml b/doc/doc_classes/Terrain3DUtil.xml similarity index 99% rename from doc/classes/Terrain3DUtil.xml rename to doc/doc_classes/Terrain3DUtil.xml index b392f005..b465ada8 100644 --- a/doc/classes/Terrain3DUtil.xml +++ b/doc/doc_classes/Terrain3DUtil.xml @@ -1,5 +1,5 @@ - +