Mark Ruffalo has defended Matt Bomer’s casting as a transgender sex worker in the feature film “Anything,” following criticism by the transgender community.

Ruffalo is an executive producer on the recently wrapped project, in which Bomer portrays a transgender woman. Bomer and Ruffalo played lovers in HBO’s 2014 drama “The Normal Heart.”

“To the Trans community. I hear you,” he wrote on Wednesday. “It’s wrenching to you see you in this pain. I am glad we are having this conversation. It’s time.”

“In all honestly I suggested Matt for the role after the profound experience I had with him while making ‘The Normal Heart,'” he added.

Producers announced on Aug. 29 that Bomer and John Carroll Lynch are starring in “Anything,” with Timothy McNeil making his feature directorial debut. Ruffalo noted two days later that the movie had already wrapped in response to a suggestion that the Bomer’s role be recast.

“Anything,” and more movies such as Eddie Redmayne’s “The Danish Girl,” faced backlash from the community due to the fact that a cisgender actor is playing a transgender character.

The movie also stars Maura Tierney, Micah Hauptman, Margot Bingham and Melora Hardin. Ruffalo and Great Point Media’s Robert Halmi and Jim Reeve are executive producing.

“Anything” is based on McNeil’s play of the same name. Lynch plays a man who is suicidal over the death of his wife and moves from Mississippi to Los Angeles, where he can be under the watchful eye of his protective sister, played by Tierney. He then begins an intense friendship with Bomer’s character. The unlikely new couple must reconcile their vastly different backgrounds as they fill the void in each other’s lives.

“Anything” is being produced by Hauptman, Louise Runge, and Ofrit Peres. Bomer, Tony Lipp, and Scott Wexler also executive produce.

Great Point Media is the distributor. UTA Independent Film Group helped put the film together and is the U.S. sales agent.

“I’m very happy to be part of this daring project,” Ruffalo said in the Aug. 29 announcement. “Love is at the essence of great storytelling and transcends all discrimination and politicization.”