X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_texture.py;h=3d21cd1a796a77d540cda19ff72ba39179509ea6;hb=be92396630a2065e43c21d9d1904e97014844cff;hp=7661b90b2fa5e1d91c5ba0410689904d29681bdb;hpb=03d2f0d7f4673b5262f396fda430e766eec4549b;p=libs%2Fgl.git diff --git a/blender/io_mspgl/export_texture.py b/blender/io_mspgl/export_texture.py index 7661b90b..3d21cd1a 100644 --- a/blender/io_mspgl/export_texture.py +++ b/blender/io_mspgl/export_texture.py @@ -29,14 +29,16 @@ class TextureExporter: def export_texture(self, tex_node, usage='RGB', *, invert_green=False): image = tex_node.image from .datafile import Resource, Statement, Token - tex_res = Resource(image.name+".tex2d", "texture2d") + tex_res = Resource(image.name+".tex", "texture") + + tex_res.statements.append(Statement("type", Token("\\2d"))) if tex_node.use_mipmap: tex_res.statements.append(Statement("generate_mipmap", True)) colorspace = image.colorspace_settings.name if usage=='GRAY' and colorspace=='sRGB': - raise Exception("Grayscale textures with sRGB colorspace are not supported") + raise Exception("Unsupported configuration on texture {}: Grayscale with sRGB".format(image.name)) from .util import basename fn = basename(image.filepath)