if usage=='GRAY' and colorspace=='sRGB':
raise Exception("Grayscale textures with sRGB colorspace are not supported")
- fn = os.path.basename(image.filepath)
+ from .util import basename
+ fn = basename(image.filepath)
if not self.inline_data and fn:
srgb = "_srgb" if colorspace=='sRGB' else ""
tex_res.statements.append(Statement("external_image"+srgb, fn))