diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-09 15:33:37 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-09 15:33:37 +0400 |
commit | ee2cd7105d505a4f6b4613aba26598f532f97f30 (patch) | |
tree | ed50f3a8e7285101a4a3baf4b0d8a19164b19cc7 /io_scene_obj | |
parent | 6c32300be8cc8d48a3e02055dc43bea2ab98a525 (diff) |
Backport revisions for the 2.70a releasev2.70a
fa5cbcd, 95a9c96, 31bccec, c6e1af6.
Diffstat (limited to 'io_scene_obj')
-rw-r--r-- | io_scene_obj/export_obj.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index 9d0f03c5..b4c779d2 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -84,8 +84,8 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict): fw('Ka %.6f %.6f %.6f\n' % (mat.ambient * world_amb)[:]) # Ambient, uses mirror color, fw('Kd %.6f %.6f %.6f\n' % (mat.diffuse_intensity * mat.diffuse_color)[:]) # Diffuse fw('Ks %.6f %.6f %.6f\n' % (mat.specular_intensity * mat.specular_color)[:]) # Specular - if hasattr(mat, "ior"): - fw('Ni %.6f\n' % mat.ior) # Refraction index + if hasattr(mat, "raytrace_transparency") and hasattr(mat.raytrace_transparency, "ior"): + fw('Ni %.6f\n' % mat.raytrace_transparency.ior) # Refraction index else: fw('Ni %.6f\n' % 1.0) fw('d %.6f\n' % mat.alpha) # Alpha (obj uses 'd' for dissolve) |