Move translations to hip

There are some poses that mess with the actual translations of a character instead of it being on the hip. So there is for example rotate -30 on the character making it hard to move it around and I want this rotation to be on the hip instead.
I could maybe make it manually but there are also some poses that use both and I'd need a calculator for it every time.
I'm pretty sure I saw a script for this somewhere... But I can't remember which one it was.
Edit: Sorry I meant from the hip to the character. So the piviot stays centered to the figure.
Post edited by Illidanstorm on