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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-08 02:00:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-08 02:00:35 +0400
commitf463003c6a078a7734035a53ba88ac247d7d69bc (patch)
tree0e0402dc1e12d0c01161ef2ad2e86f171ae4149c /io_scene_obj
parent31312963b2f320ae211aa14a81713b7460a46ec4 (diff)
update obj import/export for BMesh api changes. (should now works as expected)
Diffstat (limited to 'io_scene_obj')
-rw-r--r--io_scene_obj/export_obj.py4
-rw-r--r--io_scene_obj/import_obj.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index 3317438d..33168d30 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -338,7 +338,7 @@ def write_file(filepath, objects, scene,
if EXPORT_UV:
faceuv = len(me.uv_textures) > 0
if faceuv:
- uv_layer = me.uv_textures.active.data[:]
+ uv_layer = me.tessface_uv_textures.active.data[:]
else:
faceuv = False
@@ -412,7 +412,7 @@ def write_file(filepath, objects, scene,
uv_face_mapping = [[0, 0, 0, 0] for i in range(len(face_index_pairs))] # a bit of a waste for tri's :/
uv_dict = {} # could use a set() here
- uv_layer = me.uv_textures.active.data
+ uv_layer = me.tessface_uv_textures.active.data
for f, f_index in face_index_pairs:
for uv_index, uv in enumerate(uv_layer[f_index].uv):
uvkey = veckey2d(uv)
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index 32ec2b8d..f8b36a9c 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -561,7 +561,7 @@ def create_mesh(new_objects,
me.faces.foreach_set("vertices_raw", unpack_face_list([f[0] for f in faces]))
if verts_tex and me.faces:
- me.uv_textures.new()
+ me.tessface_uv_textures.new()
context_material_old = -1 # avoid a dict lookup
mat = 0 # rare case it may be un-initialized.
@@ -597,7 +597,7 @@ def create_mesh(new_objects,
if verts_tex:
- blender_tface = me.uv_textures[0].data[i]
+ blender_tface = me.tessface_uv_textures[0].data[i]
if context_material:
image, has_data = unique_material_images[context_material]