Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2022-08-06 12:57:45 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-08-06 12:57:45 +0300
commit69b9725ba0f8d4b28da3e60e35b4bf009ff6583f (patch)
tree795a0f43f931259bb14d180bc654788fed6dd754
parent5b2953ad0883223bf8f58cf2bd650891f759bb65 (diff)
glTF exporter: avoid crash when all drivers are invalids
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py3
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)