I was trying to export a simple object I've made (a table) with blender2ogre, I've already managed to export it without any texture (and load it in my Ogre scene), this includes both the mesh and the (default) material.
But right after texturing it in Blender (2.71), when exporting I get this:
Code: Select all
Traceback (most recent call last):
File "/home/blax/.config/blender/2.71/scripts/addons/io_export_ogreDotScene.py", line 3171, in execute
self.ogre_export(self.filepath, context)
File "/home/blax/.config/blender/2.71/scripts/addons/io_export_ogreDotScene.py", line 3534, in ogre_export
material_files = self.dot_material(meshes + force_material_update, path, material_file_name_base)
File "/home/blax/.config/blender/2.71/scripts/addons/io_export_ogreDotScene.py", line 3373, in dot_material
data = generate_material( mat, path=path, copy_programs=True, touch_textures=CONFIG['TOUCH_TEXTURES'] )
File "/home/blax/.config/blender/2.71/scripts/addons/io_export_ogreDotScene.py", line 7337, in generate_material
passes = w.get_passes()
File "/home/blax/.config/blender/2.71/scripts/addons/io_export_ogreDotScene.py", line 6989, in get_passes
r.append( self.generate_pass(self.material) )
File "/home/blax/.config/blender/2.71/scripts/addons/io_export_ogreDotScene.py", line 7013, in generate_pass
slots = get_image_textures( mat ) # returns texture_slot objects (CLASSIC MATERIAL)
File "/home/blax/.config/blender/2.71/scripts/addons/io_export_ogreDotScene.py", line 999, in get_image_textures
if s and s.texture.type == 'IMAGE':
AttributeError: 'NoneType' object has no attribute 'type'
location: <unknown location>:-1
location: <unknown location>:-1
Just to detail the texturing part: I've simply added and loaded some texture (.png) for the default material on my object, then I used UV mapping to tile it properly on it, I can see the texture being correctly applied.
If I disable the "Export Materials" option in the blender2ogre export window, I have no error (save that I have no texture on my mesh of course), even with different image formats (.jpg, .bmp) this changes nothing.
I'm using version 0.6.0 of the exporter, which was intended for Blender 2.66 (an older version than mine), but unfortunately this is the most recent iteration of the script I can get my hand on.
This issue has been signalled here: here but nothing seems to be done.
Has anyone else here got this error using Blender 2.71 with blender2ogre ?
If so, is there any workaround ?
(I'm on ArchLinux, if that's of any help)
Thank you.