[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2396] trunk/py/scripts/addons: Fix #28818: Error when trying to import obj

Sergey Sharybin g.ulairi at gmail.com
Thu Oct 6 16:27:22 CEST 2011


Revision: 2396
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2396
Author:   nazgul
Date:     2011-10-06 14:27:22 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Fix #28818: Error when trying to import obj
Fix #28816: Error when importing obj file with texture due to api change

Update obj importer and xcf importer to use new post-texface api.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_import_gimp_image_to_scene.py
    trunk/py/scripts/addons/io_scene_obj/import_obj.py

Modified: trunk/py/scripts/addons/io_import_gimp_image_to_scene.py
===================================================================
--- trunk/py/scripts/addons/io_import_gimp_image_to_scene.py	2011-10-06 00:05:27 UTC (rev 2395)
+++ trunk/py/scripts/addons/io_import_gimp_image_to_scene.py	2011-10-06 14:27:22 UTC (rev 2396)
@@ -354,7 +354,6 @@
             
             UVFace = Active.data.uv_textures[0].data[0]
             UVFace.image = Img
-            UVFace.use_image = True
             
             Tex.image = Img
             
@@ -377,7 +376,6 @@
             
             UVFace = Active.data.uv_textures[0].data[0]
             UVFace.image = Img
-            UVFace.use_image = True
             
             Tex.image = Img
             

Modified: trunk/py/scripts/addons/io_scene_obj/import_obj.py
===================================================================
--- trunk/py/scripts/addons/io_scene_obj/import_obj.py	2011-10-06 00:05:27 UTC (rev 2395)
+++ trunk/py/scripts/addons/io_scene_obj/import_obj.py	2011-10-06 14:27:22 UTC (rev 2396)
@@ -619,9 +619,8 @@
                         image, has_data = unique_material_images[context_material]
                         if image:  # Can be none if the material dosnt have an image.
                             blender_tface.image = image
-                            blender_tface.use_image = True
                             if has_data and image.depth == 32:
-                                blender_tface.blend_type = 'ALPHA'
+                                blender_tface.alpha_blend = 'ALPHA'
 
                     # BUG - Evil eekadoodle problem where faces that have vert index 0 location at 3 or 4 are shuffled.
                     if len(face_vert_loc_indices) == 4:



More information about the Bf-extensions-cvs mailing list