Maya has a MAYA_PRESET_PATH environment variable, but adding a custom directory to that doesn’t result in any presets in that folder showing up. If I copy the presets from that folder to the standard MAYADIR/presets directory then they will show up. Has anyone had success with loading presets from another directory or do I just need to copy the file to the default directory and delete it after loading?
This problem has been around for awhile, the $MAYA_PRESET_PATH variable is not respected. In that past I’ve symlinked the $MAYA_APP_DIR/presets directory to a shared network location. Another solution might be to create a module with it’s own presets directory, then add the module to your $MAYA_MODULE_PATH, or place the modules mod file in $MAYA_APP_DIR/modules.
Good to know. Considering I only need it for this one case I’ll probably stick to just copying it, but thanks for the alt solution. Also, is there a simple way to get the path to the standard presets dir, or is that what is needed? I couldn’t find a variable that pointed to the version-specific directory in the maya app dir:
appDir = os.getenv('MAYA_APP_DIR')
version = pm.about(version=True)
if pm.about(is64=True):
version += '-x64'
presetsDir = '{0}/{1}/presets'.format(appDir, version)
cmds.about(preferences=True)
Result: C:/Users/{user}/Documents/maya/2015-x64
Ha. How did I miss that. Thanks