XRef Material library from Max scene

Hi,
I need to create a tool to create a .mat file which contains XRef Materials of all materials included in my current scene.

All works fine in this script but how can I sort the materials by names in the material library?

Thanks

AttachmentSize
xrefmatlib.ms1.55 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

1. Get all materials - from the library and from the scene(merged, xrefed, etc.).
2. Sort them by name(or by aony other property)
3. Create new library with proper name and put all materials inside it.
4. delete the old library, save the new one

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.