From 1ced0f1993471e4cf8789186edc57f8f900d9b6c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 6 Mar 2022 12:32:49 +0200 Subject: [PATCH] Use bpy.path.basename instead of a custom function --- blender/io_mspgl/export_material.py | 1 - blender/io_mspgl/export_texture.py | 4 ++-- blender/io_mspgl/util.py | 5 ----- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/blender/io_mspgl/export_material.py b/blender/io_mspgl/export_material.py index 9ec0670a..4941a585 100644 --- a/blender/io_mspgl/export_material.py +++ b/blender/io_mspgl/export_material.py @@ -124,7 +124,6 @@ class MaterialExporter: from .datafile import Statement if prop.texture: tex_res = resources[prop.texture.image.name+".tex"] - from .util import basename return mat_res.create_reference_statement(prop.tex_keyword, tex_res) elif not prop.keyword: return diff --git a/blender/io_mspgl/export_texture.py b/blender/io_mspgl/export_texture.py index eb6fa223..e03b1b0c 100644 --- a/blender/io_mspgl/export_texture.py +++ b/blender/io_mspgl/export_texture.py @@ -1,6 +1,7 @@ import os import base64 import codecs +import bpy def pixels_to_rgba(pixels): return (int(p*255) for p in pixels) @@ -41,8 +42,7 @@ class TextureExporter: invert_mask = sum(1<