diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index 3317438dffeca7c7d718632ec9da685485c85ad7..33168d30279576e6e6d379f8f9f110b72b2a573d 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 32ec2b8df265038fb5758770ea6f19516919f073..f8b36a9c86ec4255f5edcdd6102857d4723422df 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]