[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3867] trunk/py/scripts/addons/ io_scene_obj/import_obj.py: fixes suggested by kromar5959 on irc.
Campbell Barton
ideasman42 at gmail.com
Thu Oct 18 12:13:20 CEST 2012
Revision: 3867
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3867
Author: campbellbarton
Date: 2012-10-18 10:13:20 +0000 (Thu, 18 Oct 2012)
Log Message:
-----------
fixes suggested by kromar5959 on irc.
use Tr as translucency and use reflection coords for 'map_refl' setting.
Modified Paths:
--------------
trunk/py/scripts/addons/io_scene_obj/import_obj.py
Modified: trunk/py/scripts/addons/io_scene_obj/import_obj.py
===================================================================
--- trunk/py/scripts/addons/io_scene_obj/import_obj.py 2012-10-18 09:52:49 UTC (rev 3866)
+++ trunk/py/scripts/addons/io_scene_obj/import_obj.py 2012-10-18 10:13:20 UTC (rev 3867)
@@ -159,9 +159,8 @@
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 @@
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
More information about the Bf-extensions-cvs
mailing list