The film was released after a six-year hiatus in the series caused by legal disputes, during which Timothy Dalton resigned from the role of James Bond and was replaced by Brosnan. M was also recast, with actress Judi Dench becoming the first woman to portray the character, replacing Robert Brown. The role of Miss Moneypenny was also recast, with Caroline Bliss being replaced by Samantha Bond; Desmond Llewelyn was the only actor to reprise his role, as Q. It was the first Bond film made after the dissolution of the Soviet Union and the end of the Cold War, which provided a background for the plot. Principal photography for "GoldenEye" took place in the UK, Russia, Monte Carlo and Puerto Rico; it was the inaugural film production to be shot at Leavesden Studios. The first Bond film to use computer generated imagery, "GoldenEye" was also the final film of special effects supervisor Derek Meddings's career, and was dedicated to his memory.