# Pivot constraint

Wednesday, March 17th, 2010

#### Downloadable Files

- PivotConstraint.1 (711)
- PivotConstraintExample (749)

This script helps you to use a bone in an armature as an animated pivot point.

It can be very helpfull in making things like a heel/toe rig for a foot.

# Requirements

This script is written for blender versions newer than 2.45

# Setting up your rig for the script

You will basicly need 2 bones for the script to work.

1. the bone that the script is assigned to (this bone is affected by the script)

2. the pivot bone that manipulates bone nr 1.

You want both bones to be in exactly the same location/rotation in edit mode when you create them.

In the example file I named the pivot bone pivot and the bone that the script is assigned to foot.

I also made a parent bone for the both of them called location, that way you can move them together, but it’s not nessecary for the script to work.

# Assigning the script

You have to have the script open in blender to be able to assign it.

So open it in a text editor window.

Now you can select the bone you want to assign the script to andOadd a script constraint.

The script should be available in the script dropdown box.

Set the spaces to local space and assign the pivot bone as the target.

# Options

If you click on Options you will get a small popup with one setting.

If you have Only location selected the rotation of the bone that the script is assigned to isn’t affected by the script.

Normally you want the location and rotation both to be affected, but I thought it might be nice to have the option.

I didn’t add an Only rotation option because then it would just be a copy rotation constraint, and we already have one of those.

# Animating with the pivot setup

The idea is that now you have your pivot bone, you don’t need to animate/rotate/move your foot bone anymore. All you use is the pivot bone, and/or the parent(s) of the foot/pivot bones.

For a step simpy think like this… move the location bone (the parent) to where the ground is, then move the pivot to the point the foot rotates around… then rotate the pivot to the angle you need… voila.

If you’re not carefull you can make some really strange things happen, but I purposely left everything simple (script wise). This way it’s up to you to make it usefull ;)

# That’s all

It can be a bit tricky to get the hang of this functionality, but I’m sure it’ll prove usefull to some.

enjoy
Dolf