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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2012-03-15 20:24:45 +0400
committerDalai Felinto <dfelinto@gmail.com>2012-03-15 20:24:45 +0400
commit3e41f9e194e5a39ed8b072b3584b791af19e3721 (patch)
tree395924edbde0ddac3610f6d5843cc9880146240c
parent6b28346a0e6e8311049e0ac0699000de489a7596 (diff)
bmesh fix for ply i/o addon - using tessface_
-rw-r--r--io_mesh_ply/export_ply.py10
-rw-r--r--io_mesh_ply/import_ply.py4
2 files changed, 7 insertions, 7 deletions
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index 89eade75..0845301a 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -65,9 +65,9 @@ def save(operator,
# 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 @@ def save(operator,
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 @@ def save(operator,
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 @@ def save(operator,
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[:]
diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index e2e730b6..5825186f 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -296,9 +296,9 @@ def load_ply(filepath):
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):