diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-09-22 22:29:19 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-09-22 22:29:52 +0300 |
commit | 525afbadafbeb6a27734708771d66b8407c00190 (patch) | |
tree | 9cbc333986cf0729449819311a6855b399816492 | |
parent | 68a8703b9959cc26dd52df1f0ad9a11221296569 (diff) |
glTF exporter: sanity check that action has channels when sampling animation
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 28bd34f2..448266f1 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": (0, 9, 72), + "version": (0, 9, 73), '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 1ac3600e..da963eab 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 @@ -52,6 +52,10 @@ def gather_animation_channels(blender_action: bpy.types.Action, if blender_object.type == "ARMATURE" and export_settings['gltf_force_sampling'] is True: # We have to store sampled animation data for every deformation bones + # Check that there are some anim in this action + if bake_range_start is None: + return [] + # Then bake all bones for bone in blender_object.data.bones: for p in ["location", "rotation_quaternion", "scale"]: |