Sub topic 3
Working in Object, Edit and Pose modes
This chapter assumes you can navigate the 3D viewport, select objects, and read a transform panel (location, rotation, scale). You should also know what a parent and child object are. The previous chapters introduced the armature object and the head, tail and body of a bone. Here you learn which mode lets you change which kind of data. Most beginner rigging mistakes come from working in the wrong mode.
Why armatures have three modes
An armature is split into two layers. The armature data holds the bones' rest layout. The armature object holds the pose. Blender gives each layer its own mode, so you change one without disturbing the other.
| Mode | What you edit | Bone type you touch | Where the data lives |
|---|---|---|---|
| Object Mode | The whole armature as one object | None (the rig moves as a unit) | Object transform |
| Edit Mode | Bone head, tail, roll, parenting, names | Edit bones | Armature data (`bpy.data.armatures`) |
| Pose Mode | Bone location, rotation, scale, constraints | Pose bones | Armature object (`obj.pose.bones`) |
Object Mode
In Object Mode the armature behaves like any other object. Moving, rotating or scaling it transforms every bone together. Use it to place the rig in the scene, to parent meshes to it, and to add the Armature modifier to a mesh.
Object Mode transforms are not the same as posing. If you rotate the armature object to bend an arm, the whole skeleton turns. To bend one joint, you need Pose Mode.
Scale deserves care. A non-uniform or unapplied scale on the armature object makes rotation and constraint results look wrong later. Apply scale (Ctrl+A, then Scale) before you build much of the rig, unless you have a reason not to.
Edit Mode
Edit Mode defines the rest layout. Press Tab with the armature selected to enter it. In this mode each bone is an edit bone, and you can:
- Move the head, the tail, or the whole bone with
G. - Extrude a new connected bone from a tail with
E. - Rename bones in the Bone properties tab or with
F2. - Set the parent and the Connected option in the Relations panel.
- Adjust roll (covered in a later chapter).
Changes made here move the rest pose. Meshes bound to the rig will deform differently afterwards, because the weights were set against the old layout. Finish the skeleton shape before you skin.
Edit bones exist only in Edit Mode
The Python API enforces the same rule. armature.edit_bones is only usable while the armature is in Edit Mode. Outside it, the collection is empty or raises an error, and edit bone references go stale once you leave the mode. The earlier spine example works for this reason. It enters Edit Mode, creates bones, then returns to Object Mode.
import bpy
arm_data = bpy.data.armatures.new("ModeDemoArmature")
arm_obj = bpy.data.objects.new("ModeDemoRig", arm_data)
bpy.context.collection.objects.link(arm_obj)
bpy.context.view_layer.objects.active = arm_obj
bpy.ops.object.mode_set(mode='EDIT')
bone = arm_data.edit_bones.new("spine")
bone.head = (0, 0, 0)
bone.tail = (0, 0, 1)
bpy.ops.object.mode_set(mode='OBJECT')
# After leaving Edit Mode, read the same bone through the Bone data
print(arm_data.bones["spine"].head_local)After the mode switch, the bone is available as arm_data.bones["spine"]. These are the committed rest bones. They are read-only for shape changes. To change a head or tail, re-enter Edit Mode.
Pose Mode
Pose Mode lets you move bones without changing the rest layout. Select the armature and press Ctrl+Tab, or use the mode menu. Each bone is now a pose bone. Its location, rotation and scale are stored as offsets from the rest pose. A pose bone with zero location, zero rotation and a scale of 1 sits exactly in its rest position.
In Pose Mode you can:
- Rotate bones with
Rto pose the rig. - Clear a pose with
Alt+G,Alt+RandAlt+S(location, rotation, scale). - Add bone constraints, covered later.
- Insert keyframes on pose bone properties.
Pose bones are accessed through the object, not the data: arm_obj.pose.bones["spine"]. That is why the posing example uses arm_obj.pose.bones.
import bpy
import math
arm_obj = bpy.data.objects["ModeDemoRig"]
bpy.context.view_layer.objects.active = arm_obj
bpy.ops.object.mode_set(mode='POSE')
pbone = arm_obj.pose.bones["spine"]
pbone.rotation_mode = 'XYZ'
pbone.rotation_euler = (math.radians(30), 0, 0)
# The rest layout is unchanged
print(arm_obj.data.bones["spine"].tail_local)
bpy.ops.object.mode_set(mode='OBJECT')The second print shows the original rest tail. The pose changed only the pose bone.
Switching modes
You can switch with Tab (Object and Edit), Ctrl+Tab (Object and Pose), or the mode dropdown in the viewport header. In scripts, use bpy.ops.object.mode_set(mode=...) with 'OBJECT', 'EDIT' or 'POSE'.
Common errors
- Posing in Object Mode. Rotating the armature object moves the whole rig, and pose bone values stay at zero. Switch to Pose Mode.
- Editing the rest pose by accident. If a bone moves in Edit Mode while you meant to pose, the mesh deformation changes. Check the mode in the viewport header before you press
GorR. - Stale edit bones in scripts. Keeping a reference to an edit bone after leaving Edit Mode can crash or return invalid data. Look the bone up again by name each time you enter Edit Mode.
- Pose changes that look like a bug. Clearing transforms (
Alt+G,Alt+R,Alt+S) in Pose Mode returns bones to the rest pose. If the rig looks distorted, select all bones and clear them to find out whether the problem is the pose or the rest layout. - Mesh and rig modes mixed up. Meshes also have an Edit Mode. When a mesh is the active object,
Tabedits vertices, not bones.
Checking your understanding
Exercise
You enter Edit Mode on an armature, move a bone's tail upward, and return to Object Mode. A mesh bound to the rig now looks stretched. Why, and which mode should you have used if you only wanted to bend the joint temporarily?
Show answer
Edit Mode changes the rest layout stored in the armature data, so the bone's rest position moved while the mesh weights stayed the same, which stretched the mesh. To bend the joint temporarily, use Pose Mode, which changes only the pose bones on the object and leaves the rest layout untouched.
Exercise
A script calls arm_data.edit_bones.new("hand") and gets an error or no result. Name the most likely cause and the fix.
Show answer
The armature is not in Edit Mode, and edit bones are only available there. Set the armature object as active, call bpy.ops.object.mode_set(mode='EDIT'), create the bone, then return to Object Mode.