diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-21 12:21:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-21 12:21:01 +0400 |
commit | 956f1792ecf0f939e9e6bd456e77ffb8a3287281 (patch) | |
tree | 7c04299fe0b785d8999ccb3562fa5f26c99f0a95 /io_scene_obj/export_obj.py | |
parent | 3d9be8a8e47c992e6c2ef0ef3dbc79e20b4621e1 (diff) |
fix [#36432] Exporting obj with normalmap creates opacity map in the mtl file instead
- r3954/patch [#32914], introduced incorrect displacement map name, corrected.
- added support for reading displacement maps.
- remove checks that added alpha support for diffuce images, OBJ has alpha material settings for this.
Diffstat (limited to 'io_scene_obj/export_obj.py')
-rw-r--r-- | io_scene_obj/export_obj.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index e3e4bbbc..41843b0f 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -148,16 +148,16 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict): image_map["map_d"] = image if mtex.use_map_translucency: image_map["map_Tr"] = image - if mtex.use_map_normal and (mtex.texture.use_normal_map is True): + if mtex.use_map_normal: image_map["map_Bump"] = image - if mtex.use_map_normal and (mtex.texture.use_normal_map is False): - image_map["map_Disp"] = image + if mtex.use_map_displacement: + image_map["disp"] = image if mtex.use_map_color_diffuse and (mtex.texture_coords == 'REFLECTION'): - image_map["map_refl"] = image + image_map["refl"] = image if mtex.use_map_emit: image_map["map_Ke"] = image - for key, image in image_map.items(): + for key, image in sorted(image_map.items()): filepath = bpy_extras.io_utils.path_reference(image.filepath, source_dir, dest_dir, path_mode, "", copy_set, image.library) fw('%s %s\n' % (key, repr(filepath)[1:-1])) |