I want move something use <Transform> and <Matrix4>

This is a nif file:


This is a egg file that nif to:

This is a egg file with and :

The code than use to create :

def writeTransform(block, file_object, groupName=""):
	print("<Transform> { <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)

Matrices in the EGG is row-major

      <Matrix4> {
        1.000000 0.000000 0.000000 0.000000 
        0.000000 1.000000 0.000000 0.000000 
        0.000000 0.000000 1.000000 0.000000 
        X_value  Y_value  Z_value  1.000000 
      }

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.

I would really recommend that you use the EggData et al. classes in order to synthesise your egg file. That provides a much easier interface for you to generate your egg file, and prevents issues like these.

Well … I hope so, but panda3d supports noly python2 and nifformat supports noly python3. My nif2egg script need nifformat.

Are you sure that you used the same coordinate system in the both case?
Default is { Z-up }

Yes, I omitted it. It’s my complete file:
ubuntuone.com/66yqcpaOlheVnde2S4N7Yi

Aha, I see. Seems that is