From 9abbb97d4cbef34cc0cbc8ceea52958fe477cfa8 Mon Sep 17 00:00:00 2001 From: alteredq Date: Sat, 2 Apr 2011 09:31:50 +0200 Subject: [PATCH] Fixed Blender exporter not checking if material texture actually has some image. --- .../blender/2.56/scripts/op/io_mesh_threejs/export_threejs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/exporters/blender/2.56/scripts/op/io_mesh_threejs/export_threejs.py b/utils/exporters/blender/2.56/scripts/op/io_mesh_threejs/export_threejs.py index 99692955..b61ee639 100644 --- a/utils/exporters/blender/2.56/scripts/op/io_mesh_threejs/export_threejs.py +++ b/utils/exporters/blender/2.56/scripts/op/io_mesh_threejs/export_threejs.py @@ -689,7 +689,7 @@ def extract_materials(mesh, scene): # http://www.blender.org/documentation/blender_python_api_2_54_0/bpy.types.Material.html#bpy.types.Material.specular_hardness material["specularCoef"] = m.specular_hardness - if m.active_texture and m.active_texture.type == 'IMAGE': + if m.active_texture and m.active_texture.type == 'IMAGE' and m.active_texture.image: fn = bpy.path.abspath(m.active_texture.image.filepath) fn = os.path.normpath(fn) fn_strip = os.path.basename(fn)