X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Futil.py;fp=blender%2Fio_mspgl%2Futil.py;h=7e932df382791007e3151beff6d4cc41bf5301ad;hb=e891021affc89a329d65b526744ebd38589cae32;hp=3b5e8cd56f3349d6ab1f094b8a25cde41015f558;hpb=725fccf49be5669a5a74f267eb409bf2fc071e05;p=libs%2Fgl.git diff --git a/blender/io_mspgl/util.py b/blender/io_mspgl/util.py index 3b5e8cd5..7e932df3 100644 --- a/blender/io_mspgl/util.py +++ b/blender/io_mspgl/util.py @@ -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