Getting the properties of Physical Material's PRESETS

Getting the properties of Physical Material's PRESETS

gwhelden
Contributor Contributor
1,062 Views
2 Replies
Message 1 of 3

Getting the properties of Physical Material's PRESETS

gwhelden
Contributor
Contributor

All I want to is change the presets programmatically.... I have looked everywhere.  Is it even visible to the API?

 

Any help would be much appreciated!

 

-Glen

 

================================

Glen Whelden

BIMaire

Autodesk Certified Instructor - 3dsmax 

0 Likes
Accepted solutions (1)
1,063 Views
2 Replies
Replies (2)
Message 2 of 3

Swordslayer
Advisor
Advisor
Accepted solution

They are stored in a .mat file in the materiallibraries folder in max root and loaded from there. You can either use the function that's used internally or adapt it to your needs - you can find it in the stdplugs\stdscripts\meditfunctions.ms file.

 

meditUtilities.Set_PhysicalTemplate_ActiveMaterial_FromMaterialInMatlib materialToApplyPresetTo "Metal Brushed"

 

Or use the material from the library directly:

 

(loadTempMaterialLibrary (getDir #maxRoot + "\materiallibraries\PhysicalMaterialTemplates.mat"))["Metal Brushed"]

 

0 Likes
Message 3 of 3

gwhelden
Contributor
Contributor

Thanks!!!

0 Likes