So far, everything except *.anim files is implemented(so if you load models with *.anim files it may crash)
Except of this exception, you can now use this.
Examples:
1.GeosetTypes:
Code:
from skin import *
#Create Dictionary for Translating Ids
GeosetTypes = { "00" : "Hairstyles", "01" : "Facial1", "02" : "Facial2", "03" : "Facial3",
"04" : "Bracers", "05" : "Boots", "06" : "Unknown1", "07" : "Ears", "08" : "Wristbands", "09" : "Kneepads",
"10" : "Unknown2", "11" : "Pants", "12" : "Tabard", "13" : "Trousers/Kilt", "14" : "Unknown3",
"15" : "Cape", "16" : "Unknown4", "17" : "Eyeglows", "18" : "Belt" }
#Open SkinFile
sk = SkinFile("VrykulMale00.skin")
#Iterate through the Geosets
for i in sk.mesh:
s = str(i.mesh_id)#Convert the GeosetId to a string
j = len(s)#Get the Length of the string
if (j<3):#If it's only two digits...
s = "00"#the Id is 00
elif(j<4):#if it's length is <4, then it has only one digit
s = "0" + s[0]
else:#get the two important digits
s = s[0:2]
print str(i.mesh_id) +" is " + GeosetTypes[s]#print mesh_id and it's translation
2. Texture Types:
Code:
from m2 import *
#Dictionary for Texture types
TextureTypes = { 0 : "Hardcoded" , 1 : "Body/Clothes" , 2 : "Items", 3 : "ArmorReflect?", 6 : "Hair/Beard",
8 : "Tauren fur", 9 : "Inventory Art 1", 10 : "quillboarpinata", 11 : "Skin for creatures or gameobjects 1",
12 : "Skin for creatures or gameobjects 2" ,13 : "Skin for creatures or gameobjects 3", 14 : "Inventory Art 2"}
#open m2
m2 = M2File("HumanMale.m2")
#iterate through textures
for i in m2.textures:
print "Type is " + TextureTypes[i.type]#print texture type
print i.name#print texture filename