Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-02-12 15:57:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-12 15:57:58 +0300
commita62d70c56f6c82b7f8b1a2f1cf7319ac83195f52 (patch)
treeb5dda7732d01a7e0d06c661087891954d6707a53 /release/scripts
parent606398fa2f422c7929778df0c5bf3ded2ad55d1f (diff)
use a more direct way to get the active UV and VCol layer
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/io/export_ply.py15
1 files changed, 6 insertions, 9 deletions
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