diff options
Diffstat (limited to 'io_scene_gltf2/blender')
-rw-r--r-- | io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 4dcad66f..561f246c 100644 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py @@ -56,6 +56,9 @@ def get_sk_drivers(blender_armature): sk_name = child.data.shape_keys.path_resolve(get_target_object_path(sk_c.data_path)).name except: continue + # Do not take into account this driver if corresponding SK is disabled + if child.data.shape_keys.key_blocks[sk_name].mute is True: + continue idx = shapekeys_idx[sk_name] idx_channel_mapping.append((shapekeys_idx[sk_name], sk_c)) existing_idx = dict(idx_channel_mapping) @@ -65,7 +68,8 @@ def get_sk_drivers(blender_armature): else: all_sorted_channels.append(existing_idx[i]) - drivers.append((child, tuple(all_sorted_channels))) + if len(all_sorted_channels) > 0: + drivers.append((child, tuple(all_sorted_channels))) return tuple(drivers) |