Browse Source

Avoid obscure error on certain non-image textures.

tschw 10 years ago
parent
commit
1ce8842c75
1 changed files with 4 additions and 1 deletions
  1. 4 1
      utils/exporters/blender/addons/io_three/exporter/api/material.py

+ 4 - 1
utils/exporters/blender/addons/io_three/exporter/api/material.py

@@ -384,7 +384,10 @@ def _valid_textures(material, strict_use=True):
             in_use = texture.use
         else:
             in_use = True
-        if texture.texture.type != IMAGE or not in_use:
+        if not in_use:
+            continue
+        if not texture.texture or texture.texture.type != IMAGE:
+            logger.warning("Unable to export non-image texture %s", texture)
             continue
         logger.debug("Valid texture found %s", texture)
         yield texture