glTF exporter: fix bug when invalid shapekey driver
This commit is contained in:
parent
b986a52051
commit
ac6fe2ff7c
|
@ -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, 11),
|
||||
"version": (1, 7, 12),
|
||||
'blender': (2, 91, 0),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -51,7 +51,11 @@ def get_sk_drivers(blender_armature):
|
|||
idx_channel_mapping = []
|
||||
all_sorted_channels = []
|
||||
for sk_c in child.data.shape_keys.animation_data.drivers:
|
||||
sk_name = child.data.shape_keys.path_resolve(get_target_object_path(sk_c.data_path)).name
|
||||
# Check if driver is valid. If not, ignore this driver channel
|
||||
try:
|
||||
sk_name = child.data.shape_keys.path_resolve(get_target_object_path(sk_c.data_path)).name
|
||||
except:
|
||||
continue
|
||||
idx = shapekeys_idx[sk_name]
|
||||
idx_channel_mapping.append((shapekeys_idx[sk_name], sk_c))
|
||||
existing_idx = dict(idx_channel_mapping)
|
||||
|
|
Loading…
Reference in New Issue