Adding To Sqash And Stretch

I've just built a spine rig using Jason Schleifer's rigging dvds.
really simple, and works great, but I'm trying to add a feature.
he has created a simple animation curve, then using frame cache nodes get the values from the curve into expressions that scale Y and Z.
works great, gives a great contour to the torso during squash and stretch.

what I'm trying to do now is allow the animator to move the "bulge" up and down the spine.
Picture a character swallowing a big ball, and you can see it go down the torso, or even a character jumping, and having the "bulge" show some movement, up and down.

I've tried using keyframe expressions, and I've been successfull changing the value at a certain frame by connecting it to an attribute on an object. I can then change the attribute's value and it will change the curve up or down in the graph editor.

This would work perfectly if I could do the same, but changing the time of a keyframe, instead of the value.
I'm not explaining this very well, but to sum up, I want to shift a simple curve in the graph editor left or right by changing an attribute on an object.

any ideas?

Thanks in advance

Have you taken a look at the findKeyframe MEL command? Or perhaps using the scaleKey or related commands might solve your issue.

QUOTE(kurokawa @ 12/06/08, 09:36 PM) [snapback]296582[/snapback]
Have you taken a look at the findKeyframe MEL command? Or perhaps using the scaleKey or related commands might solve your issue.

Not yet, but i definitely will.
Thanks for the input. I'll post when I try it.

Ok, here's how to do it,

scaleKey -curve -time "$first:$lastKeys" -newStartTime $newTime -newEndTime $endTime

this command essentially shifts the curve left or right, you just have to do the math to make sure the difference between $first and $lastKeys is the same as $newTime and $endTime

edit: get rid of the -curve flag.. it's invalid with scaleKey. I mixed up scaleKey and findKeyframe

Thanks so much,

works like a charm! I've been racking my brain for a little while, and never even thought of that!

Sweet.

Cheers