GIMBLE LOCK
Hi freinds today I want to share an amazing post that from Cameron fielding, how to overcome the gimble lock situation. Generally this problem occurs when we convert animation from STEPPED to SPLINING mode. When we start blocking our animation in stepped mode we dont think about what's going on with the inbetweens, we just focus on making keyposes as perfect as possible, by doing so we sometime messup our rotate gimble pivot because of using the local rotate pivot with world rotate pivot for posing character in blocking mode. This is what happens when we go from stepped mode to splining mode or linear mode
This is where the magical wonder that is the "Euler filter" ( pronounced "oiler" ) comes into action. Maya takes these rotation curves that have become entangled, and reorganises them so we get the rotation we originally wanted - effectively completely solving the gimbal lock problem in one mouse click.

After applying the euler filter, the rotation of the arm is exactly as we "planned" it to look when we set the original poses. There is probably some pretty intense mathematics going on here, but luckily we don't have to worry about that!
So if you choose to work in a certain way, you can effectively just ignore gimbal lock and concentrate on your animation. If you ever see weird interpolation happening on your rotations, just apply the euler filter, watch it fix itself, and carry on animating!