Browse Source

Add specular texture export

Andreas Streichardt 10 years ago
parent
commit
a7e8e39e96
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Exporters/Blender/io_export_babylon.py

+ 7 - 0
Exporters/Blender/io_export_babylon.py

@@ -1365,6 +1365,13 @@ class Material:
                         # Bump
                         BabylonExporter.log('Bump texture found');
                         self.textures.append(Texture('bumpTexture', mtex.normal_factor, mtex, filepath))  
+                    elif mtex.use_map_color_spec:
+                        # Specular
+                        BabylonExporter.log('Specular texture found');
+                        self.textures.append(Texture('specularTexture', mtex.specular_color_factor, mtex, filepath))
+                    else:
+                        BabylonExporter.warn('WARNING image texture type not recognized:  ' + str(mtex) + ', ignored.')
+
                         
             else:
                  BabylonExporter.warn('WARNING texture type not currently supported:  ' + mtex.texture.type + ', ignored.')