Merge pull request #69627 from RumblingTurtle/editor-scene-importer-crash-fix

Fix crash on old scene reimport
This commit is contained in:
Rémi Verschelde 2022-12-07 13:24:26 +01:00
commit df2b41f3b7
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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