Fix exporting mesh without parent
This commit is contained in:
parent
c6f971a36f
commit
9f0c5a78c3
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ if len(mesh.uv_layers) > 0:
|
||||||
|
|
||||||
armature = None
|
armature = None
|
||||||
bone_names = 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
|
armature = obj.parent
|
||||||
print('Found armature with {} bones'.format(len(armature.data.bones)))
|
print('Found armature with {} bones'.format(len(armature.data.bones)))
|
||||||
bone_names = [b.name for b in armature.data.bones]
|
bone_names = [b.name for b in armature.data.bones]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue