Sub topic 6
Posing with Forward Kinematics
This chapter assumes you can move between Object, Edit and Pose modes, know how bones are parented and connected, and understand the difference between the rest pose and the pose. It covers forward kinematics (FK) posing by hand and by script.
What forward kinematics means
In forward kinematics you rotate each bone yourself, starting at the top of the chain. A child bone inherits the transform of its parent. If you rotate the upper arm, the forearm and hand swing along with it. If you rotate the forearm, only the forearm and hand move.
The final position of the hand is the result of every rotation above it in the chain. You set the angles, and the hand ends up wherever those angles put it. Inverse kinematics (a later chapter) works the other way: you place the hand and the software computes the angles.
Posing in Pose Mode
Pose mode edits pose bones. These live on the armature object (obj.pose.bones), not in the armature data. The rest pose stored in the armature data does not change when you pose.
Basic workflow:
- Select the armature and press Ctrl+Tab, or choose Pose Mode from the mode menu.
- Click a bone to select it.
- Press R to rotate, G to move or S to scale. Add X, Y or Z to constrain to an axis, and type a number for an exact value.
- Press Alt+R, Alt+G or Alt+S to clear the rotation, location or scale of the selected bones.
To return the whole rig to its rest pose, press A to select all bones, then clear all three transforms.
Rotation modes
Each pose bone has its own rotation mode, and this setting decides which property Blender reads.
| Mode | Property | Notes |
|---|---|---|
| Quaternion (default) | `rotation_quaternion` | Avoids gimbal lock. Hard to edit by hand. |
| XYZ Euler | `rotation_euler` | Easy to read and to graph. Can gimbal lock. |
| Axis Angle | `rotation_axis_angle` | Rotation around one chosen axis. |
A common error is setting rotation_euler on a bone that is still in quaternion mode. The values are stored, but they have no visible effect. Set rotation_mode first.
Local axes and where the pose is stored
Pose transforms are relative to the bone's rest orientation, which depends on its head, tail and roll. A pose rotation of zero means the bone is at rest, not that it points along a world axis. This is why the same X rotation can bend one bone forward and another sideways: their roll values differ. Setting a consistent roll in Edit Mode keeps the axes predictable.
The transform orientation setting also matters. With the Local orientation, R X rotates around the bone's own X axis. With Global, it rotates around the world X axis. Use Local while posing a limb, since a joint such as an elbow normally bends around its own axis.
Connected bones and location
When a child is connected to its parent, its head is locked to the parent's tail. You cannot translate it in Pose mode, and only rotation and scale have an effect. A child that is not connected can be moved away from the parent, which is useful for floating controls but easy to do by accident.
To limit this, you can lock channels in the Bone properties Transform panel, or in the Item tab of the sidebar. Locking the location of every bone except the root is a common safeguard.
Keyframing the pose
You can insert keyframes in Pose mode with I over the viewport. Blender uses the keying set or the default channels from your preferences. A later chapter covers animation in more depth. Here, remember that each keyframe is stored on the object's action, on a channel for that pose bone.
Posing with Python
The same operations are available through bpy. This example builds the two-bone rig from the earlier chapters, then poses it and keys two frames.
import bpy
import math
# Build a two-bone armature
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')
# Pose bones live on the object, not on the armature data
pbone = arm_obj.pose.bones["child"]
pbone.rotation_mode = 'XYZ'
pbone.rotation_euler = (0, 0, 0)
pbone.keyframe_insert(data_path="rotation_euler", frame=1)
pbone.rotation_euler = (math.radians(45), 0, 0)
pbone.keyframe_insert(data_path="rotation_euler", frame=24)
# The rest pose is unchanged
print(arm_data.bones["child"].head_local)
print(tuple(pbone.rotation_euler))The script prints the rest-pose head of the child bone, which is (0.0, 0.0, 1.0), then the posed rotation. Posing changed pose.bones, and armature.bones kept its rest values.
To clear a pose from a script, reset the properties:
import bpy
arm_obj = bpy.data.objects["DemoRig"]
for pb in arm_obj.pose.bones:
pb.location = (0, 0, 0)
pb.rotation_euler = (0, 0, 0)
pb.rotation_quaternion = (1, 0, 0, 0)
pb.scale = (1, 1, 1)Note that the identity quaternion is (1, 0, 0, 0), not all zeros. An all-zero quaternion is not a valid rotation.
Common problems
- Rotating in Edit Mode instead of Pose mode. This changes the rest pose, and every skinned vertex shifts with it. Check the mode before you rotate.
- Applying the pose by accident. Pose > Apply > Apply Pose as Rest Pose redefines the rest pose. Use it only when you mean it.
- Wrong bone selected. In Pose mode, selection is on the bone, not the object. Check the header or the Outliner.
- Mesh does not follow. Posing only deforms a mesh that has an Armature modifier and matching vertex groups, covered in the skinning chapters.
- Hidden or locked bones. A bone in a hidden collection or with locked channels will ignore your input.
Exercise
You set pbone.rotation_euler = (math.radians(90), 0, 0) on a bone in a script, but the bone does not move in the viewport. Give the most likely cause and the fix.
Show answer
The bone is still in the default quaternion rotation mode, so Blender ignores rotation_euler. Set pbone.rotation_mode = 'XYZ' before assigning the Euler values, or set rotation_quaternion instead.
Exercise
You rotate a bone in Edit Mode, return to Pose mode, and find that the skinned mesh has changed shape even though you never posed it. Why, and how do you fix it?
Show answer
Edit Mode changes the rest pose, and the mesh was weighted against the old one. Undo the edit, or move the bone back, and do all posing in Pose mode so only the pose bones change.