Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-01-22 14:44:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-22 14:44:26 +0400
commit081c87ece1750117eeccd8bb6c9d0fbdd2717901 (patch)
treed2ad6f95eeb088668f6e4fafeb5cc015c46950cc /io_scene_obj
parentd8671695fe0604ff554e28b27feae109861ac7ba (diff)
fix for api change with importer
Diffstat (limited to 'io_scene_obj')
-rw-r--r--io_scene_obj/import_obj.py5
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