diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-12-03 08:52:37 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-12-03 08:52:37 +0300 |
commit | 5f1ad50707e7aa640ffcef93c90c9997c99d5c50 (patch) | |
tree | 56017849b65a5c61bab475c8a5696298d00e8c0e | |
parent | 2f13b191ad9fa01915cd62739f99598529a21f0b (diff) |
glTF exporter: alphabetically sorting of exported animation
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 45a09fa2..9a381211 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -15,7 +15,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (1, 1, 19), + "version": (1, 1, 20), 'blender': (2, 81, 6), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py index d55c20b1..a2e903e5 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py @@ -231,6 +231,8 @@ def __get_blender_actions(blender_object: bpy.types.Object, # Remove duplicate actions. blender_actions = list(set(blender_actions)) + # sort animations alphabetically (case insensitive) so they have a defined order and match Blender's Action list + blender_actions.sort(key = lambda a: a.name.lower()) return [(blender_action, blender_tracks[blender_action.name]) for blender_action in blender_actions] |