[Bf-extensions-cvs] [0e2a855c] master: glTF exporter: add check to avoid error when armature is parented to another armature

Julien Duroure noreply at git.blender.org
Sat Feb 29 16:10:06 CET 2020


Commit: 0e2a855c40c60c8669ffd4f7d56a5ad78c7c6ee9
Author: Julien Duroure
Date:   Sat Feb 29 16:09:37 2020 +0100
Branches: master
https://developer.blender.org/rBA0e2a855c40c60c8669ffd4f7d56a5ad78c7c6ee9

glTF exporter: add check to avoid error when armature is parented to another armature

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 668c3adc..4ea83c25 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, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
-    "version": (1, 2, 31),
+    "version": (1, 2, 32),
     'blender': (2, 82, 7),
     '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 8157bb45..2a885971 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_drivers.py
@@ -27,6 +27,9 @@ def get_sk_drivers(blender_armature):
     for child in blender_armature.children:
         if not child.data:
             continue
+        # child.data can be an armature - which has no shapekeys
+        if not hasattr(child.data, 'shape_keys'):
+	        continue
         if not child.data.shape_keys:
             continue
         if not child.data.shape_keys.animation_data:



More information about the Bf-extensions-cvs mailing list