additional information - user defined presets
Thanks for your reply. Your answer definitely helped me think through this problem more.
The location for native Maya fur description presets:
MAYA_ROOT/presets/attrPresets/FurDescription
- User defined presets for fur are not saved in this is location.
- I was surprised when I did not see the presets I created.
I did some more searching and found a way to locate where user presets are stored:
https://www.cgsutra.com/autodesk_maya...m_commands.php
// lists the directory where user presets are stored.
print (`internalVar -ups` + "\n");
../Library/Preferences/Autodesk/maya/2011-x64/presets/
- (on my Mac)
User defined/saved Fur Description presets are stored
../Library/Preferences/Autodesk/maya/2011-x64/presets/attrPresets/FurDescription
To build a drop down menu, option menu group, I'm going to have to create a list of the mel scripts in both locations, then loop through the mel script list and create an option for each mel script (preset).
I see MEL has a way to list files from a certain directory:
https://download.autodesk.com/us/maya...nds/index.html
// List the contents of the user's projects directory
//
getFileList -folder `internalVar -userWorkspaceDir`;
// List all MEL files in the user's script directory
//
getFileList -folder `internalVar -userScriptDir` -filespec "*.mel";
More info on internalVar: https://download.autodesk.com/us/maya...nds/index.html
I will be using this to create my list of presets.
I wonder how Maya does it for Fur Description Presets. It would be nice to look at their code. I'll have to try to find where that .mel file is.
~ Nic
Last edited by nmcelve; 12-08-2012 at 04:34 PM.
Reason: adding more information so that readers have more to read and learn from.