From 0055fd43dc1d3b6ca65823f40dfdf78e65770f15 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 18 May 2019 10:54:44 +0300 Subject: [PATCH] Some bugfixes to texture exporting --- blender/io_mspgl/export_material.py | 2 +- blender/io_mspgl/export_scene.py | 3 ++- blender/io_mspgl/export_texture.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/blender/io_mspgl/export_material.py b/blender/io_mspgl/export_material.py index 289fb881..46b571a9 100644 --- a/blender/io_mspgl/export_material.py +++ b/blender/io_mspgl/export_material.py @@ -82,7 +82,7 @@ class MaterialExporter: if self.single_file: ss.sub.append(tech_res.create_embed_statement("texture2d", tex_res)) elif not diffuse_tex.default_filter: - ss.sub.append(tech_res.create_reference_statement("texture2d", tex_res)) + ss.sub.append(tech_res.create_reference_statement("texture", tex_res)) else: ss.sub.append(Statement("texture", image_name(diffuse_tex.image))) st.sub.append(ss) diff --git a/blender/io_mspgl/export_scene.py b/blender/io_mspgl/export_scene.py index d4e6b78f..b32683cc 100644 --- a/blender/io_mspgl/export_scene.py +++ b/blender/io_mspgl/export_scene.py @@ -54,7 +54,8 @@ class SceneExporter: keywords = { ".mat": "material", ".mesh": "mesh", ".object": "object", - ".tech": "technique" } + ".tech": "technique", + ".tex2d": "texture2d" } with open(os.path.join(path, base+"_resources.mdc"), "w") as res_out: for r in refs: st = Statement(keywords[os.path.splitext(r.name)[1]], r.name) diff --git a/blender/io_mspgl/export_texture.py b/blender/io_mspgl/export_texture.py index 1cf32afe..8c750ab9 100644 --- a/blender/io_mspgl/export_texture.py +++ b/blender/io_mspgl/export_texture.py @@ -22,7 +22,7 @@ class TextureExporter: if not self.inline_data: from .util import image_name - tex_res.statements.append(Statement("image_data", image_name(texture.image))) + tex_res.statements.append(Statement("external_image", image_name(texture.image))) else: texdata = "" if texture.use_alpha: -- 2.45.2