Sub topic 3
Bone constraints
This chapter assumes you can create an armature, switch between Object, Edit and Pose modes, and parent bones. You should also know how a bone's head and tail define its length and direction.
Bone constraints
A constraint is a rule that drives a pose bone's location, rotation or scale from another object or bone. Constraints apply to pose bones, so you add them in Pose Mode through the Bone Constraints tab.
Inverse kinematics with targets
Forward kinematics rotates each joint from the root outward. Inverse kinematics (IK) reverses this. You move an end bone toward a target empty, and Blender solves the joint angles of the chain. Set chain_count to the number of bones in the chain, counted from the end bone.
Keyframing poses
Pose a bone, then press I in the viewport to store a keyframe. Blender interpolates between keyframes on the timeline.
Deform bones and control bones
Deform bones move the mesh. Control bones exist for animators and should not deform the skin. Enable Deform only on bones that drive mesh vertices.
Bone roll and local axes
Each bone has a local Y axis that runs from head to tail. Roll turns the bone's local X and Z axes around that Y axis. Inconsistent roll makes mirrored bones rotate in opposite directions, so check the roll value in the N panel.
Mirroring a rig
Use Armature > Symmetrize in Edit Mode to copy one side of a rig to the other. Name bones with .L and .R suffixes so Blender can pair them. You can also enable X-Axis Mirror in the armature options.
Organizing bones with bone collections
Bone collections group bones so you can show, hide or lock them together. Manage them in the Armature properties tab.
Custom bone shapes for controls
In Bone properties, under Viewport Display, assign a mesh object as the Custom Shape. The shape changes only how the bone appears in the viewport. It does not change deformation.
Building and posing a rig with Python
import bpy
import math
arm_data = bpy.data.armatures.new("DemoArmature")
arm_obj = bpy.data.objects.new("DemoRig", arm_data)
bpy.context.collection.objects.link(arm_obj)
bpy.context.view_layer.objects.active = arm_obj
bpy.ops.object.mode_set(mode='EDIT')
root = arm_data.edit_bones.new("root")
root.head = (0, 0, 0)
root.tail = (0, 0, 1)
child = arm_data.edit_bones.new("child")
child.head = (0, 0, 1)
child.tail = (0, 0, 2)
child.parent = root
child.use_connect = True
bpy.ops.object.mode_set(mode='OBJECT')
pbone = arm_obj.pose.bones["child"]
pbone.rotation_mode = 'XYZ'
pbone.rotation_euler = (math.radians(45), 0, 0)Overview of the Rigify add-on
Rigify is a built-in add-on that generates a full rig, including control bones and IK setups, from a meta-rig. Enable it in Preferences > Add-ons. Studying a generated rig shows you the structure this chapter describes.
| Bone type | Deform | Purpose |
|---|---|---|
| Deform bone | On | Moves mesh vertices |
| Control bone | Off | Driven by animators or constraints |
Exercise
You add an IK constraint to a bone with chain_count set to 2. How many bones does Blender solve, and which bones are they?
Show answer
Blender solves two bones: the end bone that has the constraint, and its parent. The chain follows the parent links upward from the end bone.