This is more likely to be correct in common resource loading setups.
else:
return 1.055*(l**(1/2.4))-0.055
+def image_name(i):
+ fp = i.filepath
+ if fp:
+ return os.path.split(fp)[1]
+ else:
+ return i.name
+
class ObjectExporter:
def __init__(self):
out_file.write("raw_data", texdata)
out_file.end()
else:
- out_file.write("texture", '"%s"'%tex.image.name)
+ out_file.write("texture", '"%s"'%image_name(tex.image))
out_file.end()
out_file.end()