[Bf-extensions-cvs] [70037202] master: glTF exporter: fix crash when armature action is linked to mesh object
Julien Duroure
noreply at git.blender.org
Sun Nov 24 08:30:53 CET 2019
Commit: 7003720257c96b3ec9ec870e19249ffc27db1caf
Author: Julien Duroure
Date: Sun Nov 24 08:30:08 2019 +0100
Branches: master
https://developer.blender.org/rBA7003720257c96b3ec9ec870e19249ffc27db1caf
glTF exporter: fix crash when armature action is linked to mesh object
===================================================================
M io_scene_gltf2/__init__.py
M io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py
===================================================================
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 8e83de6c..0c215977 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, 13),
+ "version": (1, 1, 14),
'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_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
More information about the Bf-extensions-cvs
mailing list