From 8acefae3d650a7fa704d3d347f755359608c79f8 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Sun, 29 May 2011 13:03:34 +0900 Subject: [PATCH] fix texture_export --- blender25-meshio/export_pmd.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blender25-meshio/export_pmd.py b/blender25-meshio/export_pmd.py index bb44328..a9fea63 100644 --- a/blender25-meshio/export_pmd.py +++ b/blender25-meshio/export_pmd.py @@ -925,8 +925,15 @@ class PmdExporter(object): material.vertex_count=len(indices) material.toon_index=0 - textures=[os.path.basename(path) + def get_texture_name(texture): + pos=texture.replace("\\", "/").rfind("/") + if pos==-1: + return texture + else: + return texture[pos+1:] + textures=[get_texture_name(path) for path in bl.material.eachEnalbeTexturePath(m)] + print(textures) if len(textures)>0: material.texture='*'.join(textures) else: -- 2.11.0