/* Snap keyframes to Integer Time - hf_alignKeys.mel - By Howard Fuller for info see www.andrewsilke.com/mel_info.html WHAT IT DOES this script moves all the keys on a selected object to the nearest whole frame number. HOW TO INSTALL 1. Copy the mel file to a directory on your scripts path eg. documents path \maya\5.0\scripts 2. map the following to a hotkey or shelf button: source hf_alignkeys.mel; HOW TO USE 1. Press the hotkey or shelf button to run script */ string $nodesSelected[]; $nodesSelected = `selectedNodes`; //print $nodesSelected; // Clears the selection of all the keys that might be selected selectKey -cl; // Selects all the keys in the selected object selectKey $nodesSelected; // snaps all keys to whole frame numbers. bufferCurve -animation "keys" -overwrite false; snapKey -timeMultiple 1 ; print $nodesSelected; print " Keys are now moved to nearest whole frame";