[Bf-extensions-cvs] [69b9725b] blender-v3.3-release: glTF exporter: avoid crash when all drivers are invalids

Julien Duroure noreply at git.blender.org
Sat Aug 6 11:58:05 CEST 2022


Commit: 69b9725ba0f8d4b28da3e60e35b4bf009ff6583f
Author: Julien Duroure
Date:   Sat Aug 6 11:57:45 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rBA69b9725ba0f8d4b28da3e60e35b4bf009ff6583f

glTF exporter: avoid crash when all drivers are invalids

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py

===================================================================

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)



More information about the Bf-extensions-cvs mailing list