From dfb713bce6b4264269bac38150a231cd8aa2b76a Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Fri, 10 Jan 2020 08:23:24 -0800 Subject: [PATCH] Use cycle and loop hint flags in FBX. --- modules/assimp/editor_scene_importer_assimp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp index 1bc84ce3a0b..726f4c1ed0c 100644 --- a/modules/assimp/editor_scene_importer_assimp.cpp +++ b/modules/assimp/editor_scene_importer_assimp.cpp @@ -732,6 +732,10 @@ void EditorSceneImporterAssimp::_import_animation(ImportState &state, int p_anim animation->set_name(name); animation->set_length(anim->mDuration / ticks_per_second); + if (name.begins_with("loop") || name.ends_with("loop") || name.begins_with("cycle") || name.ends_with("cycle")) { + animation->set_loop(true); + } + // generate bone stack for animation import RegenerateBoneStack(state);