Skip to content

Instantly share code, notes, and snippets.

@stevechap416
Created May 9, 2017 17:49
Show Gist options
  • Save stevechap416/897a970f242beae82386f167cd5a4e32 to your computer and use it in GitHub Desktop.
Save stevechap416/897a970f242beae82386f167cd5a4e32 to your computer and use it in GitHub Desktop.
Maxscript: Load a .mat and Apply it to Current Object
fn loadMat locationToLoad = (
--Load material library.
loadMaterialLibrary locationToLoad
theStr = filenamefrompath (getMatLibFileName())
theStr = trimRight theStr ".mat"
$.material = currentMaterialLibrary[theStr]
deleteItem currentMaterialLibrary 1
)
loadMat "D:/test.mat"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment