--- MTL_api_v1.830 ---
-- dmzscripts@gmail.com
IMPORTANT: between version 1.800 and 1.810 the base name for mtl api switched from 'mtl' to 'mtl_api'

-- PRESET
	mtl_api.available_presets()
		Show available presets in #presetDir

	mtl_api.get_preset()
		Show currently active preset.

	mtl_api.set_preset <presetName>[STRING]
		Load settings inside


-- TEXTURES
	mtl_api.get_textures()
		Get available textures to the MTL.

	mtl_api.set_textures <textureFilePaths>[string Array] setChannels:[BooleanClass]
		Set available textures to the MTL.
		- setChannels: when true the MTL will used the current active nameFilters to set channel_textures automatically. (default:true)
		
	mtl_api.clear_textures()
		Clear available textures.

	mtl_api.get_textures_commonName()
		Gets the common name of available textures (This name is used by MTL, to automatically set the material name)



-- NAMEFILTERS
	mtl_api.available_nameFilters()
		Show all available nameFilter files, located in #filterDir folder.

	mtl_api.get_nameFilters()
		Show currently active nameFilters.

	mtl_api.set_nameFilters <filterNames>[string Array]
		Set active nameFilters. Any nameFilter not included in <filterNames> will be de-activated.


-- CHANNELS
	mtl_api.available_channels() materialType:[string]
		Show names of all available channels
		- materialType: specify for which Material Type you want to get available channels (default:mtl_api.get_materialType())

	mtl_api.get_channel_texture() <channelName>[string]
		Show the texture file that is set for the channel indicated by channelName parameter.

	mtl_api.set_channel_texture() <channelName>[string] <textureFilePath>[string]
		Set the texture file for the channel indicated by <channelName>.
		Only texture files present in 'mtl_api.get_textures()' will be used to build the material.
		If the value of <textureFilPath> is undefined or an empty string, the channel is cleared.

	mtl_api.clear_channels()
		Clear channels of all texture files and maps.


-- RENDER INFO
	mtl_api.render_mapTypes()
		Shows supported mapType for the currently active renderer

	mtl_api.render_materialType()
		Shows the matching materialType for the active renderer


-- MAP TYPE
	mtl_api.all_mapTypes()
		Show all supported mapTypes

	mtl_api.available_mapTypes() materialType:[string]
		Show available mapTypes for materialType.
		- materialType: specify for which Material Type you want to get available maps (default:'mtl_api.get_materialType()')

	mtl_api.get_mapType()
		Get mapType, which indicates the class of maps that will be created.

	mtl_api.set_mapType <mapType>[string]
		Set mapType to a value present in 'mtl_api.available_mapTypes()' or "Render" to set it to the current active renderer mapType.

	mtl_api.all_mapTypes()
		Return all existing mapTypes supported by Material Texture Loader


-- MAPS
	mtl_api.get_allMaps() <channelName>[string]
		Get all textureMaps for the specified channel.

	mtl_api.get_bitmap() <channelName>[string]
		Get the textureBitmap for the specified channel.
	
	mtl_api.create_maps() channelSettings:[string] mapType:[string]
		Function that creates extra maps based of given channel settings
		- channelSettings: name of the channel settings used to create the extra maps (default = "diffuse")
		- mapType: map type for extra channels (default = 'mtl_api.get_mapType()')


-- MATERIAL TYPE
mtl_api.available_materialTypes() 
	Show available materialTypes.

mtl_api.set_materialType materialType:[string]
	Set materialType to a value present in mtl_api.available_materialTypes().

mtl_api.get_materialType()
	Get materialType, which indicates the class of material that will be created.


-- MATERIAL
mtl_api.get_material()
	Get created material.

mtl_api.create_material() name:[string] noRendering:[boolean]
	Create a new material with indicated preset, channel_textures, mapType and materialType.
	Any previous maps and material will be lost to the MTL.
	- name: specify a specific material name (default = mtl_api.get_textures_commonName())
	- noRendering: if True, turn of 'show in viewport' for maps and materials. (default = True)

mtl_api.update_material()
	Update the current material indicated preset, channel_textures and mapType.
	MaterialType cannot be updated and will always revert to the current class of the created material.

mtl_api.clear_material()
	Clear created material.


-- SLATE EDITOR
mtl_api.addToSlate() map:[textureMap / material] view:[integer] pos:[Point2] openEditor:[boolean]
	Add the created material to Material Slate Editor View1
	- map: specify a textureMap or material to be added (default = created_material)
	- view: specify the Slate view to which the map or mapterial wil be added (default = 1)
	- pos: position where the sme node will be placed (default = [0,0])
	- openEditor: indicate if Slate Editor should be opened (default = true)


-- RENDERING
mtl_api.save_preview()
	Opens a Save Dialog, to save the current image in the Material Slot.


-- GENERAL
mtl_api.clear()
	Clears textures, channels and material.


-- ROLLOUT MENU
mtl_api.open()
	Opens the MTL rollout menu.

mtl_api.close()
	Closes the MTL rollout menu.

mtl_api.isOpen()
	Returns true if MTL is open, false if not.


-- INFO
mtl_api.info()
	Show information concerning the current maps and material build.

mtl_api.show()
	Shows helpfull info in using the MTL maxscript commands.
	- script version numbers
	- install directories
	- available parameter values
	- list of all functions