Ver Fonte

test if there is a parent at all

Michael Eggers há 4 anos atrás
pai
commit
5a1269317d
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      Exporter/Blender/gpmesh_export.py

+ 1 - 1
Exporter/Blender/gpmesh_export.py

@@ -88,7 +88,7 @@ def generate_gpskel_json():
     boneInfos = []
 
     armature = bpy.context.active_object
-    while armature.type != 'ARMATURE':
+    while armature.parent and armature.type != 'ARMATURE':
         armature = armature.parent
 
     if armature != bpy.context.active_object: