From 3ff987c46a284c6fe7acb574d42a25c32ee29f7a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 15 Jan 2010 12:21:33 +0000 Subject: [PATCH] bugfix [#20688] Mesh with no materials fails to export UV layout --- release/scripts/op/uv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/op/uv.py b/release/scripts/op/uv.py index 476d3ab44c3..1ca369abe64 100644 --- a/release/scripts/op/uv.py +++ b/release/scripts/op/uv.py @@ -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: