[LYN-3078] Removed legacy CMaterial and all related/unused classes.
This commit is contained in:
@@ -27,8 +27,6 @@
|
||||
#include "Mission.h"
|
||||
#include "ShaderCache.h"
|
||||
#include "UsedResources.h"
|
||||
#include "Material/MaterialManager.h"
|
||||
#include "Material/MaterialLibrary.h"
|
||||
#include "WaitProgress.h"
|
||||
#include "Util/CryMemFile.h"
|
||||
#include "Objects/ObjectManager.h"
|
||||
@@ -336,11 +334,6 @@ void CGameExporter::ExportLevelData(const QString& path, bool bExportMission)
|
||||
|
||||
ExportMapInfo(root);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Export materials.
|
||||
ExportMaterials(root, path);
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CCryEditDoc* pDocument = pEditor->GetDocument();
|
||||
CMission* pCurrentMission = 0;
|
||||
|
||||
@@ -508,48 +501,6 @@ void CGameExporter::ExportMapInfo(XmlNodeRef& node)
|
||||
xmlAr.root = node;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CGameExporter::ExportMaterials(XmlNodeRef& levelDataNode, const QString& path)
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Export materials manager.
|
||||
CMaterialManager* pManager = GetIEditor()->GetMaterialManager();
|
||||
pManager->Export(levelDataNode);
|
||||
|
||||
QString filename = Path::Make(path, MATERIAL_LEVEL_LIBRARY_FILE);
|
||||
|
||||
bool bHaveItems = true;
|
||||
|
||||
int numMtls = 0;
|
||||
|
||||
XmlNodeRef nodeMaterials = XmlHelpers::CreateXmlNode("MaterialsLibrary");
|
||||
// Export Materials local level library.
|
||||
for (int i = 0; i < pManager->GetLibraryCount(); i++)
|
||||
{
|
||||
XmlNodeRef nodeLib = nodeMaterials->newChild("Library");
|
||||
CMaterialLibrary* pLib = (CMaterialLibrary*)pManager->GetLibrary(i);
|
||||
if (pLib->GetItemCount() > 0)
|
||||
{
|
||||
bHaveItems = false;
|
||||
// Export this library.
|
||||
numMtls += pManager->ExportLib(pLib, nodeLib);
|
||||
}
|
||||
}
|
||||
if (!bHaveItems)
|
||||
{
|
||||
XmlString xmlData = nodeMaterials->getXML();
|
||||
|
||||
CCryMemFile file;
|
||||
file.Write(xmlData.c_str(), xmlData.length());
|
||||
m_levelPak.m_pakFile.UpdateFile(filename.toUtf8().data(), file);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_levelPak.m_pakFile.RemoveFile(filename.toUtf8().data());
|
||||
}
|
||||
m_numExportedMaterials = numMtls;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CGameExporter::ExportLevelResourceList(const QString& path)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user