Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How in the world can I save a material library i created using Python. In this example below I've created a temporary material library and now I just want to save that mat file to a specified location. I do not want to display the filesave dialog, I want to pass the filepath through code to automate its output location.
The documentation doesn't describe much of anything in regards to what args get passed to this method or what it even accepts, for Material Library. Any help would be great!!!
thanks
filepath = "C:/Users/jmartini/Desktop/Trash/pyss/airplane.mat" # save each material to it's own library file matlib = MaxPlus.MaterialLibrary.GetCurrentLibrary() matlib.DeleteAll() matlib.Add(self.material) mat_count = MaxPlus.MaterialLibrary.GetNumMaterials(matlib) if mat_count: saved = matlib.FileSaveMatLib(filepath) print saved
Solved! Go to Solution.
