diff --git a/tools/convert-mesh/bin/convert-mesh.py b/tools/convert-mesh/bin/convert-mesh.py index 35fac290..698faf07 100644 --- a/tools/convert-mesh/bin/convert-mesh.py +++ b/tools/convert-mesh/bin/convert-mesh.py @@ -27,7 +27,7 @@ if len(mesh.uv_layers) > 0: armature = None bone_names = None -if type(obj.parent.data) is bpy.types.Armature: +if obj.parent is not None and type(obj.parent.data) is bpy.types.Armature: armature = obj.parent print('Found armature with {} bones'.format(len(armature.data.bones))) bone_names = [b.name for b in armature.data.bones]