Anchors Aweigh is a 1945 Technicolor musical comedy film featuring a scene with Tom and Jerry. It was directed by future Hanna-Barbera co-founder George Sidney and it starred Frank Sinatra, Kathryn Grayson, and Gene Kelly. In the film, two sailors go on a four-day shore leave in Hollywood, meet a young boy and his aunt, an aspiring young singer, and the sailors try to help her get an audition at Metro-Goldwyn-Mayer.
Tom and Jerry scene
Jerry appears as the ruler of a kingdom where music is banned because he feels he lacks talent, and Joseph "Joe" Brady (played by Gene Kelly) persuades the mouse into performing a song-and-dance number with him.
Tom appears as Jerry's butler.
MGM originally wanted Walt Disney's Mickey Mouse as Kelly's dance partner for the sequence, but Disney was unwilling to license the character.
Hanna and Barbera achieved the effect of Kelly dancing with Jerry by rotoscoping: live-action plates of Kelly dancing alone were shot first, and the action traced frame by frame so that Jerry's movements would match.