Lindemulder, a former porn star who lives in California, wailed when the Orange County, Calif., judge announced the decision. "I'll move! I'll move!" she cried. "I can't get attached and let her go!"
James, 41, and Lindemulder, also 41, faced off in a week-long trial over his move to Austin, which he testified was for business purposes. He was quoted in an online interview that another reason was so his three children can maintain a close relationship with stepmom Bullock.
Lindemulder accused him of moving to simply try to win Bullock back at the expense of Lindemulder's relationship with Sunny. Bullock had helped raise Sunny during the actress's marriage to James and has said she is still close to the child.
The judge said that James and Lindemulder will have joint custody but James can take Sunny to Texas at the start of her new school calendar, which should be around mid-August. Until then, Sunny will be with her mom.
The motorcycle mogul testified Lindemulder, a recovering addict, still has unresolved personal issues and feared that if she "hit rock bottom" it would involve Sunny. Lindemulder says she has been sober for several years and wants to improve trust and communication with her ex.
Reporting by ELAINE ARADILLAS