diff --git a/SConstruct b/SConstruct index 45108721add8..c0fc6619401d 100644 --- a/SConstruct +++ b/SConstruct @@ -155,6 +155,7 @@ opts.Add(BoolVariable("builtin_embree", "Use the built-in Embree library", True) opts.Add(BoolVariable("builtin_enet", "Use the built-in ENet library", True)) opts.Add(BoolVariable("builtin_freetype", "Use the built-in FreeType library", True)) opts.Add(BoolVariable("builtin_glslang", "Use the built-in glslang library", True)) +opts.Add(BoolVariable("builtin_gltf", "Use the built-in GLTF library", True)) opts.Add(BoolVariable("builtin_graphite", "Use the built-in Graphite library", True)) opts.Add(BoolVariable("builtin_harfbuzz", "Use the built-in HarfBuzz library", True)) opts.Add(BoolVariable("builtin_icu", "Use the built-in ICU library", True)) diff --git a/modules/gltf/config.py b/modules/gltf/config.py index a4ee871eff56..636ffd67e525 100644 --- a/modules/gltf/config.py +++ b/modules/gltf/config.py @@ -1,5 +1,5 @@ def can_build(env, platform): - return env["tools"] and not env["disable_3d"] + return not env["disable_3d"] def configure(env): diff --git a/modules/gltf/editor_scene_importer_gltf.cpp b/modules/gltf/editor_scene_importer_gltf.cpp index eca1c85bf347..5482fef0baa7 100644 --- a/modules/gltf/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor_scene_importer_gltf.cpp @@ -37,6 +37,7 @@ #include "scene/animation/animation_player.h" #include "scene/resources/animation.h" +#ifdef TOOLS_ENABLED uint32_t EditorSceneImporterGLTF::get_import_flags() const { return ImportFlags::IMPORT_SCENE | ImportFlags::IMPORT_ANIMATION; } @@ -60,6 +61,7 @@ Ref EditorSceneImporterGLTF::import_animation(const String &p_path, int p_bake_fps) { return Ref(); } +#endif void PackedSceneGLTF::_bind_methods() { ClassDB::bind_method(