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:
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py')
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py5
1 files changed, 3 insertions, 2 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 b0e538c8..9da5cc65 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py
@@ -13,7 +13,7 @@ def get_sk_drivers(blender_armature_uuid, export_settings):
drivers = []
# Take into account skinned mesh, and mesh parented to a bone of the armature
- children_list = export_settings['vtree'].nodes[blender_armature_uuid].children
+ children_list = export_settings['vtree'].nodes[blender_armature_uuid].children.copy()
for bone in export_settings['vtree'].get_all_bones(blender_armature_uuid):
children_list.extend(export_settings['vtree'].nodes[bone].children)
@@ -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)