working on changing the texture names to materials,
problems with call by value/reference
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user