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:
authorJulien Duroure <julien.duroure@gmail.com>2019-12-03 08:52:37 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-12-03 08:52:37 +0300
commit5f1ad50707e7aa640ffcef93c90c9997c99d5c50 (patch)
tree56017849b65a5c61bab475c8a5696298d00e8c0e /io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
parent2f13b191ad9fa01915cd62739f99598529a21f0b (diff)
glTF exporter: alphabetically sorting of exported animation
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py2
1 files changed, 2 insertions, 0 deletions
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]