Skip to content

Commit

Permalink
Remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Oct 30, 2024
1 parent a16cf11 commit deecc41
Show file tree
Hide file tree
Showing 31 changed files with 30 additions and 1,333 deletions.
5 changes: 0 additions & 5 deletions Terrain3D.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
<ClInclude Include="src\terrain_3d_texture_asset.h" />
<ClInclude Include="src\terrain_3d_util.h" />
<ClInclude Include="src\terrain_3d_material.h" />
<ClInclude Include="src\terrain_3d_storage.h" />
<ClInclude Include="src\terrain_3d_assets.h" />
</ItemGroup>
<ItemGroup>
Expand All @@ -168,7 +167,6 @@
<ClCompile Include="src\terrain_3d_material.cpp" />
<ClCompile Include="src\terrain_3d_mesh_asset.cpp" />
<ClCompile Include="src\terrain_3d_region.cpp" />
<ClCompile Include="src\terrain_3d_storage.cpp" />
<ClCompile Include="src\terrain_3d_texture_asset.cpp" />
<ClCompile Include="src\terrain_3d_assets.cpp" />
<ClCompile Include="src\terrain_3d_util.cpp" />
Expand Down Expand Up @@ -245,11 +243,8 @@
<Xml Include="doc\classes\Terrain3DMaterial.xml" />
<Xml Include="doc\classes\Terrain3DMeshAsset.xml" />
<Xml Include="doc\classes\Terrain3DRegion.xml" />
<Xml Include="doc\classes\Terrain3DStorage.xml" />
<Xml Include="doc\classes\Terrain3DTexture.xml" />
<Xml Include="doc\classes\Terrain3DTextureAsset.xml" />
<Xml Include="doc\classes\Terrain3DAssets.xml" />
<Xml Include="doc\classes\Terrain3DTextureList.xml" />
<Xml Include="doc\classes\Terrain3DUtil.xml" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
15 changes: 0 additions & 15 deletions Terrain3D.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
<ClInclude Include="src\terrain_3d_editor.h">
<Filter>5. Headers</Filter>
</ClInclude>
<ClInclude Include="src\terrain_3d_storage.h">
<Filter>5. Headers</Filter>
</ClInclude>
<ClInclude Include="src\terrain_3d_material.h">
<Filter>5. Headers</Filter>
</ClInclude>
Expand Down Expand Up @@ -89,9 +86,6 @@
<ClCompile Include="src\terrain_3d_editor.cpp">
<Filter>6. C++</Filter>
</ClCompile>
<ClCompile Include="src\terrain_3d_storage.cpp">
<Filter>6. C++</Filter>
</ClCompile>
<ClCompile Include="src\terrain_3d_texture_asset.cpp">
<Filter>6. C++</Filter>
</ClCompile>
Expand Down Expand Up @@ -314,9 +308,6 @@
<Xml Include="doc\classes\Terrain3DMaterial.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DStorage.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DTextureAsset.xml">
<Filter>3. XML</Filter>
</Xml>
Expand All @@ -329,15 +320,9 @@
<Xml Include="doc\classes\Terrain3DInstancer.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DTextureList.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DMeshAsset.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DTexture.xml">
<Filter>3. XML</Filter>
</Xml>
<Xml Include="doc\classes\Terrain3DData.xml">
<Filter>3. XML</Filter>
</Xml>
Expand Down
52 changes: 0 additions & 52 deletions doc/api/class_terrain3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ Properties
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
| :ref:`bool<class_bool>` | :ref:`show_grid<class_Terrain3D_property_show_grid>` | ``false`` |
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DStorage<class_Terrain3DStorage>` | :ref:`storage<class_Terrain3D_property_storage>` | |
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
| :ref:`Terrain3DTextureList<class_Terrain3DTextureList>` | :ref:`texture_list<class_Terrain3D_property_texture_list>` | |
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
| :ref:`String<class_String>` | :ref:`version<class_Terrain3D_property_version>` | ``"1.0.0-dev"`` |
+------------------------------------------------------------------------+------------------------------------------------------------------------+-----------------+
| :ref:`float<class_float>` | :ref:`vertex_spacing<class_Terrain3D_property_vertex_spacing>` | ``1.0`` |
Expand Down Expand Up @@ -116,8 +112,6 @@ Methods
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_plugin<class_Terrain3D_method_set_plugin>`\ (\ plugin\: :ref:`EditorPlugin<class_EditorPlugin>`\ ) |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`split_storage<class_Terrain3D_method_split_storage>`\ (\ ) |
+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

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

Expand Down Expand Up @@ -647,40 +641,6 @@ Draws the region grid directly on the terrain. This is more accurate than the re

----

.. _class_Terrain3D_property_storage:

.. rst-class:: classref-property

:ref:`Terrain3DStorage<class_Terrain3DStorage>` **storage** :ref:`🔗<class_Terrain3D_property_storage>`

.. rst-class:: classref-property-setget

- |void| **set_storage**\ (\ value\: :ref:`Terrain3DStorage<class_Terrain3DStorage>`\ )
- :ref:`Terrain3DStorage<class_Terrain3DStorage>` **get_storage**\ (\ )

This object is deprecated and only used for upgrading. Don't use.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3D_property_texture_list:

.. rst-class:: classref-property

:ref:`Terrain3DTextureList<class_Terrain3DTextureList>` **texture_list** :ref:`🔗<class_Terrain3D_property_texture_list>`

.. rst-class:: classref-property-setget

- |void| **set_texture_list**\ (\ value\: :ref:`Terrain3DTextureList<class_Terrain3DTextureList>`\ )
- :ref:`Terrain3DTextureList<class_Terrain3DTextureList>` **get_texture_list**\ (\ )

Deprecated. See :ref:`assets<class_Terrain3D_property_assets>`.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3D_property_version:

.. rst-class:: classref-property
Expand Down Expand Up @@ -875,18 +835,6 @@ Sets the current Terrain3DEditor instance.

Sets the EditorPlugin connected to Terrain3D.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3D_method_split_storage:

.. rst-class:: classref-method

|void| **split_storage**\ (\ ) :ref:`🔗<class_Terrain3D_method_split_storage>`

This function is deprecated. It facilitates upgrading the previous storage version to the new format.

.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
Expand Down
14 changes: 7 additions & 7 deletions doc/api/class_terrain3dinstancer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Terrain3DInstancer
Description
-----------

This class places mesh instances into MultiMeshInstance3Ds defined in the Terrain3D asset dock.
This class places mesh instances defined in the Terrain3D asset dock into MultiMeshInstance3Ds on the ground.

Data is currently stored in MultiMeshes within a Dictionary :ref:`Terrain3DRegion.multimeshes<class_Terrain3DRegion_property_multimeshes>`, per region, per mesh type. These MultiMeshes are loaded into MultiMeshInstances, which are attached to the scene tree and managed by this class.
Data is currently stored in :ref:`Terrain3DRegion.instances<class_Terrain3DRegion_property_instances>` and loaded into MultiMeshInstances, which are attached to the scene tree and managed by this class.

\ **The methods available for adding instances are:**\

Expand All @@ -29,15 +29,15 @@ Data is currently stored in MultiMeshes within a Dictionary :ref:`Terrain3DRegio

- :ref:`add_transforms<class_Terrain3DInstancer_method_add_transforms>` - Accepts your list of transforms and parses them into our data storage.

- Creating your own MultiMesh resources and inserting them directly into the :ref:`Terrain3DRegion.multimeshes<class_Terrain3DRegion_property_multimeshes>` dictionary. It's not difficult to do this in GDScript, but a thorough understanding of the C++ code in this class is recommended. Specifically look at `update_multimesh()`.
- Creating your own instance data and inserting it directly into :ref:`Terrain3DRegion.instances<class_Terrain3DRegion_property_instances>`. It's not difficult to do this in GDScript, but a thorough understanding of the C++ code in this class is recommended.

\ **The methods available for removing instances are:**\

- :ref:`remove_instances<class_Terrain3DInstancer_method_remove_instances>` - Like add_instances, this is can be used procedurally but is designed for hand editing.

- :ref:`clear_by_mesh<class_Terrain3DInstancer_method_clear_by_mesh>`, :ref:`clear_by_location<class_Terrain3DInstancer_method_clear_by_location>` - To erase large sections of instances

\ **Note:** one caveat about creating your own MultiMeshes is the instance count cannot be changed after creation. Should you wish to remove 50% of the transforms, you would need to make a new MultiMesh, copy over the mesh and settings, copy the 50% of the transforms you wish to keep, and assign it to the MultiMeshInstance3D. That is how the instancer updates the MMIs.
After modifying region data, run :ref:`force_update_mmis<class_Terrain3DInstancer_method_force_update_mmis>` to rebuild the MultiMeshInstance3Ds.

.. rst-class:: classref-reftable-group

Expand Down Expand Up @@ -210,7 +210,7 @@ Dumps the instancer data arrays and dictionaries for all regions.

|void| **dump_mmis**\ (\ ) :ref:`🔗<class_Terrain3DInstancer_method_dump_mmis>`

Dumps the MultiMeshInstances attached to the tree and information about the nodes for all regions.
Dumps the MultiMeshInstance3Ds attached to the tree and information about the nodes for all regions.

.. rst-class:: classref-item-separator

Expand All @@ -222,7 +222,7 @@ Dumps the MultiMeshInstances attached to the tree and information about the node

|void| **force_update_mmis**\ (\ ) :ref:`🔗<class_Terrain3DInstancer_method_force_update_mmis>`

Removes and rebuilds all MultiMeshInstances.
Removes and rebuilds all MultiMeshInstance3Ds attached to the tree.

.. rst-class:: classref-item-separator

Expand All @@ -246,7 +246,7 @@ Uses parameters asset_id, size, strength, fixed_scale, random_scale, to randomly

|void| **swap_ids**\ (\ src_id\: :ref:`int<class_int>`, dest_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Terrain3DInstancer_method_swap_ids>`

Swaps the ID of two meshes, without changing the mesh instances on the ground. Updates Multimesh and MMI dictionary keys.
Swaps the ID of two meshes without changing the mesh instances on the ground.

.. rst-class:: classref-item-separator

Expand Down
27 changes: 4 additions & 23 deletions doc/api/class_terrain3dregion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ Properties
+-------------------------------------+----------------------------------------------------------------------+-------------------+
| :ref:`bool<class_bool>` | :ref:`modified<class_Terrain3DRegion_property_modified>` | |
+-------------------------------------+----------------------------------------------------------------------+-------------------+
| :ref:`Dictionary<class_Dictionary>` | :ref:`multimeshes<class_Terrain3DRegion_property_multimeshes>` | ``{}`` |
+-------------------------------------+----------------------------------------------------------------------+-------------------+
| :ref:`int<class_int>` | :ref:`region_size<class_Terrain3DRegion_property_region_size>` | ``0`` |
+-------------------------------------+----------------------------------------------------------------------+-------------------+
| :ref:`float<class_float>` | :ref:`version<class_Terrain3DRegion_property_version>` | ``0.8`` |
Expand Down Expand Up @@ -280,17 +278,17 @@ The current minimum and maximum height range for this region, used to calculate

A Dictionary that stores the instancer transforms for this region.

The format is instances{mesh_id:int} -> cells{grid_location:Vector2i} -> ( Array\ :ref:`Transform3D<class_Transform3D>`, PackedColorArray, modified:bool ). That is:
The format is instances{mesh_id:int} -> cells{grid_location:Vector2i} -> ( Array:Transform3D, PackedColorArray, modified:bool ). That is:

- A dictionary keyed by mesh_id that returns:
- A Dictionary keyed by mesh_id that returns:

- A dictionary keyed by the grid location of the 32 x 32m cell that returns:
- A Dictionary keyed by the grid location of the 32 x 32m cell that returns:

- A 3-item Array that contains:

- 0: An Array of Transform3Ds

- 1: A PackedColorArray
- 1: A PackedColorArray with instance colors, same index as above

- 2: A bool that tracks if this cell has been modified

Expand Down Expand Up @@ -334,23 +332,6 @@ This region has been modified and will be saved.

----

.. _class_Terrain3DRegion_property_multimeshes:

.. rst-class:: classref-property

:ref:`Dictionary<class_Dictionary>` **multimeshes** = ``{}`` :ref:`🔗<class_Terrain3DRegion_property_multimeshes>`

.. rst-class:: classref-property-setget

- |void| **set_multimeshes**\ (\ value\: :ref:`Dictionary<class_Dictionary>`\ )
- :ref:`Dictionary<class_Dictionary>` **get_multimeshes**\ (\ )

Deprecated and only exists for upgrading. Use :ref:`instances<class_Terrain3DRegion_property_instances>`.

.. rst-class:: classref-item-separator

----

.. _class_Terrain3DRegion_property_region_size:

.. rst-class:: classref-property
Expand Down
Loading

0 comments on commit deecc41

Please sign in to comment.