How to automatically merge disconnected bones' heads and tails Let's say I've imported a model and the importer has created an armature with some disconnected bones that shouldn't actually be disconnected. Specifically, this:


The first descendants of the wrist bone should be disconnected, but I'd like the finger bone chains to be properly connected. As an example, this is how the thumb should look:


How can I do this automatically? Something like:
1. Select all bones to be "fixed"
2. Run an operation
3. Done

So far, I'm stuck doing this manually, by placing the 3D cursor at each bone's head, deleting the bone, extruding a new one from its parent, placing the new bone's head where the 3D cursor is, and renaming it. This is pretty slow and cumbersome.

I can't benefit from Merge Bones (Within Chains), since it doesn't do anything (presumably because the bones are disconnected and not a proper chain). I've tried selecting two bones, two tails, two heads, or one tail + one head; all no luck.

Demo file (depicted by image 1)
Quick Script.

As commented, might pay to upload file with armature if more detail like bone roll is required.



Similarly to Straighten all bone chains in an armature a quick little script (in this case) to move parent tail to child head, connect and remove last bone.

In edit mode, grab the parent bones of chains you wish to "flatten and connect"

import bpy
context = bpy.context
arm = context.object.data
for eb in context.selected_editable_bones:
    parent = eb        
    while len(parent.children):

        bone = parent.children[0]
        parent.tail = bone.head
        bone.use_connect = True
        parent = bone
    else:
        print("remove bone", parent.name)
        arm.edit_bones.remove(bone)


Note haven't done anything for bone roll. Would probably use the Y axis of original bone as Z or X axis of re-positioned bone