浏览代码

Avoid obscure error on certain non-image textures.

tschw 10 年之前
父节点
当前提交
1ce8842c75
共有 1 个文件被更改,包括 4 次插入1 次删除
  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