bugfix [#20688] Mesh with no materials fails to export UV layout

This commit is contained in:
Campbell Barton 2010-01-15 12:21:33 +00:00
parent 39ff5d7eb9
commit 3ff987c46a

@ -88,7 +88,7 @@ class ExportUVLayout(bpy.types.Operator):
# svg colors
fill_settings = []
for mat in mesh.materials:
for mat in mesh.materials if mesh.materials else [None]:
if mat:
fill_settings.append('fill="rgb(%d, %d, %d)"' % tuple(int(c*255) for c in mat.diffuse_color))
else: