diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-03-28 21:11:50 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-03-28 21:11:50 +0400 |
commit | fa5cbcd02b83bb0b1daf136ba1f4bf29348b4359 (patch) | |
tree | 0f0f17665bfbf419d64dd396911b93ac3b645152 /io_scene_obj | |
parent | 8e6a2bec15236351533b392be265d9feb75e873c (diff) |
Fix T39487: Index Of Refraction when export to obj
Patch by Zer0 (vince), many thanks! :)
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) |