From 081c87ece1750117eeccd8bb6c9d0fbdd2717901 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Tue, 22 Jan 2013 10:44:26 +0000 Subject: [PATCH] fix for api change with importer --- io_scene_obj/import_obj.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index f9d754314..6a43934c4 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 -- GitLab