[LYN-3078] Removed legacy CMaterial and all related/unused classes.

This commit is contained in:
Chris Galvan
2021-05-03 16:42:11 -05:00
parent 71c5df040f
commit 8b0b3f4d02
116 changed files with 9 additions and 15510 deletions
+1 -46
View File
@@ -29,7 +29,6 @@
// Editor
#include "ThumbnailGenerator.h" // for CThumbnailGenerator
#include "FileTypeUtils.h" // for IsPreviewableFileType
#include "Material/MaterialManager.h" // for CMaterialManager
#include "ErrorRecorder.h"
@@ -652,32 +651,6 @@ void CModelViewport::DrawInfo() const
}
}
//////////////////////////////////////////////////////////////////////////
void CModelViewport::SetCustomMaterial(CMaterial* pMaterial)
{
m_pCurrentMaterial = pMaterial;
}
//////////////////////////////////////////////////////////////////////////
CMaterial* CModelViewport::GetMaterial()
{
if (m_pCurrentMaterial)
{
return m_pCurrentMaterial;
}
else
{
_smart_ptr<IMaterial> pMtl = 0;
if (m_object)
{
pMtl = m_object->GetMaterial();
}
CMaterial* pCMaterial = GetIEditor()->GetMaterialManager()->FromIMaterial(pMtl);
return pCMaterial;
}
}
//////////////////////////////////////////////////////////////////////////
bool CModelViewport::CanDrop([[maybe_unused]] const QPoint& point, IDataBaseItem* pItem)
{
@@ -686,26 +659,12 @@ bool CModelViewport::CanDrop([[maybe_unused]] const QPoint& point, IDataBaseItem
return false;
}
if (pItem->GetType() == EDB_TYPE_MATERIAL)
{
SetCustomMaterial((CMaterial*)pItem);
}
return true;
}
//////////////////////////////////////////////////////////////////////////
void CModelViewport::Drop([[maybe_unused]] const QPoint& point, IDataBaseItem* pItem)
void CModelViewport::Drop([[maybe_unused]] const QPoint& point, [[maybe_unused]] IDataBaseItem* pItem)
{
if (!pItem)
{
SetCustomMaterial(NULL);
return;
}
if (pItem->GetType() == EDB_TYPE_MATERIAL)
{
SetCustomMaterial((CMaterial*)pItem);
}
}
//////////////////////////////////////////////////////////////////////////
@@ -788,10 +747,6 @@ void CModelViewport::DrawModel(const SRenderingPassInfo& passInfo)
}
rp.dwFObjFlags = 0;
if (m_pCurrentMaterial)
{
rp.pMaterial = m_pCurrentMaterial->GetMatInfo();
}
//-----------------------------------------------------------------------------
//----- Render Static Object (handled by 3DEngine) ----