Scripting a mirroring rigging tools

Hi everyone,

So I'm trying to script a tools which based on a semi rig (I mean the left part of a character) is able to create the symetry but not using the symetry tools which made strange thing on pivot for example.

Anyway, I'm just blocked on a little point, create the End Bone.

What I'm looking for is create something like in the bone tools panels -> Create End.
But with the listener, I just can't see the operation, and I guess the original code is encoded.

So here is the question clearly :

- How may I create a bone which has no end ?

Next, the fact is I may have more than one bone with no end link to a first bone, see like four finger link to one hand bone, so I can't use the hand vector to create his childs.

- Finally, how may I get the end Position of a bone which has no child ?

Thanx for any help.

c ya