1
$\begingroup$

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: demo 1

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: demo 2

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)

$\endgroup$
  • $\begingroup$ Recommend adding armature to blend and uploading here blend-exchange.giantcowfilms.com Are the images posed, or the rest pose? Would suggest a script that creates new bones based on old bone orientations. $\endgroup$ – batFINGER Mar 11 at 8:45
  • $\begingroup$ @batFINGER Rest pose. I've added the blend file as well. $\endgroup$ – TiberiumFusion Mar 11 at 17:08
1
$\begingroup$

Quick Script.

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

enter image description here

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

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks much, that script works like a charm. The bones already had the correct roll, so in my case, leaving bone roll unchanged is perfectly OK. $\endgroup$ – TiberiumFusion Mar 11 at 17:10
  • $\begingroup$ Good to know. Thanks for the feedback. $\endgroup$ – batFINGER Mar 11 at 17:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.