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:
authorArystanbek Dyussenov <arystan.d@gmail.com>2009-09-15 22:01:18 +0400
committerArystanbek Dyussenov <arystan.d@gmail.com>2009-09-15 22:01:18 +0400
commit816377cc02fe5dd4be945c0f3d415861114b4980 (patch)
tree306e9d1363aa66bc919e43b80b3380fab9f60ea9 /release/io/export_ply.py
parentc8af263e5d8d9d41a757e8438cdcf3b64d57e0c0 (diff)
parentee768ada680ce0a8aa184c882005c0ef1c0140fb (diff)
Undo revision 23130 which was a merge with 2.5, a messy one because I did something wrong (`svn status` output: http://www.pasteall.org/7887).soc-2009-kazanbas
The command: svn merge -r 23130:23129 https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-kazanbas
Diffstat (limited to 'release/io/export_ply.py')
-rw-r--r--release/io/export_ply.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/release/io/export_ply.py b/release/io/export_ply.py
index 65238eb247c..2f10875c970 100644
--- a/release/io/export_ply.py
+++ b/release/io/export_ply.py
@@ -88,9 +88,9 @@ def write(filename, scene, ob, \
# mesh.transform(ob.matrixWorld) # XXX
- faceUV = len(mesh.uv_textures) > 0
+ faceUV = len(mesh.uv_layers) > 0
vertexUV = len(mesh.sticky) > 0
- vertexColors = len(mesh.vertex_colors) > 0
+ vertexColors = len(mesh.vcol_layers) > 0
if (not faceUV) and (not vertexUV): EXPORT_UV = False
if not vertexColors: EXPORT_COLORS = False
@@ -100,7 +100,7 @@ def write(filename, scene, ob, \
if faceUV:
active_uv_layer = None
- for lay in mesh.uv_textures:
+ for lay in mesh.uv_layers:
if lay.active:
active_uv_layer= lay.data
break
@@ -110,7 +110,7 @@ def write(filename, scene, ob, \
if vertexColors:
active_col_layer = None
- for lay in mesh.vertex_colors:
+ for lay in mesh.vcol_layers:
if lay.active:
active_col_layer= lay.data
if not active_col_layer:
@@ -141,7 +141,8 @@ def write(filename, scene, ob, \
col = active_col_layer[i]
col = col.color1, col.color2, col.color3, col.color4
- f_verts= f.verts
+ f_verts= list(f.verts)
+ if not f_verts[3]: f_verts.pop() # XXX face length should be 3/4, not always 4
pf= ply_faces[i]
for j, vidx in enumerate(f_verts):