Load preset directory in Maya with python/MEL?
<p>I have a folder where I'm storing some maya presets (specifically nCloth presets) and I would like to make this directory available to all of the users on my current network. To do this, I would like to have this folder added to the MAYA_PRESET_PATH on startup. However, I am not able to create/modify the maya.env file (restricted permissions on network). So, is there a way to append a directory to maya's environment variables using python or MEL, so that I can call a script on startup to dynamically load all of my presets? </p>

<p>I tried the following in my startup MEL script, but to no avail...</p>

<pre><code>python("PRESET_DIR = os.environ.get('MAYA_CUSTOM_PRESET_DIR')"); //Path to my custom preset directory
python("PRESET_DIR = os.environ.get('MAYA_PRESET_PATH') + ':' + PRESET_DIR");
python("os.putenv('MAYA_PRESET_PATH', PRESET_DIR)");
</code></pre>

<p>in your maya.env: </p>

<pre><code>CUSTOM_BASE_PATH = C:\MayaResource #your custom env
MAYA_PRESET_PATH = %CUSTOM_BASE_PATH%\preset;%CUSTOM_BASE_PATH%\plugins;
</code></pre>

python maya mel pymel