nex_smd_mesh_export.py - buggy animation export

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

nex_smd_mesh_export.py - buggy animation export

Postby zuriastrad » Fri May 23, 2008 8:46 pm

i've been exporting smd meshes and animations from blender using nex_smd_mesh_export.py, but i was having problems when i tried compiling them into a zym. i kept getting this error.
Code: Select all
executing command output
executing command scale
executing command origin
executing command rotate
executing command mesh
parsing mesh pyria.smd
executing command scene
parsing scene die1.smd
bone's parent >= bone's number
error processing script
morphed suggested reading the mesh smd and animation smd and checking the bone number and order was the same. (thanks morphed). in the mesh smd the bone stuff looked like this....
Code: Select all
version 1
nodes
0 "origin" -1
1 "handle" 0
2 "body" 1
3 "chest" 2
4 "l_shoulder" 3
5 "l_upperarm" 4
6 "l_forearm" 5
7 "l_hand" 6
8 "r_shoulder" 3
9 "r_upperarm" 8
10 "r_forearm" 9
11 "r_hand" 10
12 "neck" 3
13 "head" 12
14 "hips" 1
15 "l_hip" 14
16 "l_thigh" 15
17 "l_shin" 16
18 "l_foot" 17
19 "l_toe" 18
20 "r_hip" 14
21 "r_thigh" 20
22 "r_shin" 21
23 "r_foot" 22
24 "r_toe" 23
end
so every bone had it's number, name and the number of the bone it was parented to. when i looked at the same code in the animation smd it looked like this...
Code: Select all
version 1
nodes
0 "origin" -1
1 "handle" 1
2 "body" 2
3 "chest" 3
4 "l_shoulder" 4
5 "l_upperarm" 5
6 "l_forearm" 6
7 "l_hand" 7
8 "r_shoulder" 4
9 "r_upperarm" 9
10 "r_forearm" 10
11 "r_hand" 11
12 "neck" 4
13 "head" 13
14 "hips" 2
15 "l_hip" 15
16 "l_thigh" 16
17 "l_shin" 17
18 "l_foot" 18
19 "l_toe" 19
20 "r_hip" 15
21 "r_thigh" 21
22 "r_shin" 22
23 "r_foot" 23
24 "r_toe" 24
end
so the bones are parented to themselves, which is what was causing the zym build to fail. i copied and pasted the good code from the mesh smd into the animation smd and now everything works ok. i'm not really sure why it exported like this, but it could be something to do with the fact that i'm using a newer version of blender than the one the script was written for.

hope this is useful to someone.
zuriastrad
Alien
 
Posts: 169
Joined: Thu May 15, 2008 4:13 am

Postby Rebecca » Sat May 24, 2008 3:32 pm

That's the off-by-1 bug I've ran into some days ago. See this thread for a fix (and other problems I had): http://alientrap.org/forum/viewtopic.php?p=37267
Rebecca
Member
 
Posts: 29
Joined: Thu May 08, 2008 5:31 pm

Postby zuriastrad » Sat May 24, 2008 5:11 pm

nice work rebecca, thanks.
zuriastrad
Alien
 
Posts: 169
Joined: Thu May 15, 2008 4:13 am


Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron