Sub topic 14
Constraint Order and Evaluation
Assume you can create an armature, switch to Pose Mode, and add basic constraints. This chapter focuses on how Blender evaluates those constraints, not on creating a complete character rig.
Why Constraint Order Matters
A bone's constraints form an ordered stack. Blender evaluates the stack from top to bottom. Each constraint receives the transform produced by the constraints above it and modifies that result for the constraints below it.
For example, suppose a bone has these constraints:
- Copy Rotation
- Limit Rotation
The bone first copies a rotation, then the limit clamps that copied rotation. If you reverse the order, Copy Rotation can replace the result produced by Limit Rotation. The final pose can therefore exceed the intended limit.
| Stack order | Typical result |
|---|---|
| Copy Rotation, then Limit Rotation | The copied rotation is clamped |
| Limit Rotation, then Copy Rotation | The copied rotation may override the limit |
You can change the order by dragging constraints in the Bone Constraints panel. The Python API provides the same operation:
import bpy
rig = bpy.data.objects["ArmRig"]
bone = rig.pose.bones["forearm"]
# Move the second constraint to the top of the stack.
bone.constraints.move(1, 0)
for index, constraint in enumerate(bone.constraints):
print(index, constraint.name, constraint.type)The indexes are zero-based. Index 0 is the first constraint evaluated.
Evaluation, Spaces, and Influence
Order is only one part of the result. Blender also evaluates each constraint using its owner space and target space. A Copy Rotation constraint in local space can produce a different result from the same constraint in world space, even when the stack order is unchanged.
Influence scales how strongly a constraint affects the current result. An influence of 0 disables the visible effect. An influence of 1 applies the full effect. Intermediate values blend the constraint with the transform already produced by earlier evaluation.
A constraint can also depend on another constrained bone. Blender's dependency graph calculates those relationships, but circular dependencies can produce warnings, unstable motion, or a rig that cannot evaluate as intended. Avoid making Bone A depend on Bone B while Bone B depends on Bone A.
> warning > When debugging a rig, inspect the stack from top to bottom. Check each constraint's target, spaces, influence, and limits before changing unrelated bones.
A Practical Ordering Rule
Use this general pattern:
- Use Copy or tracking constraints to create a broad motion.
- Use Limit constraints afterward to clamp that motion.
- Place IK where it can solve the intended chain without being unexpectedly overwritten.
- Keep constraints that intentionally override earlier results near the bottom.
Test one constraint at a time. Temporarily set influences to zero, then restore them in stack order. This reveals which constraint introduces a sudden rotation or flip.
Exercise
A forearm has Copy Rotation followed by Limit Rotation, but it still rotates beyond the limit. What should you check first?
Show answer
Check that Limit Rotation is enabled on the required axes, uses the intended owner space, and appears after Copy Rotation in the stack. Also verify that another later constraint is not overriding its result.