From ac18664faec2d84be7c154dec0a271b7cd63fb99 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 25 Dec 2019 14:08:20 +0100 Subject: [PATCH] Doc setup. --- config.py | 44 ++ doc_classes/EnvironmentData.xml | 109 ++++ doc_classes/GridMap.xml | 225 -------- doc_classes/GroundClutter.xml | 89 +++ doc_classes/GroundClutterFoliage.xml | 43 ++ doc_classes/PropData.xml | 109 ++++ doc_classes/PropDataEntity.xml | 19 + doc_classes/PropDataEntry.xml | 17 + doc_classes/PropDataLight.xml | 19 + doc_classes/PropDataMesh.xml | 23 + doc_classes/PropDataProp.xml | 21 + doc_classes/PropDataScene.xml | 21 + doc_classes/TransvoxelCellData.xml | 59 ++ doc_classes/VoxelChunk.xml | 737 +++++++++++++++++++++++++ doc_classes/VoxelChunkPropData.xml | 39 ++ doc_classes/VoxelCubePoints.xml | 369 +++++++++++++ doc_classes/VoxelLight.xml | 49 ++ doc_classes/VoxelMesher.xml | 285 ++++++++++ doc_classes/VoxelMesherCubic.xml | 13 + doc_classes/VoxelMesherTransvoxel.xml | 215 ++++++++ doc_classes/VoxelStructure.xml | 113 ++++ doc_classes/VoxelSurface.xml | 65 +++ doc_classes/VoxelSurfaceMerger.xml | 63 +++ doc_classes/VoxelSurfaceSimple.xml | 63 +++ doc_classes/VoxelWorld.xml | 247 +++++++++ doc_classes/VoxelmanLevelGenerator.xml | 29 + doc_classes/VoxelmanLibrary.xml | 133 +++++ doc_classes/VoxelmanLibraryMerger.xml | 29 + doc_classes/VoxelmanLibrarySimple.xml | 23 + doc_classes/VoxelmanQueue.xml | 41 ++ doc_classes/VoxelmanUnboundedQueue.xml | 33 ++ doc_classes/WorldArea.xml | 25 + meshes/editor_import_collada_mdr.cpp | 88 --- meshes/editor_import_collada_mdr.h | 42 -- meshes/editor_plugin_collada_mdr.cpp | 22 - meshes/editor_plugin_collada_mdr.h | 25 - meshes/mesh_data_resource.cpp | 20 - meshes/mesh_data_resource.h | 27 - meshes/mesh_registry.cpp | 20 - meshes/mesh_registry.h | 27 - 40 files changed, 3144 insertions(+), 496 deletions(-) create mode 100644 doc_classes/EnvironmentData.xml delete mode 100644 doc_classes/GridMap.xml create mode 100644 doc_classes/GroundClutter.xml create mode 100644 doc_classes/GroundClutterFoliage.xml create mode 100644 doc_classes/PropData.xml create mode 100644 doc_classes/PropDataEntity.xml create mode 100644 doc_classes/PropDataEntry.xml create mode 100644 doc_classes/PropDataLight.xml create mode 100644 doc_classes/PropDataMesh.xml create mode 100644 doc_classes/PropDataProp.xml create mode 100644 doc_classes/PropDataScene.xml create mode 100644 doc_classes/TransvoxelCellData.xml create mode 100644 doc_classes/VoxelChunk.xml create mode 100644 doc_classes/VoxelChunkPropData.xml create mode 100644 doc_classes/VoxelCubePoints.xml create mode 100644 doc_classes/VoxelLight.xml create mode 100644 doc_classes/VoxelMesher.xml create mode 100644 doc_classes/VoxelMesherCubic.xml create mode 100644 doc_classes/VoxelMesherTransvoxel.xml create mode 100644 doc_classes/VoxelStructure.xml create mode 100644 doc_classes/VoxelSurface.xml create mode 100644 doc_classes/VoxelSurfaceMerger.xml create mode 100644 doc_classes/VoxelSurfaceSimple.xml create mode 100644 doc_classes/VoxelWorld.xml create mode 100644 doc_classes/VoxelmanLevelGenerator.xml create mode 100644 doc_classes/VoxelmanLibrary.xml create mode 100644 doc_classes/VoxelmanLibraryMerger.xml create mode 100644 doc_classes/VoxelmanLibrarySimple.xml create mode 100644 doc_classes/VoxelmanQueue.xml create mode 100644 doc_classes/VoxelmanUnboundedQueue.xml create mode 100644 doc_classes/WorldArea.xml delete mode 100644 meshes/editor_import_collada_mdr.cpp delete mode 100644 meshes/editor_import_collada_mdr.h delete mode 100644 meshes/editor_plugin_collada_mdr.cpp delete mode 100644 meshes/editor_plugin_collada_mdr.h delete mode 100644 meshes/mesh_data_resource.cpp delete mode 100644 meshes/mesh_data_resource.h delete mode 100644 meshes/mesh_registry.cpp delete mode 100644 meshes/mesh_registry.h diff --git a/config.py b/config.py index 9e2955d..8a44609 100644 --- a/config.py +++ b/config.py @@ -8,4 +8,48 @@ def configure(env): pass +def get_doc_classes(): + return [ + "WorldArea", + + "GroundClutterFoliage", + "GroundClutter", + + "VoxelmanQueue", + "VoxelmanUnboundedQueue", + "VoxelLight", + + "VoxelmanLevelGenerator", + + "VoxelSurfaceMerger", + "VoxelSurfaceSimple", + "VoxelSurface", + "VoxelmanLibraryMerger", + "VoxelmanLibrarySimple", + "VoxelmanLibrary", + + "VoxelCubePoints", + "VoxelMesherCubic", + "TransvoxelCellData", + "VoxelMeshData", + "VoxelMesherTransvoxel", + "VoxelMesher", + + "PropDataEntity", + "PropDataEntry", + "PropDataLight", + "PropDataMesh", + "PropDataProp", + "PropDataScene", + "PropData", + + "EnvironmentData", + "VoxelChunkPropData", + "VoxelChunk", + "VoxelStructure", + "VoxelWorld", + ] + +def get_doc_path(): + return "doc_classes" diff --git a/doc_classes/EnvironmentData.xml b/doc_classes/EnvironmentData.xml new file mode 100644 index 0000000..8b164b1 --- /dev/null +++ b/doc_classes/EnvironmentData.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/GridMap.xml b/doc_classes/GridMap.xml deleted file mode 100644 index f8f9fc1..0000000 --- a/doc_classes/GridMap.xml +++ /dev/null @@ -1,225 +0,0 @@ - - - - Node for 3D tile-based maps. - - - GridMap lets you place meshes on a grid interactively. It works both from the editor and can help you create in-game level editors. - GridMaps use a [MeshLibrary] which contain a list of tiles: meshes with materials plus optional collisions and extra elements. - A GridMap contains a collection of cells. Each grid cell refers to a [MeshLibrary] item. All cells in the map have the same dimensions. - A GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells. - - - https://docs.godotengine.org/en/latest/tutorials/3d/using_gridmaps.html - - - - - - - Clear all cells. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The [MeshLibrary] item index located at the grid-based X, Y and Z coordinates. If the cell is empty, [constant INVALID_CELL_ITEM] will be returned. - - - - - - - - - - - - - The orientation of the cell at the grid-based X, Y and Z coordinates. -1 is returned if the cell is empty. - - - - - - - - - - - - - - - - - - - - - - - Array of [Transform] and [Mesh] references corresponding to the non empty cells in the grid. The transforms are specified in world space. - - - - - - - Array of [Vector3] with the non empty cell coordinates in the grid map. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Set the mesh index for the cell referenced by its grid-based X, Y and Z coordinates. - A negative item index will clear the cell. - Optionally, the item's orientation can be passed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - If [code]true[/code], grid items are centered on the X axis. - - - If [code]true[/code], grid items are centered on the Y axis. - - - If [code]true[/code], grid items are centered on the Z axis. - - - The size of each octant measured in number of cells. This applies to all three axis. - - - - - The dimensions of the grid's cells. - - - - - - - The assigned [MeshLibrary]. - - - Deprecated, use [member mesh_library] instead. - - - - - Invalid cell item that can be used in [method set_cell_item] to clear cells (or represent an empty cell in [method get_cell_item]). - - - diff --git a/doc_classes/GroundClutter.xml b/doc_classes/GroundClutter.xml new file mode 100644 index 0000000..bea5a96 --- /dev/null +++ b/doc_classes/GroundClutter.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/GroundClutterFoliage.xml b/doc_classes/GroundClutterFoliage.xml new file mode 100644 index 0000000..0c90e69 --- /dev/null +++ b/doc_classes/GroundClutterFoliage.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/PropData.xml b/doc_classes/PropData.xml new file mode 100644 index 0000000..2717e37 --- /dev/null +++ b/doc_classes/PropData.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/PropDataEntity.xml b/doc_classes/PropDataEntity.xml new file mode 100644 index 0000000..afac66c --- /dev/null +++ b/doc_classes/PropDataEntity.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/PropDataEntry.xml b/doc_classes/PropDataEntry.xml new file mode 100644 index 0000000..df366ce --- /dev/null +++ b/doc_classes/PropDataEntry.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/doc_classes/PropDataLight.xml b/doc_classes/PropDataLight.xml new file mode 100644 index 0000000..0065681 --- /dev/null +++ b/doc_classes/PropDataLight.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/PropDataMesh.xml b/doc_classes/PropDataMesh.xml new file mode 100644 index 0000000..6401c68 --- /dev/null +++ b/doc_classes/PropDataMesh.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/PropDataProp.xml b/doc_classes/PropDataProp.xml new file mode 100644 index 0000000..d017226 --- /dev/null +++ b/doc_classes/PropDataProp.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/PropDataScene.xml b/doc_classes/PropDataScene.xml new file mode 100644 index 0000000..a703c9b --- /dev/null +++ b/doc_classes/PropDataScene.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/TransvoxelCellData.xml b/doc_classes/TransvoxelCellData.xml new file mode 100644 index 0000000..3749eb7 --- /dev/null +++ b/doc_classes/TransvoxelCellData.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelChunk.xml b/doc_classes/VoxelChunk.xml new file mode 100644 index 0000000..53b95d3 --- /dev/null +++ b/doc_classes/VoxelChunk.xml @@ -0,0 +1,737 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelChunkPropData.xml b/doc_classes/VoxelChunkPropData.xml new file mode 100644 index 0000000..cc25adf --- /dev/null +++ b/doc_classes/VoxelChunkPropData.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelCubePoints.xml b/doc_classes/VoxelCubePoints.xml new file mode 100644 index 0000000..04608ea --- /dev/null +++ b/doc_classes/VoxelCubePoints.xml @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelLight.xml b/doc_classes/VoxelLight.xml new file mode 100644 index 0000000..936ca3e --- /dev/null +++ b/doc_classes/VoxelLight.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelMesher.xml b/doc_classes/VoxelMesher.xml new file mode 100644 index 0000000..5a262d5 --- /dev/null +++ b/doc_classes/VoxelMesher.xml @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelMesherCubic.xml b/doc_classes/VoxelMesherCubic.xml new file mode 100644 index 0000000..fa47044 --- /dev/null +++ b/doc_classes/VoxelMesherCubic.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/doc_classes/VoxelMesherTransvoxel.xml b/doc_classes/VoxelMesherTransvoxel.xml new file mode 100644 index 0000000..92b3bbb --- /dev/null +++ b/doc_classes/VoxelMesherTransvoxel.xml @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelStructure.xml b/doc_classes/VoxelStructure.xml new file mode 100644 index 0000000..d940e17 --- /dev/null +++ b/doc_classes/VoxelStructure.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelSurface.xml b/doc_classes/VoxelSurface.xml new file mode 100644 index 0000000..4c4725a --- /dev/null +++ b/doc_classes/VoxelSurface.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelSurfaceMerger.xml b/doc_classes/VoxelSurfaceMerger.xml new file mode 100644 index 0000000..87882a7 --- /dev/null +++ b/doc_classes/VoxelSurfaceMerger.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelSurfaceSimple.xml b/doc_classes/VoxelSurfaceSimple.xml new file mode 100644 index 0000000..f91806c --- /dev/null +++ b/doc_classes/VoxelSurfaceSimple.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelWorld.xml b/doc_classes/VoxelWorld.xml new file mode 100644 index 0000000..a15ab49 --- /dev/null +++ b/doc_classes/VoxelWorld.xml @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelmanLevelGenerator.xml b/doc_classes/VoxelmanLevelGenerator.xml new file mode 100644 index 0000000..35a11ae --- /dev/null +++ b/doc_classes/VoxelmanLevelGenerator.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelmanLibrary.xml b/doc_classes/VoxelmanLibrary.xml new file mode 100644 index 0000000..f522334 --- /dev/null +++ b/doc_classes/VoxelmanLibrary.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelmanLibraryMerger.xml b/doc_classes/VoxelmanLibraryMerger.xml new file mode 100644 index 0000000..ca04f9d --- /dev/null +++ b/doc_classes/VoxelmanLibraryMerger.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelmanLibrarySimple.xml b/doc_classes/VoxelmanLibrarySimple.xml new file mode 100644 index 0000000..9cd3a59 --- /dev/null +++ b/doc_classes/VoxelmanLibrarySimple.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelmanQueue.xml b/doc_classes/VoxelmanQueue.xml new file mode 100644 index 0000000..1fb4fa7 --- /dev/null +++ b/doc_classes/VoxelmanQueue.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/VoxelmanUnboundedQueue.xml b/doc_classes/VoxelmanUnboundedQueue.xml new file mode 100644 index 0000000..58996c8 --- /dev/null +++ b/doc_classes/VoxelmanUnboundedQueue.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc_classes/WorldArea.xml b/doc_classes/WorldArea.xml new file mode 100644 index 0000000..99d0c5a --- /dev/null +++ b/doc_classes/WorldArea.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meshes/editor_import_collada_mdr.cpp b/meshes/editor_import_collada_mdr.cpp deleted file mode 100644 index ce358e6..0000000 --- a/meshes/editor_import_collada_mdr.cpp +++ /dev/null @@ -1,88 +0,0 @@ -#include "editor_import_collada_mdr.h" - -String EditorImportColladaMdr::get_importer_name() const { - return "collada_mdr"; -} - -String EditorImportColladaMdr::get_visible_name() const { - return "Collada MDR"; -} - -void EditorImportColladaMdr::get_recognized_extensions(List *p_extensions) const { - p_extensions->push_back("dae"); -} - -String EditorImportColladaMdr::get_save_extension() const { - return "res"; -} - -String EditorImportColladaMdr::get_resource_type() const { - return "MeshDataResource"; -} - -float EditorImportColladaMdr::get_priority() const { - return 1.0; -} - -int EditorImportColladaMdr::get_preset_count() const { - return 0; -} - -String EditorImportColladaMdr::get_preset_name(int p_idx) const { - return ""; -} - -void EditorImportColladaMdr::get_import_options(List *r_options, int p_preset) const { - -} - -bool EditorImportColladaMdr::get_option_visibility(const String &p_option, const Map &p_options) const { - return true; -} - -Error EditorImportColladaMdr::import(const String &p_source_file, const String &p_save_path, const Map &p_options, List *r_platform_variants, List *r_gen_files, Variant *r_metadata) { - Node *n = _importer->import_scene(p_source_file, 0, 15); - - if (n == NULL) { - n->queue_delete(); - return Error::ERR_PARSE_ERROR; - } - - for (int i = 0; i < n->get_child_count(); ++i) { - Node *c = n->get_child(i); - print_error(String::num(i)); - - if (c == NULL) { - continue; - } - - if (Object::cast_to(c)) { - MeshInstance *mi = Object::cast_to(c); - - Ref mesh = mi->get_mesh(); - - if (mesh.is_valid()) { - Ref mdr; - mdr.instance(); - - mdr->set_array(mesh->surface_get_arrays(0)); - - n->queue_delete(); - - return ResourceSaver::save(p_save_path + "." + get_save_extension(), mdr); - } - } - } - - n->queue_delete(); - return Error::ERR_PARSE_ERROR; -} - - -EditorImportColladaMdr::EditorImportColladaMdr() { - _importer.instance(); -} - -EditorImportColladaMdr::~EditorImportColladaMdr() { - _importer.unref(); -} diff --git a/meshes/editor_import_collada_mdr.h b/meshes/editor_import_collada_mdr.h deleted file mode 100644 index 17f393a..0000000 --- a/meshes/editor_import_collada_mdr.h +++ /dev/null @@ -1,42 +0,0 @@ - -#ifndef EDITOR_IMPORT_COLLADA_MDR -#define EDITOR_IMPORT_COLLADA_MDR - -#include "editor/import/editor_import_plugin.h" -#include "core/ustring.h" -#include "scene/main/node.h" -#include "scene/resources/mesh.h" -#include "scene/3d/mesh_instance.h" -#include "core/io/resource_saver.h" - -#include "mesh_data_resource.h" -#include "editor/import/editor_import_collada.h" - -class EditorImportColladaMdr : public EditorImportPlugin { - - GDCLASS(EditorImportColladaMdr, EditorImportPlugin); - -public: - virtual String get_importer_name() const; - virtual String get_visible_name() const; - virtual void get_recognized_extensions(List *p_extensions) const; - virtual String get_save_extension() const; - virtual String get_resource_type() const; - virtual float get_priority() const; - - virtual int get_preset_count() const; - virtual String get_preset_name(int p_idx) const; - - virtual void get_import_options(List *r_options, int p_preset = 0) const; - virtual bool get_option_visibility(const String &p_option, const Map &p_options) const; - - virtual Error import(const String &p_source_file, const String &p_save_path, const Map &p_options, List *r_platform_variants, List *r_gen_files = NULL, Variant *r_metadata = NULL); - - EditorImportColladaMdr(); - ~EditorImportColladaMdr(); - -private: - Ref _importer; -}; - -#endif diff --git a/meshes/editor_plugin_collada_mdr.cpp b/meshes/editor_plugin_collada_mdr.cpp deleted file mode 100644 index 50ace10..0000000 --- a/meshes/editor_plugin_collada_mdr.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "editor_plugin_collada_mdr.h" - -void EditorPluginColladaMdr::_notification(int p_what) { - switch (p_what) { - case NOTIFICATION_ENTER_TREE: - _importer.instance(); - - add_import_plugin(_importer); - - break; - case NOTIFICATION_EXIT_TREE: - remove_import_plugin(_importer); - - _importer.unref(); - - break; - } -} - -EditorPluginColladaMdr::EditorPluginColladaMdr(EditorNode *node) { - _node = node; -} diff --git a/meshes/editor_plugin_collada_mdr.h b/meshes/editor_plugin_collada_mdr.h deleted file mode 100644 index 4aff12e..0000000 --- a/meshes/editor_plugin_collada_mdr.h +++ /dev/null @@ -1,25 +0,0 @@ - -#ifndef EDITOR_PLUGIN_COLLADA_MDR -#define EDITOR_PLUGIN_COLLADA_MDR - -#include "editor/editor_plugin.h" -#include "core/ustring.h" - -#include "editor_import_collada_mdr.h" - -class EditorPluginColladaMdr : public EditorPlugin { - - GDCLASS(EditorPluginColladaMdr, EditorPlugin); - -public: - EditorPluginColladaMdr(EditorNode *node); - -protected: - void _notification(int p_what); - -private: - EditorNode *_node; - Ref _importer; -}; - -#endif diff --git a/meshes/mesh_data_resource.cpp b/meshes/mesh_data_resource.cpp deleted file mode 100644 index 81a1ea3..0000000 --- a/meshes/mesh_data_resource.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "mesh_data_resource.h" - -Array MeshDataResource::get_array() { - return _arrays; -} -void MeshDataResource::set_array(const Array &p_arrays) { - _arrays.clear(); - - _arrays = p_arrays.duplicate(true); -} - -MeshDataResource::MeshDataResource() { - -} - -void MeshDataResource::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_array"), &MeshDataResource::get_array); - ClassDB::bind_method(D_METHOD("set_array", "array"), &MeshDataResource::set_array); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "array"), "set_array", "get_array"); -} diff --git a/meshes/mesh_data_resource.h b/meshes/mesh_data_resource.h deleted file mode 100644 index 8027d9f..0000000 --- a/meshes/mesh_data_resource.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef PROP_MESH_DATA_REOURCE_H -#define PROP_MESH_DATA_REOURCE_H - -#include "core/resource.h" -#include "core/array.h" -#include "scene/resources/mesh.h" - -class PropMeshDataResource : public Resource { - - GDCLASS(PropMeshDataResource, Resource); - RES_BASE_EXTENSION("pmdres"); - -public: - Array get_array(); - void set_array(const Array &p_arrays); - - PropMeshDataResource(); - -protected: - static void _bind_methods(); - -private: - Array _arrays; - -}; - -#endif diff --git a/meshes/mesh_registry.cpp b/meshes/mesh_registry.cpp deleted file mode 100644 index 81a1ea3..0000000 --- a/meshes/mesh_registry.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "mesh_data_resource.h" - -Array MeshDataResource::get_array() { - return _arrays; -} -void MeshDataResource::set_array(const Array &p_arrays) { - _arrays.clear(); - - _arrays = p_arrays.duplicate(true); -} - -MeshDataResource::MeshDataResource() { - -} - -void MeshDataResource::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_array"), &MeshDataResource::get_array); - ClassDB::bind_method(D_METHOD("set_array", "array"), &MeshDataResource::set_array); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "array"), "set_array", "get_array"); -} diff --git a/meshes/mesh_registry.h b/meshes/mesh_registry.h deleted file mode 100644 index 8027d9f..0000000 --- a/meshes/mesh_registry.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef PROP_MESH_DATA_REOURCE_H -#define PROP_MESH_DATA_REOURCE_H - -#include "core/resource.h" -#include "core/array.h" -#include "scene/resources/mesh.h" - -class PropMeshDataResource : public Resource { - - GDCLASS(PropMeshDataResource, Resource); - RES_BASE_EXTENSION("pmdres"); - -public: - Array get_array(); - void set_array(const Array &p_arrays); - - PropMeshDataResource(); - -protected: - static void _bind_methods(); - -private: - Array _arrays; - -}; - -#endif