]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/export_texture.py
Use bpy.path.basename instead of a custom function
[libs/gl.git] / blender / io_mspgl / export_texture.py
index eb6fa223cf1f8d0f31d903daa5d9ac9229effd7f..e03b1b0c9185f09d44fc1a96f0d9ce42678965de 100644 (file)
@@ -1,6 +1,7 @@
 import os
 import base64
 import codecs
+import bpy
 
 def pixels_to_rgba(pixels):
        return (int(p*255) for p in pixels)
@@ -41,8 +42,7 @@ class TextureExporter:
 
                invert_mask = sum(1<<i for i, c in enumerate(channels) if c[0]=='~')
 
-               from .util import basename
-               fn = basename(image.filepath)
+               fn = bpy.path.basename(image.filepath)
                if not invert_mask and fn:
                        if not tex_node.use_mipmap:
                                tex_res.statements.append(Statement("mipmap_levels", 1))