Fixed model using last mesh materials for new mesh
Former-commit-id: 91bd231b45b701b18d6e86eab74afbd141a51ded
This commit is contained in:
parent
9a3616f538
commit
f3603a0b31
|
|
@ -490,6 +490,7 @@ void NzModel::SetMesh(NzMesh* mesh)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_matCount = mesh->GetMaterialCount();
|
m_matCount = mesh->GetMaterialCount();
|
||||||
|
m_materials.clear();
|
||||||
m_materials.resize(m_matCount, NzMaterial::GetDefault());
|
m_materials.resize(m_matCount, NzMaterial::GetDefault());
|
||||||
m_skinCount = 1;
|
m_skinCount = 1;
|
||||||
}
|
}
|
||||||
|
|
@ -498,8 +499,8 @@ void NzModel::SetMesh(NzMesh* mesh)
|
||||||
m_boundingVolume.MakeNull();
|
m_boundingVolume.MakeNull();
|
||||||
m_boundingVolumeUpdated = true;
|
m_boundingVolumeUpdated = true;
|
||||||
m_matCount = 0;
|
m_matCount = 0;
|
||||||
m_skinCount = 0;
|
|
||||||
m_materials.clear();
|
m_materials.clear();
|
||||||
|
m_skinCount = 0;
|
||||||
|
|
||||||
SetAnimation(nullptr);
|
SetAnimation(nullptr);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue