From f8ac4e5708f247aca9c97cb914431fe63c4960ce Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 7 Aug 2022 20:50:41 +0200 Subject: [PATCH] Check whether the gltf module is enabled or not before trying to use it. --- modules/mesh_data_resource/register_types.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/mesh_data_resource/register_types.cpp b/modules/mesh_data_resource/register_types.cpp index 60c2bcb85..cbc4a6224 100644 --- a/modules/mesh_data_resource/register_types.cpp +++ b/modules/mesh_data_resource/register_types.cpp @@ -22,6 +22,8 @@ SOFTWARE. #include "register_types.h" +#include "modules/modules_enabled.gen.h" + #include "mesh_data_resource.h" #include "mesh_data_resource_collection.h" #include "nodes/mesh_data_instance.h" @@ -30,7 +32,9 @@ SOFTWARE. #ifdef TOOLS_ENABLED #include "editor/editor_plugin.h" +#ifdef MODULE_GLTF_ENABLED #include "plugin_gltf/editor_plugin_gltf_mdr.h" +#endif #include "./editor/mdi_ed_plugin.h" #endif @@ -65,7 +69,9 @@ void register_mesh_data_resource_types() { #endif #ifdef TOOLS_ENABLED +#ifdef MODULE_GLTF_ENABLED EditorPlugins::add_by_type(); +#endif EditorPlugins::add_by_type(); #endif }