diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-11-24 10:30:08 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-11-24 10:30:39 +0300 |
commit | 7003720257c96b3ec9ec870e19249ffc27db1caf (patch) | |
tree | 2722dc8206b1ace8f2852e244ff12ed4348693bc /io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py | |
parent | 35d9087eb465782eac9aee5bafa2f998da24a82c (diff) |
glTF exporter: fix crash when armature action is linked to mesh object
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py index 8f2f036e..81a528cf 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py @@ -94,6 +94,11 @@ def __get_channel_group_sorted(channels: typing.Tuple[bpy.types.FCurve], blender first_channel = channels[0] object_path = get_target_object_path(first_channel.data_path) if object_path: + if not blender_object.data.shape_keys: + # Something is wrong. Maybe the user assigned an armature action + # to a mesh object. Returning without sorting + return channels + # This is shapekeys, we need to sort channels shapekeys_idx = {} cpt_sk = 0 |