X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=examples%2Fpmdbuilder.py;h=846c7b2871aa74374c688dd5af8f2bc7d8e805c4;hb=05f6822cc37d15b98c5eaae9562105e1d3a5083e;hp=e41112c99ab4a405e4c25ee5a4d7ea5ccb590ee6;hpb=65211f29fc6e1e540cc3e1c515753f860653382b;p=meshio%2Fpymeshio.git diff --git a/examples/pmdbuilder.py b/examples/pmdbuilder.py index e41112c..846c7b2 100644 --- a/examples/pmdbuilder.py +++ b/examples/pmdbuilder.py @@ -36,7 +36,6 @@ def build(path): yield i indexGen=indices() for i, m in enumerate(io.materials): - print(i, m) material=opengl.material.MQOMaterial() material.vcol=True material.rgba=( @@ -44,8 +43,9 @@ def build(path): m.diffuse[1], m.diffuse[2], m.diffuse[3]) - if m.texture!="": - texturepath="%s/%s" % (basedir, m.texture) + texturefile=m.texture.decode('cp932') + texturepath=os.path.join(basedir, texturefile) + if os.path.isfile(texturepath): if not texturepath in textureMap: texture=opengl.texture.Texture(texturepath) textureMap[texturepath]=texture