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>2021-07-04 18:46:56 +0300
committerJulien Duroure <julien.duroure@gmail.com>2021-07-04 18:46:56 +0300
commitac6fe2ff7c9b68b8a08e74ac3b8e350a6eb9d24d (patch)
treef07cf2d97274e994e8fe6086e3d6bd966ce97aad
parentb986a52051d48c2cda5a38159d05fb198cc15db7 (diff)
glTF exporter: fix bug when invalid shapekey driver
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index efe00b85..405ff3c9 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -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',
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 ddbceab4..4dcad66f 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py
@@ -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)