ATOM-16854 Texture Settings dialog box crashes in the Editor (#5777)
Changes include: -Fixed image preview issue which was trying to convert a compressed texture directly to QImage. -Fixed texture resolution display for cubemap in texture setting editor. -Sort the preset names in preset combo box -Fixed a crash when showing IBLSkybox preset info in texture setting editor Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
This commit is contained in:
@@ -16,28 +16,14 @@
|
||||
|
||||
namespace ImageProcessingAtom
|
||||
{
|
||||
IImageObjectPtr ImageConvertOutput::GetOutputImage(OutputImageType type) const
|
||||
IImageObjectPtr ImageConvertOutput::GetOutputImage() const
|
||||
{
|
||||
if (type < OutputImageType::Count)
|
||||
{
|
||||
return m_outputImage[static_cast<int>(type)];
|
||||
}
|
||||
else
|
||||
{
|
||||
return IImageObjectPtr();
|
||||
}
|
||||
return m_outputImage;
|
||||
}
|
||||
|
||||
void ImageConvertOutput::SetOutputImage(IImageObjectPtr image, OutputImageType type)
|
||||
void ImageConvertOutput::SetOutputImage(IImageObjectPtr image)
|
||||
{
|
||||
if (type < OutputImageType::Count)
|
||||
{
|
||||
m_outputImage[static_cast<int>(type)] = image;
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ_Error("ImageProcess", false, "Cannot set output image to %d", type);
|
||||
}
|
||||
m_outputImage = image;
|
||||
}
|
||||
|
||||
void ImageConvertOutput::SetReady(bool ready)
|
||||
@@ -62,10 +48,7 @@ namespace ImageProcessingAtom
|
||||
|
||||
void ImageConvertOutput::Reset()
|
||||
{
|
||||
for (int i = 0; i < static_cast<int>(OutputImageType::Count); i++)
|
||||
{
|
||||
m_outputImage[i] = nullptr;
|
||||
}
|
||||
m_outputImage = nullptr;
|
||||
m_outputReady = false;
|
||||
m_progress = 0.0f;
|
||||
}
|
||||
@@ -109,13 +92,12 @@ namespace ImageProcessingAtom
|
||||
|
||||
IImageObjectPtr outputImage = m_process->GetOutputImage();
|
||||
|
||||
m_output->SetOutputImage(outputImage, ImageConvertOutput::Base);
|
||||
|
||||
if (!IsJobCancelled())
|
||||
{
|
||||
// For preview, combine image output with alpha if any
|
||||
// convert the output image to RGBA format for preview
|
||||
m_output->SetProgress(1.0f / static_cast<float>(m_previewProcessStep));
|
||||
m_output->SetOutputImage(outputImage, ImageConvertOutput::Preview);
|
||||
IImageObjectPtr uncompressedImage = ConvertImageForPreview(outputImage);
|
||||
m_output->SetOutputImage(uncompressedImage);
|
||||
}
|
||||
|
||||
m_output->SetReady(true);
|
||||
|
||||
Reference in New Issue
Block a user