working on changing the texture names to materials,

problems with call by value/reference
This commit is contained in:
Anakin
2017-01-15 12:26:15 +01:00
parent f469dff656
commit 6ead5d7bc6
8 changed files with 125 additions and 77 deletions

View File

@@ -143,12 +143,12 @@ void MainWindow::takeScreenShot()
viewer->grab().save(destination);
}
void MainWindow::setFileInfo(QString name, QStringList textures, int vertices, int triangle)
void MainWindow::setFileInfo(QString name, QVector<Material>* materials, int vertices, int triangle)
{
m_fileInfo = QByteArray("Filename: ");
m_fileInfo += name;
m_fileInfo += "\nMaterials: ";
m_fileInfo += QByteArray::number(textures.size());
m_fileInfo += QByteArray::number(materials->size());
m_fileInfo += "\nVertices: ";
m_fileInfo += QByteArray::number(vertices);
m_fileInfo += "\nTriangle: ";
@@ -156,12 +156,13 @@ void MainWindow::setFileInfo(QString name, QStringList textures, int vertices, i
m_fileInfo += "<detail>";
int count(0);
for (auto& it : textures)
//TODO: mark not opened textures
for (auto& it : *materials)
{
m_fileInfo += "Material ";
m_fileInfo += QByteArray::number(count++);
m_fileInfo += " - ";
m_fileInfo += it;
m_fileInfo += it.name;
m_fileInfo += "\n";
}
}