JR_StraddleZero - Center animation curves at zero
Quickly center your keys in the Graph Editor
When working with animation cycles, you often need your keys to be perfectly centered at zero in the Graph Editor. Otherwise, your character could appear to be limp or lop-sided. This is a two-part script that you can assign to hotkeys or two shelf buttons. The "straddle_group()" command will center selected animation curves around zero as a group, and "straddle_individual()" will treat each animation curve individually.
Instructions:
Create a shelf button or a hotkey and assign this code:
import JR_StraddleZero
JR_StraddleZero.straddle_group()
Do the same for the individual function:
import JR_StraddleZero
JR_StraddleZero.straddle_individual()
Then, select the curves in the Graph Editor that you want to center perfectly around the zero-line. Now run the code via hotkey/shelf button. The curves will update and you should get a confirmation in the command line.
How to Install:
Save the script file to your default "scripts" folder (make sure it's the folder and not the other ones!) Then restart Maya and you're good to go!
Includes: JR_StraddleZero.py (python script tested on Maya 2015, 2019, 2020)