Separated “Smash” star Katharine McPhee was blindsided by photos on Monday of her smooch with married director Michael Morris, her friends said, while sources close to Morris revealed he had a heads-up the pics were going to be released and admitted the affair to his wife.

Page Six exclusively reported Thursday that Morris – who’s been married to “In Plain Sight” actress Mary McCormack for 10 years – warned his wife that the kissy pics were coming out, and that McCormack then threw Morris out of their LA home on Sunday night as a result.

But friends of McPhee’s say she only learned of the pics that showed her and Morris in a romantic lip-lock when they hit the Web on Monday. “Katharine didn’t know about the photos in advance,” said a source close to the actress. “She only saw them on Monday when they were emailed to her.”

McPhee, 29, and her husband, Nick Cokas, 47, have been married since 2008, but have reportedly been amicably separated for months.

Meanwhile, McCormack, who has three kids with Morris, now reportedly wants to end their marriage over the dalliance.

“They’ve been together for more than 10 years and always had such a solid marriage,” a source told Life & Style. “They have three daughters, so it’s incredibly sad. He wants to keep the family together, but as far as Mary is concerned, it’s over. There’s no going back.”

The source further told the mag: “Mary only found out this week about the affair after [Morris] confessed everything to her. She had no idea anything had been going on. The last thing she ever thought was that he was seeing another woman.”

And, “Only time will tell if Michael and Mary can make things work and get over this. He loves Mary and is so sorry about what he’s done.”

Morris also was a producer on the series “Brothers & Sisters,” starring McCormack’s actor brother Will McCormack.