Code: Select all
anim - Animation
skel - Skeleton
sm - Mesh ???
vsm - Mesh settings (xml)
Samples: > here (~200mb)
I will be grateful! Thanks advance!
Code: Select all
anim - Animation
skel - Skeleton
sm - Mesh ???
vsm - Mesh settings (xml)
Code: Select all
for m in range(A[1]):# vertex count
[x,y,z]=g.short(3,'h',15)
fl=g.H(1)[0]# scale value for vertex position
x*=fl
y*=fl
z*=fl
mesh.vertPosList.append([x,y,z])
r=g.B(4)
mesh.vertUVList.append(g.short(2,'h',15))
mesh.skinWeightList.append(g.B(4))
mesh.skinIndiceList.append(g.B(4))
Code: Select all
while(True):
mat=Mat()
mat.TRIANGLE=True
mesh.matList.append(mat)
g.i(1)[0]
g.H(1)
mat.box=g.f(6)
B=g.i(1)[0]#triangle count
mat.IDStart=len(mesh.indiceList)
mat.IDCount=B*3
indices=g.H(B*3)
mesh.indiceList.extend(indices)
g.i(3)
c=g.i(1)[0]
skin=Skin()
mesh.skinList.append(skin)
for n in range(c):
bone=Bone()
id=g.H(1)[0]
bone.name=str(id)
bindSkeleton.boneList.append(bone)
skin.boneMap.append(id)
bone.matrix=Matrix4x3(g.half(12)).invert()
if g.tell()>=g.fileSize():break