Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make GLTF module togglable when compiling release templates #51383

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion modules/gltf/config.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
2 changes: 2 additions & 0 deletions modules/gltf/editor_scene_importer_gltf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -60,6 +61,7 @@ Ref<Animation> EditorSceneImporterGLTF::import_animation(const String &p_path,
int p_bake_fps) {
return Ref<Animation>();
}
#endif

void PackedSceneGLTF::_bind_methods() {
ClassDB::bind_method(
Expand Down