mirror of
https://github.com/Relintai/mesh_utils.git
synced 2025-02-04 16:05:55 +01:00
Updated register_types.h and cpp to the current godot 4 style.
This commit is contained in:
parent
b52a261c31
commit
30d5e204e5
@ -38,17 +38,21 @@ SOFTWARE.
|
|||||||
|
|
||||||
static MeshUtils *mesh_utils = NULL;
|
static MeshUtils *mesh_utils = NULL;
|
||||||
|
|
||||||
void register_mesh_utils_types() {
|
void initialize_mesh_utils_module(ModuleInitializationLevel p_level) {
|
||||||
ClassDB::register_class<FastQuadraticMeshSimplifier>();
|
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||||
ClassDB::register_class<MeshMerger>();
|
GDREGISTER_CLASS(FastQuadraticMeshSimplifier);
|
||||||
|
GDREGISTER_CLASS(MeshMerger);
|
||||||
|
|
||||||
mesh_utils = memnew(MeshUtils);
|
mesh_utils = memnew(MeshUtils);
|
||||||
ClassDB::register_class<MeshUtils>();
|
GDREGISTER_CLASS(MeshUtils);
|
||||||
Engine::get_singleton()->add_singleton(Engine::Singleton("MeshUtils", MeshUtils::get_singleton()));
|
Engine::get_singleton()->add_singleton(Engine::Singleton("MeshUtils", MeshUtils::get_singleton()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
void unregister_mesh_utils_types() {
|
|
||||||
if (mesh_utils) {
|
void initialize_mesh_utils_module(ModuleInitializationLevel p_level) {
|
||||||
memdelete(mesh_utils);
|
if (p_level == MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||||
|
if (mesh_utils) {
|
||||||
|
memdelete(mesh_utils);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,9 @@ SOFTWARE.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void register_mesh_utils_types();
|
#include "modules/register_module_types.h"
|
||||||
void unregister_mesh_utils_types();
|
|
||||||
|
void initialize_mesh_utils_module(ModuleInitializationLevel p_level);
|
||||||
|
void uninitialize_mesh_utils_module(ModuleInitializationLevel p_level);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user