glTF exporter: avoid crash when all drivers are invalids

This commit is contained in:
Julien Duroure 2022-08-06 11:57:45 +02:00
parent 5b2953ad08
commit 69b9725ba0
2 changed files with 3 additions and 2 deletions

View File

@ -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',

View File

@ -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)