Okay, It’s my new code:
def writeTransform(block, file_object, groupName=""):
print(" <Transform> {\n <Matrix4> {", file=file_object)
#print(1, 0, 0, block.translation.x, file=file_object)
#print(0, 1, 0, block.translation.y, file=file_object)
#print(0, 0, 1, block.translation.z, file=file_object)
#print("0 0 0 1 } }", file=file_object)
print(" ",1.0, 0.0, 0.0, 0.0, file=file_object)
print(" ",0.0, 1.0, 0.0, 0.0, file=file_object)
print(" ",0.0, 0.0, 1.0, 0.0, file=file_object)
print(" ",block.translation.x, block.translation.y, block.translation.z, 1.0, "}\n }", file=file_object)
and it’s egg file that create by nif2egg script:
<Group> b'animNonAccum' {
<Transform> {
<Matrix4> {
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 18.5 7.199999809265137 1.0 }
}
<VertexPool> b'animNonAccum'b'1' {
<Vertex> 0 { 23.905134201049805 -0.4957914352416992 0.19601762294769287
<Normal> { -0.7102550268173218 -0.40148693323135376 0.5782266855239868 }
<UV> { 0.9919948577880859 -0.018007874488830566 }
...
...
...
<VertexRef> { 45 41 59
<Ref> { b'animNonAccum'b'2' }
}
}
}
<Group> b'body' {
<Transform> {
<Matrix4> {
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0 }
}
<VertexPool> b'body'b'1' {
<Vertex> 0 { -35.9182014465332 17.969594955444336 -22.79993438720703
<Normal> { 0.0 0.0 -1.0 }
<UV> { 0.0546875 -0.98046875 }
...
...
...
Effect is not different in pview.