Just as the Disney-Pixar movie “Coco” began its Tuesday night previews, news broke that animation guru John Lasseter would be taking a six-month leave over allegations of inappropriate behavior toward women. Lasseter, who runs both Pixar and Disney Animation, apologized in an email to those “on the receiving end of an unwanted hug or any other gesture they felt crossed the line.”

It was an unfortunate juxtaposition for the highly anticipated movie, as Hollywood grapples with an ever-widening sexual harassment scandal, but it’s not expected to hurt the film’s box office ahead of the critical Wednesday-Sunday holiday time frame.

“Coco” has already set a record for the highest grossing film ever to open in Mexico, with $48 million to date, and in the U.S., it could potentially beat “Justice League” and debut as the top film over the Thanksgiving weekend with about $60 million. Past Disney titles that have opened over the same period include “Frozen,” which set the record in 2013 with $93 million, followed by last year’s “Moana” with $82 million, “Toy Story 2” with $80 million, and “Tangled” with $68 million.

The movie is expected to win over Latino audiences in the U.S., particularly those of Mexican heritage. But that acceptance wasn’t always guaranteed.

Back in 2013, plans by Disney-Pixar to make a movie about the Day of the Dead, the Mexican cultural celebration, were met with outright hostility and calls for a boycott when the studio filed a trademark application for the phrase.

The outcry underscored the fact that Latino stories and characters are largely invisible in major Hollywood films. Latinos were angry and voiced suspicions that the Disney entertainment juggernaut would exploit a cultural holiday for commercial gain. And then, there was the matter of the storytelling: Who would get to tell it and would filmmakers rely on stereotypes and cultural clichés?

As “Coco” debuts, it’s clear that the painstaking research by directors Lee Unkrich and Adrian Molina and Pixar’s uncharacteristic collaboration with outside consultants is paying off. Mexican reviewers praised the film as a love letter to their country, lauding Disney for wielding its power to shape perceptions of the country and its traditions at a time when President Donald Trump has denigrated Mexicans as rapists and murders. Debuting at the Morelia Film Festival in Mexico, the film melted away Mexican viewers’ hostility and skepticism and quickly became adored.

“I don’t even know that we hoped for that,” Unkrich tells Variety. “At best, I hoped the movie would be embraced and not rejected by the people in Mexico. It could have gone the other way.”

The “Toy Story 3” director said in recent weeks, he has received hundreds of messages on Twitter from people thanking him for the authentic and respectful portrayal of a cultural celebration like the Day of the Dead.

The central character in “Coco” is Miguel, a 12-year-old who dreams of becoming a musician and is voiced by Anthony Gonzalez. He meets a trickster-musician named Hector, voiced by Gael García Bernal, and sets off to find out the real story behind Miguel’s family history in the Land of the Dead.

Because of the diversity of the U.S. Latino population, it’s unclear yet how the film will resonate with other segments of the Latino population. Will the Mexico-specific movie appeal to Puerto Rican in New York or Cubans in Miami? With no other new animated films in the market, it should have no trouble recruiting a wide family audience.

The emotional punch of Disney/Pixar’s “Coco” doesn’t come solely from a well-told story about family and remembrance from the vaunted animation studio. It comes from representation.

“Every so often, there will be someone who, in seeing the film and talking about it, has trouble vocalizing what they’re feeling,” said Molina, whom Unkrich elevated to co-director after the Mexican-American storyboard artist wrote parts of the script. “I know what they’re feeling,  because it is an experience when after seeing yourself misrepresented on screen, finally you see someone who says you are beautiful and powerful and your story is transformative and important. You see that reflected on the screen and it imbues you with a confidence.”

The multi-year effort to bring “Coco” to screens made for a lot of firsts at Pixar. The picture is the first Pixar title to focus on a specific culture, and it also involved a level of research not previously required of other Pixar films. “That kind of rigor is not one we’ve ever had to apply,” Unkrich said.

The filmmakers traveled to Mexico a number of times, visiting big cities and small towns to see how Day of the Dead is celebrated in both urban and rural areas of the country. Unkrich said Pixar employees of Mexican descent were consulted, in addition to the professional consultants brought on to the project.

Each person brought their own experiences and “there were sometimes very spirited conversations,” Unkrich said. “There’s not one way to depict a Latino family.”

As an example, Unkrich recalls that Miguel’s grandmother originally carried a wooden spoon in her apron and when she’d get angry, she’d hit others with the spoon. But the object was changed to become more realistic: Mexican matriarchs have been mythologized for their weapon of choice in disciplining unruly children: la chancla, or a sandal. The small detail drew instant laughs during the film’s Los Angeles premiere.

Rodrigo Llanes Salazar, a cultural anthropologist at the National Autonomous University of Mexico, said the film managed to capture Mexico’s traditions accurately, with something of a modern twist, particularly in gender.

“It’s a very traditional representation of what is Mexican, with positives like family solidarity and the important role of women,” Llanes Salazar said. “It goes beyond the idea of the dominant, macho Mexican male and highlights instead the matriarchs. Still, the film is rooted in the past, which helps shape what one associates with Mexico.”