Fix the importer for blender 2.61.

The use_image field of faces disappeared somewhere between 2.59 and 2.61.
This commit is contained in:
Bill Currie 2012-01-22 19:23:02 +09:00
parent 3c3a9d0a33
commit 86a401b025

View file

@ -108,7 +108,8 @@ def setup_skins (mdl, uvs):
for j, uv in enumerate(f.uv):
uv[0], uv[1] = mdl_uv[j]
f.image = img
f.use_image = True
if hasattr(f, "use_image"): # for older blender
f.use_image = True
mat = bpy.data.materials.new(mdl.name)
mat.diffuse_color = (1,1,1)
mat.use_raytrace = False