Merge pull request #1315 from aws-lumberyard-dev/Atom/mnaumov/ATOM-13854

[ATOM-13854] Fixing missing preview in texture settings editor
This commit is contained in:
AMZN-mnaumov
2021-06-14 17:30:28 -07:00
committed by GitHub
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;
};