Explorar o código

Avoid obscure error on certain non-image textures.

tschw %!s(int64=10) %!d(string=hai) anos
pai
achega
504bdabe07

+ 2 - 1
utils/exporters/blender/addons/io_three/exporter/api/texture.py

@@ -174,5 +174,6 @@ def textures():
         if mat.users == 0:
         if mat.users == 0:
             continue
             continue
         for slot in mat.texture_slots:
         for slot in mat.texture_slots:
-            if slot and slot.use and slot.texture.type == IMAGE:
+            if (slot and slot.use and
+                    slot.texture and slot.texture.type == IMAGE):
                 yield slot.texture.name
                 yield slot.texture.name