Sub topic 4
Building a bone hierarchy
This chapter assumes you can add an armature and create bones in Edit Mode, and that you know the head and tail of a bone. It also assumes you know how parent and child objects behave. Here you will learn how bones are linked into a tree, how connected and unconnected children differ, and which settings control what a child inherits.
What the hierarchy does
Every bone has at most one parent. A bone with no parent is a root. Bones with the same parent are siblings. Together they form a tree, and an armature can hold several trees.
The hierarchy has two jobs:
- Motion propagation. When you rotate a parent in Pose Mode, all its descendants follow, as with a shoulder carrying the arm, forearm and hand.
- Organization. Tools such as IK chain length, Select Children, and Rigify rely on the tree.
A bone's parent is stored on the bone itself, not on the mesh. A mesh only reaches the bones through vertex groups, which a later chapter covers.
Connected versus unconnected children
A child bone is either connected or unconnected.
| Row | Connected | Unconnected (offset) |
|---|---|---|
| Child head position | Locked to the parent's tail | Free, anywhere in space |
| Pose Mode location | Cannot be moved on its own | Can be moved |
| Typical use | Spine, limbs, fingers | Shoulders, clavicles, hips, eyes, props |
| Property | `use_connect = True` | `use_connect = False` |
A connected bone has no independent location. Its head always sits at the parent's tail, so only rotation and scale matter in pose. An unconnected child keeps its own offset from the parent, and that offset moves with the parent.
Use connected bones for continuous chains such as a spine. Use unconnected bones where one part attaches to another at a point that is not the end of a bone. A shoulder bone does not start at the exact tail of the chest, so it is usually unconnected.
Creating the hierarchy in Edit Mode
There are three common ways to build it.
- Extrude. Select a bone tip and press
E. The new bone is a connected child of the one you extruded from. This is the fastest way to build chains. - Parent after the fact. Select the child, then shift-select the intended parent so it is active, and press
Ctrl+P. Choose Connected to snap the child head to the parent tail, or Keep Offset to leave both bones where they are. - Bone properties. In the Bone tab, open Relations and set Parent. The Connected checkbox lives under the same panel in Edit Mode.
To remove a link, press Alt+P. Clear Parent removes the relationship, and Disconnect Bone keeps the parent but frees the child's head.
Selection helpers save time on large rigs. Shift+[ and Shift+] select parent and child, and Ctrl+Numpad + extends the selection along the hierarchy.
Building it with Python
The script below builds the arm branch and spine from the diagram. Edit bones exist only in Edit Mode, so the script switches modes before creating them.
import bpy
if bpy.context.mode != 'OBJECT':
bpy.ops.object.mode_set(mode='OBJECT')
arm_data = bpy.data.armatures.new("HierarchyDemo")
arm_obj = bpy.data.objects.new("HierarchyRig", arm_data)
bpy.context.collection.objects.link(arm_obj)
bpy.context.view_layer.objects.active = arm_obj
bpy.ops.object.mode_set(mode='EDIT')
def add_bone(name, head, tail, parent=None, connect=False):
bone = arm_data.edit_bones.new(name)
bone.head = head
bone.tail = tail
if parent is not None:
bone.parent = arm_data.edit_bones[parent]
bone.use_connect = connect
return bone
add_bone("hips", (0, 0, 1.0), (0, 0, 1.2))
add_bone("spine", (0, 0, 1.2), (0, 0, 1.5), parent="hips", connect=True)
add_bone("chest", (0, 0, 1.5), (0, 0, 1.8), parent="spine", connect=True)
# Shoulder attaches beside the chest tail, so it is not connected
add_bone("upper_arm.L", (0.2, 0, 1.7), (0.6, 0, 1.7), parent="chest")
add_bone("forearm.L", (0.6, 0, 1.7), (1.0, 0, 1.7),
parent="upper_arm.L", connect=True)
bpy.ops.object.mode_set(mode='OBJECT')
def dump(bone, depth=0):
tag = " (connected)" if bone.use_connect else ""
print(" " * depth + bone.name + tag)
for child in bone.children:
dump(child, depth + 1)
for bone in arm_data.bones:
if bone.parent is None:
dump(bone)After the mode switch, arm_data.bones holds the read-only rest data. Parents are set through edit_bones and cannot be changed through bones.
Inheritance settings
A child inherits its parent's transform by default. The Relations panel can change this for each bone:
- Inherit Rotation. When off, the child keeps its own orientation while the parent turns. This suits eyes that should stay level while the head tilts.
- Inherit Scale. Offers Full, Fix Shear, Aligned, Average and None. Non-uniform scale on a rotated parent can shear its children, and Fix Shear or Aligned avoids that.
- Local Location. Controls whether a bone's location offset is measured in its parent's rotated space or in the armature's.
Common errors
- Child does not follow the parent. The bone is probably unparented. Check the Relations panel. A bone that looks attached because its head touches the parent's tail is still independent unless
parentis set. - Child jumps after pressing
Ctrl+P. Connected moves the child head to the parent tail. Use Keep Offset when the position must stay. - Cannot move a bone in Pose Mode. A connected bone has no independent location. Disconnect it, or move its parent.
- Assigning a parent fails or raises an error in Python. Setting
bone.parenton aBoneorPoseBoneis not allowed. Use anEditBonein Edit Mode. - Cyclic parenting. A bone cannot be its own ancestor. Blender refuses the assignment.
- Several roots. Multiple root bones are legal but easy to create by accident. Look for stray roots in the Outliner.
Name bones early. The .L and .R suffixes matter for mirroring, and Blender uses them to find the opposite side. Names must also be unique within one armature.
Exercise
A forearm bone is a connected child of an upper-arm bone. In Pose Mode you try to move the forearm with G and nothing happens. Why, and what are two ways to make the forearm's head move independently?
Show answer
A connected bone's head is locked to its parent's tail, so it has no independent location. You can either clear the Connected setting in Edit Mode (Alt+P, Disconnect Bone, or untick Connected in the Relations panel), or leave it connected and move the head by moving or rotating the parent bone instead.