diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-22 14:44:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-22 14:44:26 +0400 |
commit | 081c87ece1750117eeccd8bb6c9d0fbdd2717901 (patch) | |
tree | d2ad6f95eeb088668f6e4fafeb5cc015c46950cc /io_scene_obj | |
parent | d8671695fe0604ff554e28b27feae109861ac7ba (diff) |
fix for api change with importer
Diffstat (limited to 'io_scene_obj')
-rw-r--r-- | io_scene_obj/import_obj.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index f9d75431..6a43934c 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -88,7 +88,7 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ has_data = False image_depth = 0 - if image: + if image is not None: texture.image = image # note, this causes the image to load, see: [#32637] # which makes the following has_data work as expected. @@ -108,7 +108,8 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ texture.use_mipmap = True texture.use_interpolation = True - texture.use_alpha = True + if image is not None: + image.use_alpha = True blender_material.use_transparency = True if "alpha" not in context_material_vars: blender_material.alpha = 0.0 |