Split armatures in 2.8?

All i found was related to older versions of Blender. So the old way ‘Ctrl+Alt+P’ doesn’t semms to work anymore.

The problem i have is a rigify rig where i attached a custom facial rig (Ctrl+J). Now i need to tweak some positions of the finger rig. So i tweaked the old metarig and re-generate the rig, but the facial rig gets overwritten and dissapears.

How can i split an armature in two?

Separating bones/vertices in edit mode into a new object is done with the P shortcut in 2.80 (just like in previous versions). When looking for a specific operator, hit space and search for its name.

There’s also splitting (Y), this unconnects bones/vertices, leaving them in the same object.

1 Like

Thanks mate, this seems to work if you want to seperate one bone out of the hierarchy. Instead of taking the children with it you end up with a single bone in a new armature. if i select the whole branch and seperate them, all bones in the splitted armature lost their relations and arent paranted anymore (also all bbone settings getting reseted). Should i report this as a bug or is this the usual behaviour?

Did i do something wrong? there must be another non-destructive way to split armatures

That could happen because in rigify, and in any complex rig in general, bones have in-between parents on hidden bone layers. You have to first make all bone layers visible from that Properties Editor (not from the Properties (N) Panel), study how bones are parented and constrained together and than you may be able to do what you want to do. It will take some time.

The part i want to seperate is just the self made custom facial rig, so i dont want to break up any rigify parts. If it were just the parenting that i have to redo, i wouldnt complain, but re-adjusting all the curvature of the bbones is just to much.

Before seperation…

and after.

I can’t reproduce this behaviour, are you using the latest build or a version that was built month ago?

Ok, I can reproduce it in the latest build.

I’ve never used bbones before, that’s why it took me a while. Bbones change their curvature, if they get unconnected from their parent. So, try also selecting their direct parent before separating.

That makes sense. The curvature is indeed defined by their parents. So no matter what, if seperation kills every relationsship between the separated bones, there is no way to fix this.

What you mean by that? I seperated everything from the facial root bone downwards the hierarchy.

Sepearation does not kill releationship between bones that are separated just between a separated and an unseparated bone. A lot of thing can be at play here, like constraints, I’d need a blend file to get more ideas.

Your’re right they dont lose their parents but lost the predefined Start and End Handles for some reason. Thats why all curvature get straightend out.

In case you’re not familiar with bbones in detail. I used a stretchy bone setup as basis. Something like shown here: https://www.youtube.com/watch?v=JS8V4_Ncn0w

Those handles seam to be defined by a bone, so if you’re selection includes the bone whose transform the handle is calculated from, the curvature should remain unchanged like in my test setups. That’s why I need to see your specific setup.

But like i said, all bones are included in the seperation, nothing is left behind.

I can provide you with the rig without the mesh if that helps. Since its commercial project. Be right back…

Btw, thanks for taking time to look into this, much appreciated. If you open the file, you’ll find the rigify rig with the attached custom facial rig. Look for a bone named ‘FaceRoot’. Thats the bone that hold the whole facial rig.

This is a bug, it worked in 2.79, you can track its developement here:

If an armature is duplicated with a bbone, when entering edit mode, the bbones custom handle bone references are gone.

import bpy

source_rig = bpy.data.objects['SourceArmature']
target_rig = bpy.data.objects['TargetArmature']

source_bones = source_rig.data.bones
target_bones = target_rig.data.bones

for target_bone in target_bones:
    bone_start = source_bones[target_bone.name].bbone_custom_handle_start
    bone_end = source_bones[target_bone.name].bbone_custom_handle_end
    if bone_start is not None:
        target_bone.bbone_custom_handle_start = target_bones[bone_start.name]
    if bone_end is not None:
        target_bone.bbone_custom_handle_end = target_bones[bone_end.name]

Here’s a script to copy the two references from one armature to the other

1 Like

Wow! That worked. Dude, your awesome.

For some reason Blender crashes as soon i select the new armature in the outliner right now, but i tested your script on an older file and it works great.

Again, thanks for your time and effort i was already adjusting to the fact that this cant be solved.

I cant run your script all at once in my situation since the facial rig just get seperated and not duplicated. So i have to store the 'source_rig ’ array first before the seperation. Would it be wrong if i once more ask for your help? :blush:

Either that or i simply duplicate the whole rig and read the info from the source BUT unfortunately the duplicated Rig is ‘instanced’, wich means that seperating one rig seperates the duplicate as well.
Is there a way to make the duplicate unique?

  1. If you duplicate any object with SHIFT+D, it’s not an instance but a new object with no links to the old one. Or are you linking the armature from a different file?

  2. ‘source_rig’ in the script is not an array but an object reference.

1.Ok, i duplicated the whole collection by right clicking in the outliner wich spits out an instanced Collection.

shift+d works fine and asks if want it linked or not.

  1. But arent object references some kind of array too, i mean isnt it a list that holds all information of the bones you refering to? Nevermind, one of these days ima learn Blender Python the proper way. I’m to spoiled by how comfortable maxscript is compared to blender python with all those different API Modules.