Przeglądaj źródła

Merge pull request #367 from m0ppers/specular-blender-export

Add specular texture export
David Catuhe 10 lat temu
rodzic
commit
bf91f11c78
1 zmienionych plików z 7 dodań i 0 usunięć
  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.')