glTF exporter: fix crash when armature action is linked to mesh object

This commit is contained in:
Julien Duroure 2019-11-24 08:30:08 +01:00
parent 35d9087eb4
commit 7003720257
2 changed files with 6 additions and 1 deletions

View File

@ -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, 13),
"version": (1, 1, 14),
'blender': (2, 81, 6),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -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