Blender addon - use StdErrFile for POVRay output display

This commit is contained in:
Trevor SANDY 2023-08-08 19:18:48 +02:00
parent 74eb112992
commit bf004ae0cb

View file

@ -882,11 +882,16 @@ void lcRenderDialog::on_OutputBrowseButton_clicked()
void lcRenderDialog::on_RenderOutputButton_clicked()
{
const QString RenderType = mCommand == POVRAY_RENDER ? QLatin1String("POV-Ray") : QLatin1String("Blender");
QFileInfo FileInfo(GetStdOutFileName());
QFileInfo FileInfo(GetStdErrFileName());
QString Message = tr("POV-Ray standard error file not found: %1.").arg(FileInfo.absoluteFilePath());
if (mCommand == BLENDER_RENDER)
{
FileInfo.setFile(GetStdOutFileName());
Message = tr("Blender standard output file not found: %1.").arg(FileInfo.absoluteFilePath());
}
if (!FileInfo.exists())
{
QMessageBox::warning(this, tr("Error"), tr("%1 Standard output file not found: %2.").arg(RenderType).arg(FileInfo.absoluteFilePath()));
QMessageBox::warning(this, tr("Error"), Message);
return;
}