Brett Ratner is set to direct “Playboy,” the Universal Pictures and Imagine Entertainment film about the life of Playboy magazine founder Hugh Hefner. Brian Grazer is producing, and John Hoffman is writing the screenplay.

Grazer optioned Hefner’s life rights several years ago. The producer’s “8 Mile” scribe Scott Silver tried it as a musical, and Oliver Stone developed several drafts. Making a film of Hefner’s long life as icon of the sexual revolution has proven difficult, but Ratner and Hoffman found a way to do it that pleased Grazer and the 81-year-old Hefner, who approved the take late last week in a meeting at the Playboy Mansion.

Ratner, who completed “Rush Hour 3” for an Aug. 10 release through New Line and has a rep as a playboy himself, knows much about the mag’s history, though his mansion visit was his first. When Grazer made his original deal with Hefner, Ratner sent the producer his Playboy pinball machine, which sits outside Grazer’s office at Imagine.

Still, Ratner got the call only recently, after Stone departed to focus on “Jawbreaker,” the Paramount drama he’ll direct about the post-9/11 invasion of Afghanistan and hunt for Osama bin Laden. Ratner has been working with Grazer on a Russell Gewirtz-scripted drama, conceived as a caper film in the spirit of “Ocean’s Eleven,” in which a group of employees of Manhattan’s Trump Tower rob its rich residents. Ratner and Grazer have Eddie Murphy and Chris Rock attached and hope to enlist Chris Tucker, Dave Chappelle, Jamie Foxx, Denzel Washington and Sidney Poitier. Trump has given his blessing and may appear in the film.

Ratner’s waiting for a rewrite, and Hoffman just began writing the Hefner pic. The director next will shoot whichever one is ready.

“Hef came from a puritanical upbringing and reinvented himself to be the godfather of the sexual revolution,” Ratner told Daily Variety. “He also used his magazine to advocate civil rights and free speech, and put James Brown on his show ‘Playboy After Dark’ when they didn’t put black performers on national television. He broke all kinds of taboos, especially in sexuality. I want to show it all, from the First Amendment struggles to his first orgy to the stroke in the 1980s that almost killed him.”

Hoffman most recently scripted “Queen of the Jews,” a biopic of scandal-scarred former Miss America Bess Myerson that Bill Condon will direct.