How to Drive Shape Keys with Object Rotation in Blender

Driving a shape key with an object's rotation in Blender allows you to automate mesh deformations—such as muscle flexes or joint corrections—based on how a control object or bone rotates. This guide provides a direct, step-by-step walkthrough for adding a driver to a shape key, target-configuring the driving object's rotation axis, and adjusting the driver math for precise animation control.

Step 1: Create the Shape Key

  1. Select your mesh object and navigate to the Object Data Properties tab (the green triangle icon).
  2. Expand the Shape Keys panel.
  3. Click the + button once to create the Basis key (the default mesh shape).
  4. Click the + button a second time to create a new shape key (e.g., Key 1).
  5. Select Key 1, enter Edit Mode, modify your mesh to the desired deformed shape, and return to Object Mode.

Step 2: Add a Driver to the Shape Key Value

  1. In the Shape Keys panel, hover over the Value slider of your newly created shape key (which defaults to 0.000).
  2. Right-click the Value slider and select Add Driver. A pop-up driver configuration window will appear.

Step 3: Configure the Target and Rotation Axis

  1. In the driver pop-up panel, set the Type to Scripted Expression.
  2. Locate the variable setting (default name is usually var).
  3. Set the input type dropdown from Property to Transform Channel.
  4. In the Object field, select the object or armature driving the shape key.
    • If using an armature, an extra field will appear allowing you to select the specific Bone.
  5. Change the Type dropdown to the rotation axis you want to track (e.g., X Rotation, Y Rotation, or Z Rotation).
  6. Change Space to Local Space. This ensures only the relative rotation of the object/bone triggers the shape key, ignoring world position changes.

Step 4: Adjust the Driver Expression for Radians

Blender measures rotation in radians rather than degrees (1 radian is approximately 57.3 degrees, and 90 degrees equals roughly 1.57 radians).

  1. In the Expression field, the default is var.
  2. If your shape key reaches full deformation (1.0) too slowly or quickly, modify the math expression:
    • To make the shape key reach 1.0 at 90 degrees of rotation, set the expression to: var / 1.57
    • To invert the rotation direction, use a negative multiplier: -var or -var / 1.57
  3. Hover off the panel or press Update Dependencies to apply the expression.

Step 5: Test the Setup

Select your control object or bone and rotate it along the chosen axis in Pose Mode or Object Mode. The shape key's value slider will automatically move between 0.000 and 1.000 corresponding to the object's rotation.