From 9f0c5a78c383e0a6779c674759cd5b1c182a62dd Mon Sep 17 00:00:00 2001 From: lisyarus Date: Thu, 23 Jun 2022 22:38:41 +0300 Subject: [PATCH] Fix exporting mesh without parent --- tools/convert-mesh/bin/convert-mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]