glTF export: Fix crash when invalid driver

This commit is contained in:
Julien Duroure 2021-11-06 09:45:01 +01:00
parent 684ef91c1b
commit cd70923356
2 changed files with 6 additions and 1 deletions

View File

@ -15,7 +15,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": (1, 7, 30),
"version": (1, 7, 31),
'blender': (2, 91, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -53,6 +53,11 @@ def get_sk_drivers(blender_armature):
for sk_c in child.data.shape_keys.animation_data.drivers:
# Check if driver is valid. If not, ignore this driver channel
try:
# Check if driver is valid.
# Try/Except is no more a suffisant check, starting with version Blender 3.0,
# Blender crashs when trying to resolve path on invalid driver
if not sk_c.is_valid:
continue
sk_name = child.data.shape_keys.path_resolve(get_target_object_path(sk_c.data_path)).name
except:
continue