[Bf-extensions-cvs] [525afbad] master: glTF exporter: sanity check that action has channels when sampling animation
Julien Duroure
noreply at git.blender.org
Sun Sep 22 21:29:55 CEST 2019
Commit: 525afbadafbeb6a27734708771d66b8407c00190
Author: Julien Duroure
Date: Sun Sep 22 21:29:19 2019 +0200
Branches: master
https://developer.blender.org/rBA525afbadafbeb6a27734708771d66b8407c00190
glTF exporter: sanity check that action has channels when sampling animation
===================================================================
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 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"]:
More information about the Bf-extensions-cvs
mailing list