yihui/knitr — pull request #838 by ajdm (2014-09-02 22:17:41+00:00)
Title: Create figure directory for rgl plot if it does not already exist

Currently, if an rgl plot is the first plot in a document the snapshot will not be saved as the output figure directory does not exist. While this is currently created for 'standard' plots, it is not for rgl ones. This adds the same to the rgl hook, ensuring that documents that have an rgl plot before a 'standard' plot will build correctly.