]> git.tdb.fi Git - libs/gl.git/blobdiff - blender/io_mspgl/util.py
Use filtering options from Blender texture
[libs/gl.git] / blender / io_mspgl / util.py
index 3b5e8cd56f3349d6ab1f094b8a25cde41015f558..7e932df382791007e3151beff6d4cc41bf5301ad 100644 (file)
@@ -1,3 +1,5 @@
+import os
+
 class Progress:
        def __init__(self, context):
                self.task = ""
@@ -48,3 +50,11 @@ class Progress:
                        if self.window_manager:
                                self.window_manager.progress_update(value)
                        self.last = value
+
+
+def image_name(img):
+       fp = img.filepath
+       if fp:
+               return os.path.split(fp)[1]
+       else:
+               return img.name