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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-02-28 19:35:49 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-02-28 19:35:49 +0400
commite3f5cd8fd462d54961a6d87400b3b67a92f734d6 (patch)
treebd62335724c14ebd70d65dfd92bc63dc2937f1e0 /io_mesh_uv_layout/export_uv_eps.py
parent55d1a5020af9fa652dd2af9bea4e01986284ef9c (diff)
Updated io_mesh_uv_layout addon to work with bmesh.
Note: would have loved to add an option to export tesselated layout (instead of ngon one), but currently I often get mesh without tesselation, and seems there is no way to call ensure_tesselated from python...
Diffstat (limited to 'io_mesh_uv_layout/export_uv_eps.py')
-rw-r--r--io_mesh_uv_layout/export_uv_eps.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_mesh_uv_layout/export_uv_eps.py b/io_mesh_uv_layout/export_uv_eps.py
index bf136c9c..a15dc266 100644
--- a/io_mesh_uv_layout/export_uv_eps.py
+++ b/io_mesh_uv_layout/export_uv_eps.py
@@ -39,7 +39,7 @@ def write(fw, mesh, image_width, image_height, opacity, face_iter_func):
fw("1 setlinejoin\n")
fw("1 setlinecap\n")
- faces = mesh.faces
+ polys = mesh.polygons
if opacity > 0.0:
for i, mat in enumerate(mesh.materials if mesh.materials else [None]):
@@ -67,7 +67,7 @@ def write(fw, mesh, image_width, image_height, opacity, face_iter_func):
fw("%.5f %.5f lineto\n" % uv_scale)
fw("closepath\n")
- fw("DRAW_%d\n" % faces[i].material_index)
+ fw("DRAW_%d\n" % polys[i].material_index)
# stroke only
for i, uvs in face_iter_func():