Jennifer Garner apologized to her director for her performance the day after Ben Affleck split

Jennifer Garner apologized for her sub-par acting the day after she and ex-husband Ben Affleck agreed to a divorce, her former director has revealed.

Hollywood filmmaker Barry Sonnenfeld, whose credits include Men in Black and The Addams Family, revealed how Garner was “a little off” on the final day of filming of 2016 fantasy comedy Nine Lives.

In his new memoir, Best Possible Place, Worst Possible Time, Sonnenfeld tells how Garner regularly flew to Los Angeles during filming to help Affleck, who was “having problems.”

But he was still stunned by the revelation and recalls how he “burst into tears” when the actress told him she and Affleck were splitting up.

Despite her own emotional pain, Garner, 52, reportedly comforted Sonnenfeld, 71, telling him, “It’s going to be okay. It’s the best’.

Jennifer Garner arrived on the set of her film Nine Lives the day after she and then-husband Ben Affleck called it quits and apologized for not being up to par, her director has revealed

“I don’t know who was more confused,” Sonnenfeld wrote. “The 300 extras wondering what that nice Mrs. Garner had said to Mr. Barry to upset him so much, or Jennifer herself who was forced into the role of the calm one after I somehow found the injured party in this discussion had become .’

Sonnenfeld reveals in the book, a copy of which was obtained by DailyMail.com, that Garner’s grief took place on the set of the film in which she co-starred with Kevin Spacey and Christopher Walken.

“Jennifer Garner is a beautiful person inside and out,” he wrote. “Every time she could, she flew back to Los Angeles, where she dealt with her husband, Ben, who was having problems.

‘On her last day of filming, Jennifer was a bit absent. We were in a large ballroom with hundreds of extras. I took her to the side of the room and asked if she was okay. Behind her, in the distance, were hundreds of extras.

‘She apologized for not being at her best. Ben and Jennifer had decided to divorce the night before. I burst into tears. “It’s okay, Barry. It’s going to be okay,” Jennifer promised. “How is that possible?” I whimpered.

”Shhh. It’s okay [Garner replied]. It’ll be fine. It’s for the best.’, ‘I don’t think so,’ I cried.’

In July, DailyMail.com reported that Garner had made a conscious decision to distance himself from the “circus” surrounding Affleck’s marriage to Jennifer Lopez, which recently ended.

Garner and ex-husband Affleck, 51, were married for 10 years before divorcing in 2018. They are parents to Violet, 18, Fin, 15, and Samuel, 12.

Nine Lives, in which she played Nina Brand, the wife of a businessman whose mind is trapped in his daughter’s cat, was released two years before their divorce was finalized.

Barry Sonnenfeld, who directed Garner in the film Nine Lives, revealed how she apologized after her performance on the final day of filming fell through due to the breakdown of her marriage.

Barry Sonnenfeld, who directed Garner in the film Nine Lives, revealed how she apologized after her performance on the final day of filming fell through due to the breakdown of her marriage.

Garner was married to Affleck for ten years and the two share three children together

Garner was married to Affleck for ten years and the two share three children together

Sonnenfeld also reveals in the book that he had problems with Garner’s co-star, the now disgraced Spacey: “Kevin was not fun to work with,” he writes. “He was mean, useless, critical of other actors, and he had the kind of personality that I tried to ignore as much as possible.”

Sonnenfeld also reveals in the book that he clashed with comedy star Tim Allen on the set of the 2002 comedy flop Big Trouble. “There was a handful of Tim on set,” Sonnenfeld writes. “He was loud and his jokes were repetitive and sometimes mean.”

Sonnenfeld did this in his new memoir, Best Possible Place, Worst Possible Time, obtained by DailyMail.com

Sonnenfeld did this in his new memoir, Best Possible Place, Worst Possible Time, obtained by DailyMail.com

He talks about the time Allen bizarrely said on the set of his co-star Rene Russo – one of Hollywood’s most successful leading ladies in the 1990s – “I’m not attracted to her.”

“We were filming the scene where Rene and Tim meet for the first time,” Sonnenfeld writes. “It’s important that we immediately feel the chemistry between the two.”

The director remembers telling Allen, “Hey Tim, you must be in love with Rene right away.” “Why would that be me?” Tim asked. “Well, she’s beautiful and in the previous scene where you first saw her, she was funny and witty…”

“I’m not attracted to her,” he said of one of the most beautiful women I’ve worked with in the presence of that very beautiful woman.

‘I’ll behave attractively, Tim. I promise,” Rene whispered in a sultry Marilyn Monroe voice. [Allen replied]”It’s hard to be attracted to someone if he or she isn’t attractive.”

Sonnenfeld then remembers telling Allen, “You’re an actor, Tim. It’s like being attracted to one of the most beautiful women in the world. OK?’ “I can try,” Tim said helpfully.

Garner, pictured on the red carpet for the film's 2016 premiere, ultimately comforted Sonnenfeld about her divorce despite her own emotional distress.

Garner, pictured on the red carpet for the film’s 2016 premiere, ultimately comforted Sonnenfeld about her divorce despite her own emotional distress.

In the film, Garner played Nina Brand, the wife of a businessman whose mind becomes entangled in his daughter's cat. The film premiered two years before Garner and Affleck finalized their divorce

In the film, Garner played Nina Brand, the wife of a businessman whose mind becomes entangled in his daughter’s cat. The film premiered two years before Garner and Affleck finalized their divorce

“I apologized to Rene, who seemed more amused than hurt by this vile human being, and we got through the shoot.”

This isn’t the first time Allen, star of The Santa Clause franchise and TV series Last Man Standing, has come under fire for a memoir.

In her tell-all, Love, Pamela, Pamela Anderson claimed that Tim Allen showed his genitals to her more than thirty years ago on the set of Home Improvement in 1991, when she was 23 years old and he was 37.

Allen denied the allegations, telling Variety, “I would never do something like that,” adding that the incident “never happened.”

Sonnenfeld also talks about clashing with Donald Trump on the set of a Macy’s Christmas commercial he directed in 2009, which also featured Martha Stewart, Queen Latifah, Usher, Mariah Carey and Jessica Simpson.

Sonnenfeld revealed that Garner would regularly fly back to Los Angeles during filming because Affleck was 'having problems'

Sonnenfeld revealed that Garner would regularly fly back to Los Angeles during filming because Affleck was ‘having problems’

Sonnenfeld calls Tim Allen a 'mean person' for telling Rene Russo he wasn't attracted to her on the set of their 2002 film Big Trouble

Sonnenfeld calls Tim Allen a ‘mean person’ for telling Rene Russo he wasn’t attracted to her on the set of their 2002 film Big Trouble

According to Sonnenfeld, Trump objected to the way he was being filmed and demanded that he be filmed from his “good side.”

Sonnenfeld remembers Trump saying, “Find a camera angle that shows my good side or we’re done here because trust me, you’re not going to shoot me from my bad side and if you can’t do that, then I am. leave.’

After the director thanked him for his time, he says Trump “stormed out” before coming back and saying, “You can shoot the close-up of my bad side.” Sonnenfeld replied, “No need, Donald. We have moved on. But thanks for coming.”

Best Possible Place, Worst Possible Time: True Stories from a Career in Hollywood by Barry Sonnenfeld is published by Hachette Books.