From 69b9725ba0f8d4b28da3e60e35b4bf009ff6583f Mon Sep 17 00:00:00 2001 From: Julien Duroure Date: Sat, 6 Aug 2022 11:57:45 +0200 Subject: glTF exporter: avoid crash when all drivers are invalids --- io_scene_gltf2/__init__.py | 2 +- io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 65cfb759..865e3cd4 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 3, 18), + "version": (3, 3, 19), 'blender': (3, 3, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py index 4b24599a..9da5cc65 100644 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py @@ -74,7 +74,8 @@ def get_sk_drivers(blender_armature_uuid, export_settings): else: all_sorted_channels.append(existing_idx[i]) - if len(all_sorted_channels) > 0: + # Checks there are some driver on SK, and that there is not only invalid drivers + if len(all_sorted_channels) > 0 and not all([i is None for i in all_sorted_channels]): drivers.append((child_uuid, tuple(all_sorted_channels))) return tuple(drivers) -- cgit v1.2.3