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>2011-05-08 16:57:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-08 16:57:08 +0400
commitfa9258921093d6b9fcd6d79725eecb4a726fc0d0 (patch)
tree49586301c3e6ef910910ad601177a9969c996b80 /io_scene_obj
parent7ed9cf456a7016c30ccb54215fd17a664deecc5a (diff)
fix [#27325] OBJ - Normalmap imports with Colour ticked
Diffstat (limited to 'io_scene_obj')
-rw-r--r--io_scene_obj/import_obj.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index c1287f65..4593fc2f 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -320,24 +320,32 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
elif type == 'Ka':
mtex = blender_material.texture_slots.add()
+ mtex.use_map_color_diffuse = False
+
mtex.texture = texture
mtex.texture_coords = 'UV'
mtex.use_map_ambient = True
elif type == 'Ks':
mtex = blender_material.texture_slots.add()
+ mtex.use_map_color_diffuse = False
+
mtex.texture = texture
mtex.texture_coords = 'UV'
mtex.use_map_specular = True
elif type == 'Bump':
mtex = blender_material.texture_slots.add()
+ mtex.use_map_color_diffuse = False
+
mtex.texture = texture
mtex.texture_coords = 'UV'
mtex.use_map_normal = True
elif type == 'D':
mtex = blender_material.texture_slots.add()
+ mtex.use_map_color_diffuse = False
+
mtex.texture = texture
mtex.texture_coords = 'UV'
mtex.use_map_alpha = True
@@ -348,6 +356,8 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
elif type == 'refl':
mtex = blender_material.texture_slots.add()
+ mtex.use_map_color_diffuse = False
+
mtex.texture = texture
mtex.texture_coords = 'UV'
mtex.use_map_reflect = True