Judge Thomas Schulte ruled that James will have physical custody of Sunny, 6, and Lindemulder, who was recently released from a halfway house, will share legal custody. She will see Sunny once a month in California, get half of Thanksgiving and Christmas holidays, two-thirds of summer vacation and all of spring break.

Sunny will stay with Lindemulder for the remainder of the summer before moving to Texas to attend school in the fall. Financial issues will be determined at a later court date.

Judge Schulte said he based his decision on Sunny's bond with her siblings that live with their father, Chandler, 15, and Jesse Jr., 12 "and the fact that she is doing well in her father's care." Sunny's relationship with Bullock's adopted son, Louis Bardo, did not come up, although Lindemulder has said Sunny misses him.

Even though the judge ruled that Lindemulder was clean off drugs, he had concerns about that she was in a "fragile position to make poor decisions," including the one to wed an ex con while incarcerated (from whom she is already separated), despite it being a probation violation.

James was all smiles upon entering the court Tuesday, but stoic on the way out. He did not speak to reporters or photographers before jumping on his motorcycle and speeding away. After court, Lindemulder said, "[Sunny] will be fine. It hurts. Sandy is good. Jesse is good. Sunny loves baby Louis. She's excited to move to Texas. [Bullock] will be good for her."