Fixing missing preview in texture settings

This commit is contained in:
mnaumov
2021-06-14 12:40:19 -07:00
parent dd95d2b02e
commit 588127772c
2 changed files with 2 additions and 10 deletions
@@ -109,14 +109,7 @@ namespace ImageProcessingAtom
while (!m_process->IsFinished() && !IsJobCancelled())
{
m_process->UpdateProcess();
if (m_isPreview)
{
m_output->SetProgress(m_process->GetProgress() / static_cast<float>(m_previewProcessStep));
}
else
{
m_output->SetProgress(m_process->GetProgress());
}
m_output->SetProgress(m_process->GetProgress() / static_cast<float>(m_previewProcessStep));
}
IImageObjectPtr outputImage = m_process->GetOutputImage();
@@ -125,7 +118,7 @@ namespace ImageProcessingAtom
m_output->SetOutputImage(outputImage, ImageConvertOutput::Base);
m_output->SetOutputImage(outputImageAlpha, ImageConvertOutput::Alpha);
if (m_isPreview && !IsJobCancelled())
if (!IsJobCancelled())
{
// For preview, combine image output with alpha if any
m_output->SetProgress(1.0f / static_cast<float>(m_previewProcessStep));
@@ -72,7 +72,6 @@ namespace ImageProcessingAtom
static const int m_previewProcessStep = 2;
AZStd::unique_ptr<ImageConvertProcess> m_process;
bool m_isPreview;
AZStd::atomic_bool m_isCancelled;
ImageConvertOutput* m_output;
};