]> git.tdb.fi Git - libs/gl.git/commitdiff
Some bugfixes to texture exporting
authorMikko Rasa <tdb@tdb.fi>
Sat, 18 May 2019 07:54:44 +0000 (10:54 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 18 May 2019 08:00:04 +0000 (11:00 +0300)
blender/io_mspgl/export_material.py
blender/io_mspgl/export_scene.py
blender/io_mspgl/export_texture.py

index 289fb8810d4beff83826d4a4905c11bdd71e3b39..46b571a9202e3408662b95f79a11debc8d9c8e8d 100644 (file)
@@ -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)
index d4e6b78f021154cba46388c53cc2c28ad5f1cf1b..b32683ccd5780f265c2ec18a124452ed72c38aac 100644 (file)
@@ -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)
index 1cf32afeb59072a58f67fc4fe8b529b8549cd522..8c750ab9f73504493d09bd9d9138beba5837eb5e 100644 (file)
@@ -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: