This article relates to the game "Dota 2". Click here for more information.
This article relates to the SDK/Workshop Tools for "Dota 2 Workshop Tools". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

VMDL/MaterialRemap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (SirYodaJedi moved page .vmdl/MaterialRemap to VMDL (Source 2)/MaterialRemap: File extension page names should be all caps)
(Rewrite Template:Lang to Template:LanguageBar. This action was performed by a bot.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{lang|Dota 2 Workshop Tools/VMDL/MaterialRemap}}
{{LanguageBar|Dota 2 Workshop Tools/VMDL/MaterialRemap}}
{{Dota 2Tools topicons}}
{{Dota 2Tools topicons}}
Material Remap items allow materials to be reassigned.  
Material Remap items allow materials to be reassigned.  

Latest revision as of 17:41, 18 July 2025

English (en)Translate (Translate)

Material Remap items allow materials to be reassigned.

Display

  • Material remap items are under the "Material Remap List" item in the outliner.
Note.pngNote:A model needs to be saved and recompiled for the remap to be visible in the viewport.

Create

Edit

  • To add a material remap item, select the "Material Remap List" item and press the green "+" button in the property editor.
  • To edit a material remap item, select it in the outliner.

Data Structures

The vmdl material remap list data looks like this:

CVMaterialRemapList* m_pMaterialRemapList = &CVMaterialRemapList_0


m_pMaterialRemapList

A pointer to the vmdl's CVMaterialRemapList.

CVMaterialRemapList

A list of CVMaterialRemap elements. Looks like this in the vmdl:

CVMaterialRemapList CVMaterialRemapList_0
{
	CVMaterialRemap[] m_vMaterialRemapList = 
	[
		CVMaterialRemap
		{
			string m_sSearchMaterial = ""
			string m_sReplaceMaterial = ""
		}
	]
}


NodeMaterialGroup_t

Attribute Friendly Name Description Type Default Value
m_name Name Name of the material group string
m_materialList Materials A list of material paths ( content relative ) associated with this group string[]
Note.pngNote:In the above example, switching to material group "hair_green" will keep the body material the same, but switch the hair to the green material.