X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_texture.py;h=0a43ce624cfb296348e9a08c2cf4ada186f8068f;hp=23c5777d39ce4b2e92401bacda2ebc0da4e74c68;hb=5be6340cbd5da619db56e1658da56840fcfd6293;hpb=405c00de24374c282adb1116551a833b8130d76d diff --git a/blender/io_mspgl/export_texture.py b/blender/io_mspgl/export_texture.py index 23c5777d..0a43ce62 100644 --- a/blender/io_mspgl/export_texture.py +++ b/blender/io_mspgl/export_texture.py @@ -1,3 +1,5 @@ +import os + class TextureExporter: def __init__(self): self.inline_data = True @@ -20,9 +22,9 @@ class TextureExporter: else: tex_res.statements.append(Statement("min_filter", Token('NEAREST'))) - if not self.inline_data: + if not self.inline_data and texture.image.filepath: from .util import image_name - tex_res.statements.append(Statement("external_image", image_name(texture.image))) + tex_res.statements.append(Statement("external_image", os.path.basename(texture.image.filepath))) else: texdata = "" colorspace = texture.image.colorspace_settings.name