[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26840] trunk/blender/release/scripts/io/ export_ply.py: use a more direct way to get the active UV and VCol layer

Campbell Barton ideasman42 at gmail.com
Fri Feb 12 13:57:59 CET 2010


Revision: 26840
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26840
Author:   campbellbarton
Date:     2010-02-12 13:57:58 +0100 (Fri, 12 Feb 2010)

Log Message:
-----------
use a more direct way to get the active UV and VCol layer

Modified Paths:
--------------
    trunk/blender/release/scripts/io/export_ply.py

Modified: trunk/blender/release/scripts/io/export_ply.py
===================================================================
--- trunk/blender/release/scripts/io/export_ply.py	2010-02-12 12:29:39 UTC (rev 26839)
+++ trunk/blender/release/scripts/io/export_ply.py	2010-02-12 12:57:58 UTC (rev 26840)
@@ -127,23 +127,20 @@
         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





More information about the Bf-blender-cvs mailing list