OSDN Git Service

fix for python3
authorousttrue <ousttrue@gmail.com>
Sun, 2 Oct 2011 14:36:05 +0000 (23:36 +0900)
committerousttrue <ousttrue@gmail.com>
Sun, 2 Oct 2011 14:36:05 +0000 (23:36 +0900)
examples/mqobuilder.py

index abfc9c5..cc9ec7d 100644 (file)
@@ -22,17 +22,17 @@ def build(path):
         material=opengl.material.MQOMaterial()\r
         material.rgba=(m.color.r, m.color.g, m.color.b, m.color.a)\r
         if m.tex:\r
-            texturepath=os.path.join(basedir, m.tex)\r
+            texturepath=os.path.join(basedir, m.tex.decode('cp932'))\r
             material.texture=opengl.texture.Texture(texturepath)\r
         vertexArrayMap.addMaterial(material)\r
 \r
     for o in model.objects:\r
         # skip mikoto objects\r
-        if o.name.startswith("anchor"):\r
+        if o.name.startswith(b"anchor"):\r
             continue\r
-        if o.name.startswith("bone:"):\r
+        if o.name.startswith(b"bone:"):\r
             continue\r
-        if o.name.startswith("MCS:"):\r
+        if o.name.startswith(b"MCS:"):\r
             continue\r
 \r
         for f in o.faces:\r