Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed XML API documentation into the engine #510

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
20 changes: 10 additions & 10 deletions Terrain3D.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,16 @@
<Text Include="src\shaders\gpu_depth.glsl" />
</ItemGroup>
<ItemGroup>
<Xml Include="doc\classes\Terrain3D.xml" />
<Xml Include="doc\classes\Terrain3DData.xml" />
<Xml Include="doc\classes\Terrain3DEditor.xml" />
<Xml Include="doc\classes\Terrain3DInstancer.xml" />
<Xml Include="doc\classes\Terrain3DMaterial.xml" />
<Xml Include="doc\classes\Terrain3DMeshAsset.xml" />
<Xml Include="doc\classes\Terrain3DRegion.xml" />
<Xml Include="doc\classes\Terrain3DTextureAsset.xml" />
<Xml Include="doc\classes\Terrain3DAssets.xml" />
<Xml Include="doc\classes\Terrain3DUtil.xml" />
<Xml Include="doc\doc_classes\Terrain3D.xml" />
<Xml Include="doc\doc_classes\Terrain3DData.xml" />
<Xml Include="doc\doc_classes\Terrain3DEditor.xml" />
<Xml Include="doc\doc_classes\Terrain3DInstancer.xml" />
<Xml Include="doc\doc_classes\Terrain3DMaterial.xml" />
<Xml Include="doc\doc_classes\Terrain3DMeshAsset.xml" />
<Xml Include="doc\doc_classes\Terrain3DRegion.xml" />
<Xml Include="doc\doc_classes\Terrain3DTextureAsset.xml" />
<Xml Include="doc\doc_classes\Terrain3DAssets.xml" />
<Xml Include="doc\doc_classes\Terrain3DUtil.xml" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
20 changes: 10 additions & 10 deletions Terrain3D.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -299,34 +299,34 @@
</Text>
</ItemGroup>
<ItemGroup>
<Xml Include="doc\classes\Terrain3D.xml">
<Xml Include="doc\doc_classes\Terrain3D.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DEditor.xml">
<Xml Include="doc\doc_classes\Terrain3DAssets.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DMaterial.xml">
<Xml Include="doc\doc_classes\Terrain3DData.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DTextureAsset.xml">
<Xml Include="doc\doc_classes\Terrain3DEditor.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DAssets.xml">
<Xml Include="doc\doc_classes\Terrain3DInstancer.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DUtil.xml">
<Xml Include="doc\doc_classes\Terrain3DMaterial.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DInstancer.xml">
<Xml Include="doc\doc_classes\Terrain3DMeshAsset.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DMeshAsset.xml">
<Xml Include="doc\doc_classes\Terrain3DRegion.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DData.xml">
<Xml Include="doc\doc_classes\Terrain3DTextureAsset.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DRegion.xml">
<Xml Include="doc\doc_classes\Terrain3DUtil.xml">
<Filter>3. XML</Filter>
</Xml>
</ItemGroup>
Expand Down
286 changes: 143 additions & 143 deletions doc/api/class_terrain3d.rst

Large diffs are not rendered by default.

94 changes: 47 additions & 47 deletions doc/api/class_terrain3dassets.rst

Large diffs are not rendered by default.

466 changes: 233 additions & 233 deletions doc/api/class_terrain3ddata.rst

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions doc/api/class_terrain3deditor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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<class_Object>`
**Inherits:** ``Object``

.. rst-class:: classref-introduction-group

Expand All @@ -27,33 +27,33 @@ Methods
.. table::
:widths: auto

+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`apply_undo<class_Terrain3DEditor_method_apply_undo>`\ (\ data\: :ref:`Dictionary<class_Dictionary>`\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`backup_region<class_Terrain3DEditor_method_backup_region>`\ (\ region\: :ref:`Terrain3DRegion<class_Terrain3DRegion>`\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Operation<enum_Terrain3DEditor_Operation>` | :ref:`get_operation<class_Terrain3DEditor_method_get_operation>`\ (\ ) |const| |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Terrain3D<class_Terrain3D>` | :ref:`get_terrain<class_Terrain3DEditor_method_get_terrain>`\ (\ ) |const| |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Tool<enum_Terrain3DEditor_Tool>` | :ref:`get_tool<class_Terrain3DEditor_method_get_tool>`\ (\ ) |const| |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_operating<class_Terrain3DEditor_method_is_operating>`\ (\ ) |const| |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`operate<class_Terrain3DEditor_method_operate>`\ (\ position\: :ref:`Vector3<class_Vector3>`, camera_direction\: :ref:`float<class_float>`\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_brush_data<class_Terrain3DEditor_method_set_brush_data>`\ (\ data\: :ref:`Dictionary<class_Dictionary>`\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_operation<class_Terrain3DEditor_method_set_operation>`\ (\ operation\: :ref:`Operation<enum_Terrain3DEditor_Operation>`\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_terrain<class_Terrain3DEditor_method_set_terrain>`\ (\ terrain\: :ref:`Terrain3D<class_Terrain3D>`\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_tool<class_Terrain3DEditor_method_set_tool>`\ (\ tool\: :ref:`Tool<enum_Terrain3DEditor_Tool>`\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`start_operation<class_Terrain3DEditor_method_start_operation>`\ (\ position\: :ref:`Vector3<class_Vector3>`\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`stop_operation<class_Terrain3DEditor_method_stop_operation>`\ (\ ) |
+--------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`apply_undo<class_Terrain3DEditor_method_apply_undo>`\ (\ data\: ``Dictionary``\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`backup_region<class_Terrain3DEditor_method_backup_region>`\ (\ region\: :ref:`Terrain3DRegion<class_Terrain3DRegion>`\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Operation<enum_Terrain3DEditor_Operation>` | :ref:`get_operation<class_Terrain3DEditor_method_get_operation>`\ (\ ) |const| |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Terrain3D<class_Terrain3D>` | :ref:`get_terrain<class_Terrain3DEditor_method_get_terrain>`\ (\ ) |const| |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Tool<enum_Terrain3DEditor_Tool>` | :ref:`get_tool<class_Terrain3DEditor_method_get_tool>`\ (\ ) |const| |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| ``bool`` | :ref:`is_operating<class_Terrain3DEditor_method_is_operating>`\ (\ ) |const| |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`operate<class_Terrain3DEditor_method_operate>`\ (\ position\: ``Vector3``, camera_direction\: ``float``\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_brush_data<class_Terrain3DEditor_method_set_brush_data>`\ (\ data\: ``Dictionary``\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_operation<class_Terrain3DEditor_method_set_operation>`\ (\ operation\: :ref:`Operation<enum_Terrain3DEditor_Operation>`\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_terrain<class_Terrain3DEditor_method_set_terrain>`\ (\ terrain\: :ref:`Terrain3D<class_Terrain3D>`\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_tool<class_Terrain3DEditor_method_set_tool>`\ (\ tool\: :ref:`Tool<enum_Terrain3DEditor_Tool>`\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`start_operation<class_Terrain3DEditor_method_start_operation>`\ (\ position\: ``Vector3``\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`stop_operation<class_Terrain3DEditor_method_stop_operation>`\ (\ ) |
+--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+

.. rst-class:: classref-section-separator

Expand Down Expand Up @@ -249,7 +249,7 @@ Method Descriptions

.. rst-class:: classref-method

|void| **apply_undo**\ (\ data\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_Terrain3DEditor_method_apply_undo>`
|void| **apply_undo**\ (\ data\: ``Dictionary``\ ) :ref:`🔗<class_Terrain3DEditor_method_apply_undo>`

Undo the previous changes, with the provided data. Used by Godot, not gamedevs.

Expand Down Expand Up @@ -309,7 +309,7 @@ Returns the current tool selected in the editor plugin.

.. rst-class:: classref-method

:ref:`bool<class_bool>` **is_operating**\ (\ ) |const| :ref:`🔗<class_Terrain3DEditor_method_is_operating>`
``bool`` **is_operating**\ (\ ) |const| :ref:`🔗<class_Terrain3DEditor_method_is_operating>`

Returns true if currently in the middle of a brushing operation.

Expand All @@ -321,7 +321,7 @@ Returns true if currently in the middle of a brushing operation.

.. rst-class:: classref-method

|void| **operate**\ (\ position\: :ref:`Vector3<class_Vector3>`, camera_direction\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Terrain3DEditor_method_operate>`
|void| **operate**\ (\ position\: ``Vector3``, camera_direction\: ``float``\ ) :ref:`🔗<class_Terrain3DEditor_method_operate>`

Start brushing.

Expand All @@ -333,7 +333,7 @@ Start brushing.

.. rst-class:: classref-method

|void| **set_brush_data**\ (\ data\: :ref:`Dictionary<class_Dictionary>`\ ) :ref:`🔗<class_Terrain3DEditor_method_set_brush_data>`
|void| **set_brush_data**\ (\ data\: ``Dictionary``\ ) :ref:`🔗<class_Terrain3DEditor_method_set_brush_data>`

Sets all brush settings used in the editor plugin.

Expand Down Expand Up @@ -381,7 +381,7 @@ Sets the tool selected in the editor plugin.

.. rst-class:: classref-method

|void| **start_operation**\ (\ position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_Terrain3DEditor_method_start_operation>`
|void| **start_operation**\ (\ position\: ``Vector3``\ ) :ref:`🔗<class_Terrain3DEditor_method_start_operation>`

Begin a sculpting or painting operation.

Expand Down
Loading
Loading