glTF importer: make NLA track order match glTF animation order
This commit is contained in:
parent
03fd6c5a3f
commit
d7f8d9a4f9
|
@ -15,7 +15,7 @@
|
|||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (1, 5, 13),
|
||||
"version": (1, 5, 14),
|
||||
'blender': (2, 91, 0),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue