I recently develop a tool where I have to assign shader from a MaterialLibrary.
I get the shaders like that:
def get_library_materials(matlib_path): materials= MaxPlus.MaterialEditor.LoadMaterialLibrary(matlib_path) matlib=MaxPlus.MaterialLibrary.GetCurrentLibrary() for i in range (0,matlib.GetNumMaterials()): materials.append(matlib.GetMaterial(i)) return materials
but when assigning one of those shaders, I get an TypeError, because the shaders out of the Library are MtlBase, when picking from the scene they are Mtl. Does anybody know how to get the INode from the MtlBase?
thanks in advance