Sub topic 6
Owner and Target Spaces
This chapter assumes you can create an armature, switch between Object, Edit, and Pose Mode, and add a bone constraint from the Bone Constraints tab. You should also know what parent and child bones are. The Python examples need basic familiarity with bpy.
Every bone constraint reads a transform from a target and writes a transform to its owner. Both transforms are expressed in a coordinate system, called a space. The space you pick often decides whether a constraint does what you expect. Most "the bone jumps to a strange place" problems come from a space mismatch.
What a Space Is
A space is a reference frame for describing location, rotation, and scale. The same bone has a different set of numbers in each space. Blender constraints offer these spaces for bones:
| Space | Origin and axes | Typical use |
|---|---|---|
| World Space | The scene origin and global axes | Aiming at objects, ground contact |
| Local Space | The bone's own pose-channel values, relative to its rest pose | Copying rotation between matching bones, hinge limits |
| Local With Parent | The bone's pose values relative to the rest pose, including the parent's rest orientation | Copying between bones with different parents |
| Pose Space | The armature object's own origin and axes | Rig-wide behavior that should ignore where the armature object sits in the scene |
| Custom Space | A space you pick from another object or bone | Special cases, such as limiting relative to a control bone |
World Space and Pose Space are the same only while the armature object sits at the world origin with no rotation or scale. Once you move or rotate the armature object, they differ. Pose Space follows the armature, so a rig built with Pose Space keeps working when you move the character.
Owner Space and Target Space
A constraint has up to two spaces.
- Owner space is the space in which the constraint evaluates and applies its result on the bone that owns the constraint.
- Target space is the space in which the constraint reads the target's transform.
Constraints that read a target, such as Copy Rotation, show both settings. Constraints with no target, such as Limit Rotation, show only the owner space.
The constraint converts the target's transform from the target space into a common form, combines it with the owner's, and writes the result in the owner space. If both spaces are World, the constraint compares the two bones as they sit in the scene. If both are Local, it compares their pose-channel values. If the two spaces differ, Blender converts between them for you, and the result is often surprising.
flowchart TDThe diagram below shows the order of the conversion.
World Space: The Default
New constraints default to World Space for both owner and target. This works for aiming and positioning, because the numbers describe where things actually are. It is a poor fit for copying rotation between bones that have different rest orientations. Two bones can face different directions at rest. Copying their world rotation forces the owner to match the target's absolute orientation, which snaps it away from its own rest direction.
Local Space: Matching Pose Values
Local Space compares pose-channel values. A bone resting at its rest pose has zero rotation in Local Space, regardless of which way it points in the scene. A Copy Rotation constraint with both spaces set to Local makes the owner rotate by the same amount as the target. The bones can point in different directions at rest, and the owner still follows the target's motion rather than its absolute orientation.
Local Space is also the right choice for a hinge. The Limit Rotation example in this tutorial's code uses owner_space = 'LOCAL', so an elbow's X limit means "bend around the bone's own X axis" and does not depend on how the arm is oriented in the scene.
Local Space has one catch. It ignores the parent's rest orientation, so two bones with different parents can disagree about what "the same rotation" means. That is the case Local With Parent handles.
Local With Parent
Local With Parent includes the bone's rest orientation relative to its parent. Use it when the owner and target have different parents or different rest rolls, and plain Local gives the wrong direction of motion. If a Copy Rotation in Local Space rotates the owner around the wrong axis, try Local With Parent before reaching for extra helper bones.
Pose Space
Pose Space is measured from the armature object, not the scene. If you animate the armature object itself, for example moving a character along a path, World Space values change every frame, while Pose Space values stay stable. For constraints between bones of the same rig, Pose Space is often the safer choice. For constraints that read an object outside the rig, such as a ground plane, World Space is correct, because the target lives in the scene.
Setting Spaces from Python
The properties are owner_space and target_space. Their values are the enum strings 'WORLD', 'POSE', 'LOCAL_WITH_PARENT', 'LOCAL', and 'CUSTOM'. Constraints without a target have no target_space, and setting it raises an error.
import bpy
rig = bpy.data.objects["ArmRig"]
forearm = rig.pose.bones["forearm"]
copy = forearm.constraints.new('COPY_ROTATION')
copy.target = rig
copy.subtarget = "hand_ik"
copy.owner_space = 'LOCAL'
copy.target_space = 'LOCAL'
copy.use_x = True
copy.use_y = False
copy.use_z = False
print(copy.owner_space, copy.target_space)This script assumes the ArmRig armature from the earlier chapter exists. It makes the forearm copy only the X rotation of hand_ik, measured in each bone's own pose values.
Choosing a Space
Work through these questions in order.
- Does the target live outside the rig, such as an empty or the ground? Use World Space for the target.
- Do you want the owner to match the target's motion, not its absolute direction? Use Local for both.
- Does Local give the wrong axis because the bones have different parents? Use Local With Parent.
- Is the whole armature object animated or moved? Prefer Pose Space for rig-internal relationships.
- Is it a limit on a joint, such as an elbow hinge? Use Local for the owner.
Common Errors
- The bone snaps away as soon as you add the constraint. Owner and target are in World Space, and their rest orientations differ. Switch both to Local.
- The bone moves in the wrong direction. The spaces do not match what you want to compare. Check whether one is World and the other Local.
- A limit works in one pose and not another. A limit in World Space is fixed to the scene axes, and the bone's own axes rotate away from them. Use Local for joint limits.
- The rig breaks when you move the armature object. A constraint uses World Space for something internal. Change it to Pose Space.
Exercise
A Copy Rotation constraint on bone B targets bone A. Both bones are in the same armature, but they point in different directions at rest. You want B to rotate by the same amount that A rotates, without snapping B to A's direction. Which owner and target spaces do you set, and why?
Show answer
Set both owner space and target space to Local. Local Space compares pose-channel values relative to each bone's rest pose, so a rest-pose bone has zero rotation whatever its direction. B then follows A's rotation amount and keeps its own rest direction. If B rotates around the wrong axis because the bones have different parents, try Local With Parent.
Exercise
A character rig works in the scene, but when you move the armature object to a new location, a bone with a constraint jumps. The constraint targets another bone in the same rig, and both spaces are World. What change fixes it, and why?
Show answer
Change both spaces to Pose Space. World Space values change when the armature object moves, so the constraint sees a different result. Pose Space is measured from the armature object, so the relationship between the two bones stays the same wherever the armature sits.