EXCLUSIVE

Morena Baccarin -- the "Homeland" star who played Brody's wife -- will go to court today in her divorce case and reveal she's pregnant, and the father is her "Gotham" co-star Ben McKenzie.

Baccarin filed documents Thursday asking the judge to award joint custody of their 1-year-old son ... but here's the kicker ... she wants her estranged husband, Austin Chick, to move from L.A. to New York where she films the show.

We're told Baccarin is at the end of her first trimester. Even though she's able to fly now, she wants the judge to make a proactive order since there will come a point where she can't get on planes to pick up and deliver their son.