X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_material.py;h=b0df347f7fb0a2af9f07014e16a60bd2023afae8;hp=8560984ea4457dd0d4afb5b93fc8c29e95c30eed;hb=893c0645802c46eb60b04a87e79a5a4d69e32ea2;hpb=d9fbb830ddf5c9b69a046a641b16d6ae25d216b1 diff --git a/blender/io_mspgl/export_material.py b/blender/io_mspgl/export_material.py index 8560984e..b0df347f 100644 --- a/blender/io_mspgl/export_material.py +++ b/blender/io_mspgl/export_material.py @@ -75,7 +75,7 @@ class MaterialExporter: for p in textured_props: ctx.next_slice(p.texture.image) - tex_name = p.texture.image.name+".tex" + tex_name = texture_export.get_texture_name(p.texture, p.tex_channels) if tex_name not in resources: resources[tex_name] = texture_export.export_texture(p.texture, p.tex_channels) @@ -121,7 +121,9 @@ class MaterialExporter: def create_property_statement(self, mat_res, prop, resources): from .datafile import Statement if prop.texture: - tex_res = resources[prop.texture.image.name+".tex"] + from .export_texture import TextureExporter + texture_export = TextureExporter() + tex_res = resources[texture_export.get_texture_name(prop.texture, prop.tex_channels)] return mat_res.create_reference_statement(prop.tex_keyword, tex_res) elif not prop.keyword: return