diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-23 05:18:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-23 05:18:52 +0400 |
commit | e63e95789e23f672b2d55319232e391e254219fb (patch) | |
tree | b25900ebb754df4376e03c49789c6ea5a808506f /io_scene_obj | |
parent | 5127af871d9ca8493af0c36db6d6ec3f49c42451 (diff) |
update addons enabled by default to use 'faces -> tessfaces' also grease pencil scatter and quake map export.
Diffstat (limited to 'io_scene_obj')
-rw-r--r-- | io_scene_obj/export_obj.py | 4 | ||||
-rw-r--r-- | io_scene_obj/import_obj.py | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index 33168d30..f7e8f59b 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -345,8 +345,8 @@ def write_file(filepath, objects, scene, me_verts = me.vertices[:] # Make our own list so it can be sorted to reduce context switching - face_index_pairs = [(face, index) for index, face in enumerate(me.faces)] - # faces = [ f for f in me.faces ] + face_index_pairs = [(face, index) for index, face in enumerate(me.tessfaces)] + # faces = [ f for f in me.tessfaces ] if EXPORT_EDGES: edges = me.edges diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index b3be1f45..17d559a4 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -550,7 +550,7 @@ def create_mesh(new_objects, me.materials.append(material) me.vertices.add(len(verts_loc)) - me.faces.add(len(faces)) + me.tessfaces.add(len(faces)) # verts_loc is a list of (x, y, z) tuples me.vertices.foreach_set("co", unpack_list(verts_loc)) @@ -558,14 +558,14 @@ def create_mesh(new_objects, # faces is a list of (vert_indices, texco_indices, ...) tuples # XXX faces should contain either 3 or 4 verts # XXX no check for valid face indices - me.faces.foreach_set("vertices_raw", unpack_face_list([f[0] for f in faces])) + me.tessfaces.foreach_set("vertices_raw", unpack_face_list([f[0] for f in faces])) - if verts_tex and me.faces: + if verts_tex and me.tessfaces: me.tessface_uv_textures.new() context_material_old = -1 # avoid a dict lookup mat = 0 # rare case it may be un-initialized. - me_faces = me.faces + me_faces = me.tessfaces for i, face in enumerate(faces): if len(face[0]) < 2: @@ -575,7 +575,7 @@ def create_mesh(new_objects, edges.append(face[0]) else: - blender_face = me.faces[i] + blender_face = me.tessfaces[i] (face_vert_loc_indices, face_vert_tex_indices, |