From fa9258921093d6b9fcd6d79725eecb4a726fc0d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Sun, 8 May 2011 12:57:08 +0000 Subject: [PATCH] fix [#27325] OBJ - Normalmap imports with Colour ticked --- io_scene_obj/import_obj.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index c1287f65e..4593fc2f6 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 -- GitLab