From e63e95789e23f672b2d55319232e391e254219fb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 23 Mar 2012 01:18:52 +0000 Subject: update addons enabled by default to use 'faces -> tessfaces' also grease pencil scatter and quake map export. --- io_mesh_ply/export_ply.py | 6 +++--- io_mesh_ply/import_ply.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'io_mesh_ply') diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py index cfadfbae..995bd0f5 100644 --- a/io_mesh_ply/export_ply.py +++ b/io_mesh_ply/export_ply.py @@ -102,9 +102,9 @@ def save(operator, ply_verts = [] # list of dictionaries # vdict = {} # (index, normal, uv) -> new index vdict = [{} for i in range(len(mesh_verts))] - ply_faces = [[] for f in range(len(mesh.faces))] + ply_faces = [[] for f in range(len(mesh.tessfaces))] vert_count = 0 - for i, f in enumerate(mesh.faces): + for i, f in enumerate(mesh.tessfaces): smooth = f.use_smooth if not smooth: @@ -177,7 +177,7 @@ def save(operator, "property uchar green\n" "property uchar blue\n") - fw("element face %d\n" % len(mesh.faces)) + fw("element face %d\n" % len(mesh.tessfaces)) fw("property list uchar uint vertex_indices\n") fw("end_header\n") diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py index ff013c01..ee64552a 100644 --- a/io_mesh_ply/import_ply.py +++ b/io_mesh_ply/import_ply.py @@ -301,8 +301,8 @@ def load_ply(filepath): mesh.vertices.foreach_set("co", [a for v in obj[b'vertex'] for a in (v[vindices_x], v[vindices_y], v[vindices_z])]) if mesh_faces: - mesh.faces.add(len(mesh_faces)) - mesh.faces.foreach_set("vertices_raw", unpack_face_list(mesh_faces)) + mesh.tessfaces.add(len(mesh_faces)) + mesh.tessfaces.foreach_set("vertices_raw", unpack_face_list(mesh_faces)) if uvindices or colindices: if uvindices: -- cgit v1.2.3