From fa9258921093d6b9fcd6d79725eecb4a726fc0d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 8 May 2011 12:57:08 +0000 Subject: fix [#27325] OBJ - Normalmap imports with Colour ticked --- io_scene_obj/import_obj.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'io_scene_obj') 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 -- cgit v1.2.3