From 322f2bf8d49c58cd9eb5a214ee1542721839c6e0 Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Thu, 19 Aug 2010 12:49:53 +0000
Subject: [PATCH] update for changes in rna api

---
 io_import_images_as_planes.py   | 12 ++++++------
 space_view3d_materials_utils.py |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 81618c9be..53a7e9ed7 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -330,9 +330,9 @@ def main(filePath, options, mapping, dimension):
 
             # Put Image into  UVTextureLayer
             plane.data.uv_textures[0].data[0].image = img
-            plane.data.uv_textures[0].data[0].tex = True
-            plane.data.uv_textures[0].data[0].transp = 'ALPHA'
-            plane.data.uv_textures[0].data[0].twoside = True
+            plane.data.uv_textures[0].data[0].use_texture = True
+            plane.data.uv_textures[0].data[0].blend_mode = 'ALPHA'
+            plane.data.uv_textures[0].data[0].use_twoside = True
 
             plane.select = True
             scene.objects.active = plane
@@ -359,9 +359,9 @@ def main(filePath, options, mapping, dimension):
 
         # Put image into UVTextureLayer
         plane.data.uv_textures[0].data[0].image = img
-        plane.data.uv_textures[0].data[0].tex = True
-        plane.data.uv_textures[0].data[0].transp = 'ALPHA'
-        plane.data.uv_textures[0].data[0].twoside = True
+        plane.data.uv_textures[0].data[0].use_texture = True
+        plane.data.uv_textures[0].data[0].blend_mode = 'ALPHA'
+        plane.data.uv_textures[0].data[0].use_twoside = True
 
         plane.select = True
         scene.objects.active = plane
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py
index 004d4834c..683d2b505 100644
--- a/space_view3d_materials_utils.py
+++ b/space_view3d_materials_utils.py
@@ -213,11 +213,11 @@ def mat_to_texface():
                     #check that material had an image!
                     if images[f.material_index] != None:
                         uvtex[f.index].image = images[f.material_index]
-                        uvtex[f.index].tex =True
+                        uvtex[f.index].use_texture = True
                     else:
-                        uvtex[f.index].tex =False
-    
-        me.update
+                        uvtex[f.index].use_texture = False
+
+        me.update()
         
     
     if editmode:
-- 
GitLab