diff options
Diffstat (limited to 'io_scene_obj/import_obj.py')
-rw-r--r-- | io_scene_obj/import_obj.py | 10 |
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 |