Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_scene.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_scene.py b/io_scene_gltf2/blender/imp/gltf2_blender_scene.py
index e6eadcd6..1a276960 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_scene.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_scene.py
@@ -50,7 +50,9 @@ class BlenderScene():
def create_animations(gltf):
"""Create animations."""
if gltf.data.animations:
- for anim_idx, _anim in enumerate(gltf.data.animations):
+ # NLA tracks are added bottom to top, so create animations in
+ # reverse so the first winds up on top
+ for anim_idx in reversed(range(len(gltf.data.animations))):
BlenderAnimation.anim(gltf, anim_idx)
# Restore first animation