]> git.tdb.fi Git - libs/gl.git/commitdiff
Export texture's mipmap levels as 1 if mipmaps are not used
authorMikko Rasa <tdb@tdb.fi>
Tue, 2 Nov 2021 11:11:03 +0000 (13:11 +0200)
committerMikko Rasa <tdb@tdb.fi>
Tue, 2 Nov 2021 13:11:17 +0000 (15:11 +0200)
blender/io_mspgl/export_texture.py

index dc291c9cf64cd0c93a96df939bc0b1fd685bdc36..c304fd7e471ffd344da316712db29b984272ed01 100644 (file)
@@ -39,6 +39,8 @@ class TextureExporter:
                from .util import basename
                fn = basename(image.filepath)
                if not invert_green and fn:
+                       if not tex_node.use_mipmap:
+                               tex_res.statements.append(Statement("mipmap_levels", 1))
                        srgb = "_srgb" if colorspace=='sRGB' else ""
                        tex_res.statements.append(Statement("external_image"+srgb, fn))
                else: