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-11-24 10:30:08 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-11-24 10:30:39 +0300
commit7003720257c96b3ec9ec870e19249ffc27db1caf (patch)
tree2722dc8206b1ace8f2852e244ff12ed4348693bc /io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
parent35d9087eb465782eac9aee5bafa2f998da24a82c (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-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py5
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