In the 1940s, Ayn Rand, a Hollywood screenwriter and a Soviet refugee, saw the same type of Communists in Hollywood she encountered in the St. Petersburg of her youth. Her opposition was echoed by many actors and screenwriters who decried the leftist influence in that era.
For the record, Joseph McCarthy never investigated Hollywood, but rather the State Department and the military. Federal scrutiny of the movie industry came largely from the House Committee for Un-American Activities (HUAC) and the FBI of J. Edgar Hoover. The effect of the investigations was to establish the so-called blacklist. The blacklisted members became publicly lauded as heroes after the HUAC and the FBI backed off in the late 1950s. On the other hand, people like Elia Kazan, a former Communist who repented of his earlier beliefs and denounced the Communists, were held in contempt. Slightly later, the Catholic Church backed away from its strong support of movie morality, replacing its Legion of Decency with a more innocuous title as the effects of Vatican II reverberated through that institution. Starting in about 1966, a new "freedom" permitted open lewdness and undisguised subversion in motion pictures.
The Left lost a few battles in the 1950s but won the war to dominate Hollywood. In the last 30 years or so, political positions to the left of Bill Clinton have been career killers, with the exception of a few, like Clint Eastwood, who established their credentials well before the leftist blacklist.