[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1908] trunk/py/scripts/addons/ io_scene_obj/import_obj.py: fix [#27325] OBJ - Normalmap imports with Colour ticked

Campbell Barton ideasman42 at gmail.com
Sun May 8 14:57:08 CEST 2011


Revision: 1908
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1908
Author:   campbellbarton
Date:     2011-05-08 12:57:08 +0000 (Sun, 08 May 2011)
Log Message:
-----------
fix [#27325] OBJ - Normalmap imports with Colour ticked

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	2011-05-08 11:31:56 UTC (rev 1907)
+++ trunk/py/scripts/addons/io_scene_obj/import_obj.py	2011-05-08 12:57:08 UTC (rev 1908)
@@ -320,24 +320,32 @@
 
         elif type == 'Ka':
             mtex = blender_material.texture_slots.add()
+            mtex.use_map_color_diffuse = False
+
             mtex.texture = texture
             mtex.texture_coords = 'UV'
             mtex.use_map_ambient = True
 
         elif type == 'Ks':
             mtex = blender_material.texture_slots.add()
+            mtex.use_map_color_diffuse = False
+
             mtex.texture = texture
             mtex.texture_coords = 'UV'
             mtex.use_map_specular = True
 
         elif type == 'Bump':
             mtex = blender_material.texture_slots.add()
+            mtex.use_map_color_diffuse = False
+
             mtex.texture = texture
             mtex.texture_coords = 'UV'
             mtex.use_map_normal = True
 
         elif type == 'D':
             mtex = blender_material.texture_slots.add()
+            mtex.use_map_color_diffuse = False
+
             mtex.texture = texture
             mtex.texture_coords = 'UV'
             mtex.use_map_alpha = True
@@ -348,6 +356,8 @@
 
         elif type == 'refl':
             mtex = blender_material.texture_slots.add()
+            mtex.use_map_color_diffuse = False
+
             mtex.texture = texture
             mtex.texture_coords = 'UV'
             mtex.use_map_reflect = True



More information about the Bf-extensions-cvs mailing list