[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3121] trunk/py/scripts/addons/ io_mesh_ply: bmesh fix for ply i/o addon - using tessface_
Dalai Felinto
dfelinto at gmail.com
Thu Mar 15 17:24:54 CET 2012
Revision: 3121
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3121
Author: dfelinto
Date: 2012-03-15 16:24:45 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
bmesh fix for ply i/o addon - using tessface_
Modified Paths:
--------------
trunk/py/scripts/addons/io_mesh_ply/export_ply.py
trunk/py/scripts/addons/io_mesh_ply/import_ply.py
Modified: trunk/py/scripts/addons/io_mesh_ply/export_ply.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_ply/export_ply.py 2012-03-15 05:42:42 UTC (rev 3120)
+++ trunk/py/scripts/addons/io_mesh_ply/export_ply.py 2012-03-15 16:24:45 UTC (rev 3121)
@@ -65,9 +65,9 @@
# mesh.transform(obj.matrix_world) # XXX
- has_uv = (len(mesh.uv_textures) > 0)
+ has_uv = (len(mesh.tessface_uv_textures) > 0)
has_uv_vertex = (len(mesh.sticky) > 0)
- has_vcol = len(mesh.vertex_colors) > 0
+ has_vcol = len(mesh.tessface_vertex_colors) > 0
if (not has_uv) and (not has_uv_vertex):
use_uv_coords = False
@@ -80,7 +80,7 @@
has_vcol = False
if has_uv:
- active_uv_layer = mesh.uv_textures.active
+ active_uv_layer = mesh.tessface_uv_textures.active
if not active_uv_layer:
use_uv_coords = False
has_uv = False
@@ -88,7 +88,7 @@
active_uv_layer = active_uv_layer.data
if has_vcol:
- active_col_layer = mesh.vertex_colors.active
+ active_col_layer = mesh.tessface_vertex_colors.active
if not active_col_layer:
use_colors = False
has_vcol = False
@@ -113,7 +113,7 @@
if has_uv:
uv = active_uv_layer[i]
- uv = uv.uv1, uv.uv2, uv.uv3, uv.uv4 # XXX - crufty :/
+ uv = uv.uv1, uv.uv2, uv.uv3, uv.uv4
if has_vcol:
col = active_col_layer[i]
col = col.color1[:], col.color2[:], col.color3[:], col.color4[:]
Modified: trunk/py/scripts/addons/io_mesh_ply/import_ply.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_ply/import_ply.py 2012-03-15 05:42:42 UTC (rev 3120)
+++ trunk/py/scripts/addons/io_mesh_ply/import_ply.py 2012-03-15 16:24:45 UTC (rev 3121)
@@ -296,9 +296,9 @@
if uvindices or colindices:
if uvindices:
- uvlay = mesh.uv_textures.new()
+ uvlay = mesh.tessface_uv_textures.new()
if colindices:
- vcol_lay = mesh.vertex_colors.new()
+ vcol_lay = mesh.tessface_vertex_colors.new()
if uvindices:
for i, f in enumerate(uvlay.data):
More information about the Bf-extensions-cvs
mailing list