From 627b9ca049b5bec439c2a05642eab6602b2ad630 Mon Sep 17 00:00:00 2001 From: Eduard Zalyaev Date: Tue, 6 Dec 2022 19:11:21 +0300 Subject: EditorSceneFormatImporterGLTF: check if "animation/trimming" parameter from import settings exists Fixes godotengine#69625 --- modules/gltf/editor/editor_scene_importer_gltf.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules/gltf') diff --git a/modules/gltf/editor/editor_scene_importer_gltf.cpp b/modules/gltf/editor/editor_scene_importer_gltf.cpp index 3cf49a3046..a194719b91 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor/editor_scene_importer_gltf.cpp @@ -63,7 +63,12 @@ Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t if (p_options.has("animation/import")) { state->set_create_animations(bool(p_options["animation/import"])); } - return doc->generate_scene(state, (float)p_options["animation/fps"], (bool)p_options["animation/trimming"]); + + if (p_options.has("animation/trimming")) { + return doc->generate_scene(state, (float)p_options["animation/fps"], (bool)p_options["animation/trimming"]); + } else { + return doc->generate_scene(state, (float)p_options["animation/fps"], false); + } } #endif // TOOLS_ENABLED -- cgit v1.2.3