For bones use recursive function in section at end file with strings like "lockInfluenceWeight" and bone names
Code: Select all
from pc001_01.GMD
....
=====================
bone
=====================
offset 746059 (4,) - string len
offset 746061 root
offset 746065 (
-0.00010046560782939196,
1.7763568394002505e-15,110.68985748291016, 1.2013832019874826e-05, - bone position
0.0, 0.0, 0.0, 1.0, - bone quaternion
1.0, 1.0, 1.0, 0.0, 2.350988701644575e-38, 2.350988701644575e-38)
offset 746121 (3,)
offset 746122 (20,)
offset 746124 lockInfluenceWeights
offset 746144 (234, 148, 171, 143, 0, 0, 0, 1, 0, 63, 128, 0, 0)
offset 746157 (8,) - child count
=====================
bone
=====================
offset 746161 (8,)
offset 746163 spine_00
offset 746171 (
-3.2469128432878978e-35,
4.6077910469111399e-15,1.8706696033477783, 0.028047563508152962,
0.0, 0.0, 0.0, 1.0,
1.0, 1.0, 1.0, 0.0, 2.350988701644575e-38, 2.350988701644575e-38)
offset 746227 (3,)
offset 746228 (20,)
offset 746230 lockInfluenceWeights
offset 746250 (234, 148, 171, 143, 0, 0, 0, 1, 0, 63, 128, 0, 0)
offset 746263 (1,) - child count
=====================
bone
=====================
offset 746267 (8,)
offset 746269 spine_01
offset 746277 (
-8.4957790878464147e+29,
-3.8694484828738496e-05, 12.831052780151367, -0.25826916098594666,
0.0, 0.0, 0.0, 1.0,
1.0, 1.0, 1.0, 0.0, 2.350988701644575e-38, 2.350988701644575e-38)
offset 746333 (3,)
offset 746334 (20,)
offset 746336 lockInfluenceWeights
offset 746356 (234, 148, 171, 143, 0, 0, 0, 1, 0, 63, 128, 0, 0)
offset 746369 (5,) - child count
.....
I use this to get bones (it is not for Noesis):
skeleton=Skeleton()
skeleton.BONESPACE=True
skeleton.NICE=True
def boneTree(g,parent):
bone=Bone()
skeleton.boneList.append(bone)
bone.name=g.word(g.H(1)[0])
if parent is not None:
bone.parentName=parent.name
A=g.f(14)
bone.posMatrix=VectorMatrix(A[1:4])
bone.rotMatrix=QuatMatrix(A[4:8]).resize4x4()
g.B(1)
g.word(g.H(1)[0])
g.B(13)
childCount=g.i(1)[0]
for m in range(childCount):
boneTree(g,bone)
g.seek(746059)
boneTree(g,None)
skeleton.draw()