Skip to content

Mount Manager

tobspr edited this page Aug 15, 2014 · 19 revisions

The mount manager manages the pipeline filesystem, and takes care of locating the shaders and allocating the temporary directories.

Setting the base path

You can set a base path, in case the pipeline was not installed in your root directory. You can do this with

self.renderPipeline.getMountManager().setBasePath("root_directory/")

You can pass a relative or an absolute path.

Setting the temporary path

By default, the temporary directory is <basePath>/temp/. In that directory the shader cache and other temporary pipeline files will be stored. However, if your application does not have write permission to that directory, the pipeline will fail to load. You can set the write directory with

self.renderPipeline.getMountManager().setWritePath("write_directory/")

Important: The pipeline will not delete the write path! Your application has to take care of cleaning it after closing, e.g:

import atexit
import tempfile
import shutil
writeDirectory = tempfile.mkdtemp(prefix='Pipeline-tmp')
self.renderPipeline.getMountManager().setWritePath(writeDirectory)
atexit.register(shutil.rmtree, writeDirectory)