diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2020-01-10 08:23:24 -0800 |
---|---|---|
committer | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2020-01-10 08:23:24 -0800 |
commit | dfb713bce6b4264269bac38150a231cd8aa2b76a (patch) | |
tree | f28cc55295acefd20af0212ff9778400dd6f6a6e | |
parent | 140a31728f7e90c9bd1769fe9b35e14bcad6b4d3 (diff) |
Use cycle and loop hint flags in FBX.
-rw-r--r-- | modules/assimp/editor_scene_importer_assimp.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp index 1bc84ce3a0..726f4c1ed0 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); |