Notifications
Clear all

[Closed] load a material library

I want to create a button to laod a material library as the one in the material editor do.
un fortunately The recorder doesn’t show the command

3 Replies

have a peek at:
Topic: Material Editor
Command: loadMaterialLibrary <filename_string>

Topic: MaterialLibrary Values
<MAXMaterialLibrary>loadTempMaterialLibrary <mtllib_file_name>

thank you for that. But I want to pick different library with something like this:

– getOpenFileName caption:“Load A Material Library:”
– ypes:“MaterialLibrary(*.mat)”

this works but with no choice for different lib :

Button loadmlib ” load material lib “

on loadmlib pressed do
(
loadMaterialLibrary “3dsmax.mat”
)

well you just have to glue the two together


myMatLib = getOpenFileName \
	caption:"Load A Material Library:" \
	types:"MaterialLibrary(*.mat)"
if (myMatLib != undefined) do ( loadMaterialLibrary myMatLib )