Directors direct documentaries; they don't often appear in them.

But that's not to say they don't make fascinating subjects. This year's Cannes Film Festival saw three unveiled with wildly differing agendas. Me & Me Dad is a gentle, meandering portrait of Deliverance's John Boorman, by his daughter Katrina, while Roman Polanski: A Film Memoir is a rather more self-serving account by the director of his controversial life. Bob Weide's Woody Allen: A Documentary, on the other hand, is one for the fans.

The writer-director-actor behind such comic gems as Annie Hall and Manhattan, the last time Allen appeared in a documentary was Barbara Kopple's 1997 film Wild Man Blues. Showing him on his 1996 tour in Europe with his jazz band, critics took the film as a PR exercise to mend his severely damaged public image in the wake of the scandal he endured when he and Soon-Yi, the adopted daughter of his former partner/muse Mia Farrow, got together. As Weide discovered, it was an affair that lodged in the public consciousness.

"The first thing I'd hear when I'd say I was doing a documentary on Woody Allen is 'How are you going to cover the Mia Farrow/Soon-Yi thing?'" he says. "As interested as I am in Woody Allen – and I don't say this as a defender or an apologist – I genuinely find that to be the least interesting thing about his life. I knew I would cover it but I didn't want it to hijack the film. The film is about his work. It's about his life to the degree that it informs his work, and I didn't want the film to become a courtroom drama. Who needs it?"

With Allen offering full co-operation, it could've been a chance for the director to pull a Polanski and explain his actions. He doesn't. "Everybody had an opinion about my private life, which I felt they were free to have," he says in the documentary. "None of that mattered to me." What it does show is Allen's ability to compartmentalise; during the height of the scandal, he was still, regular as clockwork, writing Bullets Over Broadway. "I think that's not only the key to how prolific he's been but how he survives these personal episodes that could capsize somebody else's career," says Weide.

A former Curb Your Enthusiasm director, with docs about the Marx Brothers and Lenny Bruce to his name, Weide's unprecedented access stretches from accompanying Allen to his old Brooklyn neighbourhood to peeking around his office (where he still uses a manual typewriter). But his real scoop is filming his subject on the set of You Will Meet a Tall Dark Stranger.

Allen never allows camera crews on his sets (and told Weide "My sets are very boring. I barely talk to the actors. I mainly sit and stare"). "What he didn't understand is that by virtue of it being Woody Allen on the set, it's already interesting because nobody has seen that."

Allen's machine-like work-rate – since 1969's Take The Money and Run, he's written/directed a further 40 feature films, virtually one a year – almost derailed Weide, however. "This guy is so prolific he made three films in the time it took for me to make the documentary." When one of them, 2011's Midnight In Paris, unexpectedly became the biggest hit of Allen's career, Weide then had to shoot an explanatory epilogue. "I told Woody in an e-mail, by accident we have a happy ending to the film. And he wrote back saying 'Don't trust happy endings! There's no such thing as a happy ending. The next film could just as easily be a disaster!'"

While Weide argues that Allen's importance stems from his unique "level of independence" (his films are funded without financiers seeing scripts), what the film doesn't try to do is cover every Allen project. Instead, cut in with numerous interviews including a touching Diane Keaton chat (only Farrow declined to participate, unsurprisingly), we see time devoted to Allen's "origins and roots" – the high-school years writing jokes for newspaper columns, his stand-up career and his transition from "early funny movies", via the game-changing Oscar-winner Annie Hall, to 1980s experimental fare like Stardust Memories.

Weide, rightly, argues it "would be repetitive" to simply churn through every Allen film, but as the doc gets more selective, it's a tactic that does allow him to conveniently skip over the fallow years, when efforts like Hollywood Ending (2002) left critics cold. Weide argues "I'm not so sycophantic that I love of all of them", but unashamedly admits his film is a "very public thank you letter" to Allen for all his movies. Understandably, its gentle fandom left Allen very happy. "The great line he gave me was 'I'm 76 year -old and you're the first person who has come along who has managed to humanise me – and that includes several shrinks.'"

Woody Allen: A Documentary screens from June 8. It is at Edinburgh's Cameo from Thursday, June 14.