diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-08-07 08:02:50 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-08-07 08:02:50 +0300 |
commit | 72599842ab5bceaeec46623f382f3af2c3715d3b (patch) | |
tree | 470e2918f34255237fa1272177d741fb019a92d6 /io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py | |
parent | 26c53aa581b0faad7656e40dc83d157fa0bba93a (diff) |
glTF exporter: add some checks on animation data, fixing error with weird files
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channels.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 0c931ebd..412f275b 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 @@ -148,6 +148,9 @@ def __gather_target(channels: typing.Tuple[bpy.types.FCurve], def __get_channel_groups(blender_action: bpy.types.Action, blender_object: bpy.types.Object, export_settings): targets = {} for fcurve in blender_action.fcurves: + # In some invalid files, channel hasn't any keyframes ... this channel need to be ignored + if len(fcurve.keyframe_points) == 0: + continue try: target_property = get_target_property_name(fcurve.data_path) except: |