Dennis Quaid Buys Ritzy House For Ex and the Twins

3/2/2013 6:00 AM PST

Dennis Quaid Buys Ritzy House for His Ex and the Twins

Dennis Quaid really stepped up in his divorce ... we found out he's buying a swanky house for his soon-to-be ex-wife and their twins.

TMZ obtained legal docs which show ... Dennis and Kimberly Buffington-Quaid bought a $3.1 million house last month in Pacific Palisades.  The seller was TV honcho John Nogawski.  The title to the house is held by both Dennis and Kimberly.

Under the terms of the divorce settlement ... Kimberly and the 5-year-old kids are allowed exclusive occupancy of the house until the children turn 18.  The settlement conditionally allows Kimberly to stay even longer.

Kimberly will be hobnobbing with neighbors such as Steven Spielberg, Tom Hanks and Bill Cosby.

One thing's for sure ... Dennis is a good divorcer.