diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-18 14:13:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-18 14:13:20 +0400 |
commit | 4fbfb59acc93148d2c2c808f1bc9a138ffa4532a (patch) | |
tree | 417efa1bfb8dac093db18268e1c7d7b4fbc831d3 | |
parent | 97dd992b5adee8569c969504034a8e41297bef45 (diff) |
fixes suggested by kromar5959 on irc.
use Tr as translucency and use reflection coords for 'map_refl' setting.
-rw-r--r-- | io_scene_obj/import_obj.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index adadf614..e02b293b 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -159,9 +159,8 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ mtex.use_map_color_diffuse = False mtex.texture = texture - mtex.texture_coords = 'UV' - mtex.use_map_reflect = True - + mtex.texture_coords = 'REFLECTION' + mtex.use_map_color_diffuse = True else: raise Exception("invalid type %r" % type) @@ -212,10 +211,12 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_ context_material.specular_hardness = int((float_func(line_split[1]) * 0.51)) elif line_lower.startswith(b'ni'): # Refraction index context_material.raytrace_transparency.ior = max(1, min(float_func(line_split[1]), 3)) # between 1 and 3 - elif line_lower.startswith((b'd', b'tr')): + elif line_lower.startswith(b'd'): # dissolve (trancparency) context_material.alpha = float_func(line_split[1]) context_material.use_transparency = True context_material.transparency_method = 'Z_TRANSPARENCY' + elif line_lower.startswith(b'tr'): # trancelucency + context_material.translucency = float_func(line_split[1]) elif line_lower.startswith(b'tf'): # rgb, filter color, blender has no support for this. pass |