From 6b458540bd82f9d10639353d8ae331ad1d01a419 Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Sun, 22 Apr 2012 23:52:07 +0000
Subject: [PATCH] update for change in blender api

---
 io_export_directx_x.py        | 2 +-
 io_import_scene_lwo.py        | 2 +-
 io_import_scene_mhx.py        | 2 +-
 io_mesh_ply/__init__.py       | 6 ++++--
 io_mesh_uv_layout/__init__.py | 2 +-
 io_scene_3ds/import_3ds.py    | 2 +-
 6 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/io_export_directx_x.py b/io_export_directx_x.py
index cfc8c8371..20949e6c8 100644
--- a/io_export_directx_x.py
+++ b/io_export_directx_x.py
@@ -529,7 +529,7 @@ def WriteMeshUVCoordinates(Config, Mesh):
     Config.File.write("{}MeshTextureCoords {{ //{} UV Coordinates\n".format("  " * Config.Whitespace, LegalName(Mesh.name)))
     Config.Whitespace += 1
 
-    UVCoordinates = Mesh.uv_loop_layers.active.data
+    UVCoordinates = Mesh.uv_layers.active.data
 
     Index = 0
     VertexCount = GetMeshVertexCount(Mesh)
diff --git a/io_import_scene_lwo.py b/io_import_scene_lwo.py
index b1853880f..1fa44c2c7 100644
--- a/io_import_scene_lwo.py
+++ b/io_import_scene_lwo.py
@@ -1110,7 +1110,7 @@ def build_objects(object_layers, object_surfs, object_tags, object_name, add_sub
             for uvmap_key in layer_data.uvmaps:
                 map_pack= create_mappack(layer_data, uvmap_key, "UV")
                 uvm= me.uv_textures.new(name=uvmap_key)
-                uvloop = me.uv_loop_layers[-1]
+                uvloop = me.uv_layers[-1]
                 uvm = uvloop.data
                 if not uvm:
                     break
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index 9b4343788..5c9b84de8 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -1359,7 +1359,7 @@ def parseUvTextureBMesh(args, tokens, me):
     bpy.ops.mesh.uv_texture_add()
     uvtex = me.uv_textures[-1]
     uvtex.name = name
-    uvloop = me.uv_loop_layers[-1]
+    uvloop = me.uv_layers[-1]
     loadedData['MeshTextureFaceLayer'][name] = uvloop    
     for (key, val, sub) in tokens:
         if key == 'Data':
diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py
index 8f3be6bc5..2e97dcfb9 100644
--- a/io_mesh_ply/__init__.py
+++ b/io_mesh_ply/__init__.py
@@ -96,8 +96,10 @@ class ExportPLY(bpy.types.Operator, ExportHelper):
             )
     use_normals = BoolProperty(
             name="Normals",
-            description="Export Normals for smooth and hard shaded faces " \
-                        "(hard shaded faces will be exported as individual faces)",
+            description="Export Normals for smooth and "
+                        "hard shaded faces "
+                        "(hard shaded faces will be exported "
+                        "as individual faces)",
             default=True,
             )
     use_uv_coords = BoolProperty(
diff --git a/io_mesh_uv_layout/__init__.py b/io_mesh_uv_layout/__init__.py
index 6bd3aae61..0113affd6 100644
--- a/io_mesh_uv_layout/__init__.py
+++ b/io_mesh_uv_layout/__init__.py
@@ -138,7 +138,7 @@ class ExportUVLayout(bpy.types.Operator):
         return image_width, image_height
 
     def _face_uv_iter(self, context, mesh, tessellated):
-        uv_layer = mesh.uv_loop_layers.active.data
+        uv_layer = mesh.uv_layers.active.data
         polys = mesh.polygons
 
         if not self.export_all:
diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py
index 338bf02a0..77fdcf707 100644
--- a/io_scene_3ds/import_3ds.py
+++ b/io_scene_3ds/import_3ds.py
@@ -339,7 +339,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
                         bmesh.polygons[fidx].material_index = mat_idx
 
             if uv_faces:
-                uvl = bmesh.uv_loop_layers.active.data[:]
+                uvl = bmesh.uv_layers.active.data[:]
                 for fidx, pl in enumerate(bmesh.polygons):
                     face = myContextMesh_facels[fidx]
                     v1, v2, v3 = face
-- 
GitLab