MeshGroup
< VMDL(Redirected from Valve Model/MeshGroup)
Mesh groups provide a way to group meshes, and set their visibility. A simple usage case is a mesh group for a character, and another for sunglasses. A mesh group can have physics meshes in it, so a mesh group switch can also change the collision representation of a model.
Contents
Display
- Mesh groups will be under the "Mesh Groups" item in the outliner. To turn a mesh group on or off, toggle the check box next to the item.
Create
- Use the Model >Mesh > Add Mesh Group menu item.
Edit
- Mesh groups are under the "Mesh Groups" item in the outliner
- Select a mesh group item to edit in the property editor
Data Structures
The vmdl mesh group data looks like this:
CVMeshGroupListReference m_pMeshGroupList = CVMeshGroupListReference
{
MeshGroupList_t* m_pObject = &MeshGroupList_t_0
string m_sFileName = ""
}
m_pMeshGroupList
The reference to the MeshGroupList_t of the vmdl.
Attribute | Friendly Name | Description | Type | Default Value |
---|---|---|---|---|
m_pObject | Pointer to the MeshGroupList_t | MeshGroupList_t* | ||
m_sFileName | content relative path to the external mesh group list | string |
MeshGroupList_t
A list of MeshGroup_t elements. Looks like this in the vmdl:
MeshGroupList_t MeshGroupList_t_0
{
MeshGroup_t[] m_meshGroups =
[
MeshGroup_t
{
string m_name = "meshGroup_0"
bool m_bEnabledByDefault = false
string[] m_meshList =
[
]
string[] m_physList =
[
]
}
]
}
MeshGroup_t
Attribute | Friendly Name | Description | Type | Default Value |
---|---|---|---|---|
m_name | Group Name | The name of the mesh group | string | |
m_bEnabledByDefault | Enabled By Default | Is the mesh group visible by default | bool | false |
m_meshList | Mesh List | A list of mesh names | string[] | |
m_physList | Physics List | A list of physics mesh names | string[] |