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:
-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