Help: Re-ordering bones issue

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
Post Reply
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Help: Re-ordering bones issue

Post by OneManClan »

Hi all.

Has anyone been able to change the order of an IQMs bones, using the 'bone order' field of Salzmans Blender->IQM Exporter? Salzman says:
The "Bone order" option specifies the name of an optional text file (relative to the export path) containing an ordering of bones for export, one bone name per line
so i made a text ('bubs_player_bones.txt') file, looks like this:
I typed 'bubs_player_bones.txt' in the 'Bone Order' box.. but no go.. (it didn't output anything)

Tried absolute path, no diff.

Renamed it 'bubs_player_bones', no diff.

I emptied the "Bone order" box, (to test) it exported perfectly, so the issue is definitely 'what goes in that box'.... I *think*.

I tried: "root,spine1,spine2,spine3" (an idea suggested by toneddu2000 in this thread), no go.

He also says
toneddu2000 wrote:On my pc, Linux or Windows no matter, IQM bone order feature didn't work. It couldn't load my bones file. After a talk with Lee (thanks a lot Lee!) I managed a workaround. For those interested in preserve bone order in IQM models, open and go to line 1038 and ....
Is this 'workaround' to allow you to reorder the bones? toneddu2000 uses the word 'preserving' rather than 're-ordering' (the bones), and "model will be exported with original bone order instead of the scrambled one" so I'm not even sure were talking about the same thing.

In any case, I edited the python script, saved, restarted Blender, no go.

So .. has anyone successfully reordered bones while exporting Blender->IQM?
Posts: 247
Joined: Sat Feb 28, 2009 2:38 pm

Re: Help: Re-ordering bones issue

Post by OneManClan »

UPDATE: 2019 and I thought I'd revisit this (still unresolved) situation.

Q: Does anyone know / can explain the relationship between 'the order that bones are made in Blender', and 'their bone numbers' (after export to IQM)?


OBJECTIVE: To control the legs and torso seperately, so the legs can be animating slower (eg if walking slower), while having the upper body animate 'normally'. The way to do this is using 'bone range' in skel_build(). This means we need the bone numbers of 'the lower part of the body' to be all contiguous.

Having failed to change the bone numbers of my existing player model during export, I made some minimalist test armatures, to find out the relationship between 'the order that you make the bones in Blender', and 'their number after export'. But I still can't figure it out.

I tried making the skeleton in different orders, eg
1. starting at the foot, going up by extruding at the bone's tail
2. starting at the head, going down by extruding at the bone's head

It seems that the bones (as exported via the iqm exporter) are not numbered 'in the order that you made the bones in Blender', and while I'm sure there's some logic to it, I can't see it. I'd post details on my findings if it helps, but I thought I'd check out if anyone knows a way to 'do it right in Blender', so you don't need to reorder bones later.
Post Reply