glTF exporter: sanity check that action has channels when sampling animation

This commit is contained in:
Julien Duroure 2019-09-22 21:29:19 +02:00
parent 68a8703b99
commit 525afbadaf
2 changed files with 5 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": (0, 9, 72),
"version": (0, 9, 73),
'blender': (2, 81, 6),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -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"]: