This is a demo of my noesis script used to read bones:
Code: Select all
def noepyLoadModel(data, mdlList):
bs = NoeBitStream(data)
bs.seek(22, NOESEEK_REL)
boneCount = bs.readUShort()
print(boneCount)
boneNames = []
bs.seek(8, NOESEEK_REL)
for i in range(0, boneCount):
boneNames.append("bone_" + str(i))
bones = []
for i in range(0, boneCount):
parentIndex = bs.read(">h")
print(parentIndex[0])
bs.seek(2, NOESEEK_REL)
bs.seek(48, NOESEEK_REL)
Matrix = []
for j in range(0, 12):
Matrix.append(bs.readFloat())
boneMat = NoeMat43( [(Matrix[0],Matrix[1],Matrix[2]),
(Matrix[3],Matrix[4],Matrix[5]),
(Matrix[6],Matrix[7],Matrix[8]),
(Matrix[9],Matrix[10],Matrix[11])
] )
if i != parentIndex[0]:
print("TRUE")
bones.append( NoeBone(i, boneNames[i], boneMat, None, parentIndex[0]) )#boneIDs[i]
else: bones.append( NoeBone(i, boneNames[i], boneMat, None, -1) )
bs.seek(28, NOESEEK_REL)
# Converting local matrix to world space
for i in range(0, boneCount):
j = bones[i].parentIndex
if j != -1:
bones[i].setMatrix(bones[i].getMatrix().__mul__(bones[j].getMatrix()))
mdl = NoeModel()
mdl.setBones(bones)
mdlList.append(mdl)
rapi.setPreviewOption("setAngOfs", "0 -90 -90")
return 1

But then I wonder why my script couldn't show the red lines which link to those points , am I missing anything to get them? And what are those lines called?
I've attached my file as well. It's just a snippet of bone data cut from the original file but the code above can work with this sample




