From: ousttrue Date: Sun, 29 May 2011 04:03:34 +0000 (+0900) Subject: fix texture_export X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=8acefae3d650a7fa704d3d347f755359608c79f8;p=meshio%2Fpymeshio.git fix texture_export --- 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: