fixed texture not exported with single image scan

This commit is contained in:
matlabbe
2017-02-01 12:53:05 -05:00
parent a1ceff8ce8
commit 53ff5b56e6

View File

@@ -2490,8 +2490,7 @@ void ExportCloudsDialog::saveTextureMeshes(
QString fullPath; QString fullPath;
if(singleTexture) if(singleTexture)
{ {
mesh->tex_materials[i].tex_file = QFileInfo(path).baseName().toStdString(); fullPath = QFileInfo(path).absoluteDir().absolutePath()+QDir::separator()+QFileInfo(path).baseName()+_ui->comboBox_meshingTextureFormat->currentText();
fullPath = QFileInfo(path).absoluteDir().absolutePath()+QDir::separator()+QString(mesh->tex_materials[i].tex_file.c_str())+_ui->comboBox_meshingTextureFormat->currentText();
} }
else else
{ {
@@ -2547,7 +2546,7 @@ void ExportCloudsDialog::saveTextureMeshes(
// relative path // relative path
if(singleTexture) if(singleTexture)
{ {
mesh->tex_materials[i].tex_file=(QString(mesh->tex_materials[i].tex_file.c_str())+_ui->comboBox_meshingTextureFormat->currentText()).toStdString(); mesh->tex_materials[i].tex_file=QFileInfo(path).baseName().toStdString()+_ui->comboBox_meshingTextureFormat->currentText().toStdString();
} }
else else
{ {