OSDN Git Service

fix toon texture bug
authorousttrue <ousttrue@gmail.com>
Mon, 23 May 2011 21:58:57 +0000 (06:58 +0900)
committerousttrue <ousttrue@gmail.com>
Mon, 23 May 2011 21:58:57 +0000 (06:58 +0900)
blender25-meshio/export_pmd.py
blender25-meshio/pymeshio/pmd.py

index 1aa96da..c4cc9a4 100644 (file)
@@ -1048,12 +1048,12 @@ class PmdExporter(object):
             for i in range(10):
                 t=bl.material.getTexture(toonMaterial, i)
                 if t:
-                    io.toon_textures[i]=t.name
+                    io.toon_textures[i]="%s" % t.name
                 else:
-                    io.toon_textures[i]="toon%02d.bmp\n" % (i+1)
+                    io.toon_textures[i]="toon%02d.bmp" % (i+1)
         else:
             for i in range(10):
-                io.toon_textures[i]="toon%02d.bmp\n" % (i+1)
+                io.toon_textures[i]="toon%02d.bmp" % (i+1)
 
         # rigid body
         rigidNameMap={}
index d4696b0..8a8c2c4 100644 (file)
@@ -50,7 +50,7 @@ class Material(object):
         self.ambient=RGBA(ar, ag, ab)
         self.vertex_count=0
         self.texture=''
-        self.toon_index=1
+        self.toon_index=0
         self.flag=0
 
     def __str__(self):