From a62d70c56f6c82b7f8b1a2f1cf7319ac83195f52 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 12 Feb 2010 12:57:58 +0000 Subject: use a more direct way to get the active UV and VCol layer --- release/scripts/io/export_ply.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'release') diff --git a/release/scripts/io/export_ply.py b/release/scripts/io/export_ply.py index d8f9b690c9f..1111a1c81fc 100644 --- a/release/scripts/io/export_ply.py +++ b/release/scripts/io/export_ply.py @@ -127,23 +127,20 @@ def write(filename, scene, ob, \ vertexColors = False if faceUV: - active_uv_layer = None - for lay in mesh.uv_textures: - if lay.active: - active_uv_layer = lay.data - break + active_uv_layer = mesh.active_uv_texture if not active_uv_layer: EXPORT_UV = False faceUV = None + else: + active_uv_layer = active_uv_layer.data if vertexColors: - active_col_layer = None - for lay in mesh.vertex_colors: - if lay.active: - active_col_layer = lay.data + active_col_layer = mesh.active_vertex_color if not active_col_layer: EXPORT_COLORS = False vertexColors = None + else: + active_col_layer = active_col_layer.data # incase color = uvcoord = uvcoord_key = normal = normal_key = None -- cgit v1.2.3