Sub topic 3
Copy Rotation, Location, and Transforms
This chapter assumes you can create bones in Edit Mode, switch between Object, Edit, and Pose Mode, keyframe a property, and read short Python scripts. You should already understand inverse kinematics (IK) chains and the ArmRig armature from the previous chapter.
Copy Constraints
Copy constraints make one bone follow another bone's motion. Blender has three:
- Copy Rotation copies rotation only.
- Copy Location copies position only.
- Copy Transforms copies location, rotation, and scale together.
Each constraint needs a target armature and a bone name in the Subtarget field. The axis checkboxes choose which axes are copied. The influence value, from 0 to 1, sets how strongly the constraint applies.
Tracking Constraints
- Damped Track turns the bone's Y axis toward a target by the shortest path. Use it to aim helper bones.
- Track To lets you choose which axis points at the target and which axis points up.
- Stretch To scales the bone's Y length so its tip reaches the target. Its volume setting controls how the bone thickens or thins as it stretches.
This example aims a helper bone named aim_helper at the elbow pole control:
import bpy
rig = bpy.data.objects["ArmRig"]
helper = rig.pose.bones["aim_helper"]
track = helper.constraints.new('DAMPED_TRACK')
track.target = rig
track.subtarget = "elbow_pole"Constraint Order and Evaluation
Blender evaluates a bone's constraint stack from top to bottom. Each constraint starts from the result of the constraint above it, and its influence blends its effect into that result. Order therefore changes the final pose. A Limit Rotation constraint placed above an IK constraint limits the bone before IK moves it, so IK can push the bone past the limit. Place Limit Rotation below IK to clamp the IK result.
flowchart TD
A["Rest pose"] --> B["Copy Rotation"]
B --> C["IK"]
C --> D["Limit Rotation"]
D --> E["Final pose"]caption: Constraints on one bone are evaluated from top to bottom. alt: A vertical flow from the rest pose through Copy Rotation, IK, and Limit Rotation to the final pose.
Building a Simple Arm Rig with Control Bones
Build the arm with two control bones: hand_ik moves the hand, and elbow_pole sets the bend direction. Keep the IK constraint on forearm with a chain count of 2. Add a custom property named ik_switch to hand_ik, as shown in the earlier chapter, so you can blend between FK and IK.
Blending FK and IK with Influence and Drivers
Drive the IK influence from ik_switch. The table shows the expected results:
| ik_switch | IK influence | Result |
|---|---|---|
| 0.0 | 0.0 | FK: the forearm uses only its own rotation |
| 1.0 | 1.0 | IK: the forearm solves toward `hand_ik` |
| 0.5 | 0.5 | Partial blend of FK and IK |
Troubleshooting Flipping, Twisting, and Jitter
- Flipping: The IK chain bends the wrong way. Add or adjust the pole target, then tune the pole angle.
- Twisting: Bones in the chain have different roll values. Compare the Roll values in Edit Mode.
- Jitter: Two constraints fight over the same bone, or constraints target each other in a loop. Remove one of the conflicting constraints.
- Overstretching: A Stretch To constraint has no limit. Add a Limit Distance constraint.
Keyframing and Baking Constrained Animation
Keyframe the control bones and the ik_switch property. To export the animation or remove the constraints, select the armature, choose Object > Animation > Bake Action, and enable Visual Keying. Enable Clear Constraints only after you save a copy of the file.
Clear Constraints removes the constraints from the bones. Save the file before you bake with this option.Exercise
A Limit Rotation constraint is placed above an IK constraint on the forearm. Will the limit clamp the final IK pose?
Show answer
No. The Limit Rotation runs first, so IK moves the bone afterward and can exceed the limit. Move the Limit Rotation below the IK constraint.