Rotation range expression, shape keys driven by bones.

Hi,

I’m not familiar with python, I need to have an expression in drivers to drive shape key (deformation fix) with a bone.
Nothing hard if We consider transform channel with, in this case X rotation. But I need to have the shape key driven in certain range of rotation. For example from 50 to 75 degree in local bone space.

I will be very thankfully to someone who can help Me with this.

Best Regards,
Kamil.

hi.

A python expression is not required todo this, unless you need more than one driver variable, or additional data.

First set the Type to Average Value, then make a Transform driver variable, with the armature bone x rotation, local space.
Then you want to modify the fcurve keyframes.
One should be Frame: 0.872 (50*), Value: 0.0.
The other should be Frame: 1.308 (75*), Value: 1.0.

Presuming thats how you want to map the bone rotation to shape key value.
Heres and example file: http://www.pasteall.org/blend/32258

I try this method, but I now see that I forget to change scripted expression to averaged value.

Thank You very much, It work’s :smiley:

Best Regards,
Kamil.