Merge branch 'development' of https://github.com/o3de/o3de into jckand/DynVegLauncherTestFix

monroegm-disable-blank-issue-2
jckand-amzn 4 years ago
commit d40af1c70c

@ -5,12 +5,14 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import os
# ARN of the IAM role to assume for retrieving temporary AWS credentials
ASSUME_ROLE_ARN = 'arn:aws:iam::645075835648:role/o3de-automation-tests'
ASSUME_ROLE_ARN = os.environ.get('ASSUME_ROLE_ARN', 'arn:aws:iam::645075835648:role/o3de-automation-tests')
# Name of the AWS project deployed by the CDK applications
AWS_PROJECT_NAME = 'AWSAUTO'
AWS_PROJECT_NAME = os.environ.get('O3DE_AWS_PROJECT_NAME', 'AWSAUTO')
# Region for the existing CloudFormation stacks used by the automation tests
AWS_REGION = 'us-east-1'
AWS_REGION = os.environ.get('O3DE_AWS_DEPLOY_REGION', 'us-east-1')
# Name of the default resource mapping config file used by the automation tests
AWS_RESOURCE_MAPPING_FILE_NAME = 'default_aws_resource_mappings.json'
# Name of the game launcher log

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -447,13 +447,6 @@ void CCryEditApp::RegisterActionHandlers()
ON_COMMAND(ID_OPEN_TRACKVIEW, OnOpenTrackView)
ON_COMMAND(ID_OPEN_UICANVASEDITOR, OnOpenUICanvasEditor)
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
ON_COMMAND_RANGE(ID_GAME_##CODENAME##_ENABLELOWSPEC, ID_GAME_##CODENAME##_ENABLEHIGHSPEC, OnChangeGameSpec)
AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS
#undef AZ_RESTRICTED_PLATFORM_EXPANSION
#endif
ON_COMMAND(ID_OPEN_QUICK_ACCESS_BAR, OnOpenQuickAccessBar)
ON_COMMAND(ID_FILE_SAVE_LEVEL, OnFileSave)

@ -34,6 +34,7 @@
// AzQtComponents
#include <AzQtComponents/Components/StyledDockWidget.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
// CryCommon
#include <CryCommon/Maestro/Bus/EditorSequenceComponentBus.h>
@ -2324,7 +2325,7 @@ void CTrackViewDialog::SaveCurrentSequenceToFBX()
}
}
QString filename = QFileDialog::getSaveFileName(this, tr("Export Selected Nodes To FBX File"), selectedSequenceFBXStr, szFilters);
QString filename = AzQtComponents::FileDialog::GetSaveFileName(this, tr("Export Selected Nodes To FBX File"), selectedSequenceFBXStr, szFilters);
if (!filename.isEmpty())
{
pExportManager->SetBakedKeysSequenceExport(true);

@ -30,6 +30,7 @@
// AzQtComponents
#include <AzQtComponents/Components/Widgets/ColorPicker.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
// CryCommon
#include <CryCommon/Maestro/Bus/EditorSequenceComponentBus.h>
@ -1044,7 +1045,7 @@ void CTrackViewNodesCtrl::OnNMRclick(QPoint point)
file = QString::fromUtf8(selectedNodes.GetNode(0)->GetName().c_str()) + QString(".fbx");
}
QString path = QFileDialog::getSaveFileName(this, tr("Export Selected Nodes To FBX File"), QString(), tr("FBX Files (*.fbx)"));
QString path = AzQtComponents::FileDialog::GetSaveFileName(this, tr("Export Selected Nodes To FBX File"), QString(), tr("FBX Files (*.fbx)"));
if (!path.isEmpty())
{

@ -10,6 +10,7 @@
#ifndef AZSTD_FUNCTION_BASE_HEADER
#define AZSTD_FUNCTION_BASE_HEADER
#include <AzCore/std/allocator.h>
#include <AzCore/std/base.h>
#include <AzCore/std/utils.h>
#include <AzCore/std/function/function_fwd.h>

@ -0,0 +1,54 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <QMessageBox>
#include <QRegExp>
namespace AzQtComponents
{
QString FileDialog::GetSaveFileName(QWidget* parent, const QString& caption, const QString& dir,
const QString& filter, QString* selectedFilter, QFileDialog::Options options)
{
bool shouldPromptAgain = false;
QString filePath;
do
{
// Trigger Qt's save filename dialog
// If filePath isn't empty, it means we are prompting again because the filename was invalid,
// so pass it instead of the directory so the filename is pre-filled in for the user
filePath = QFileDialog::getSaveFileName(parent, caption, (filePath.isEmpty()) ? dir : filePath, filter, selectedFilter, options);
if (!filePath.isEmpty())
{
QFileInfo fileInfo(filePath);
QString fileName = fileInfo.fileName();
// Check if the filename has any invalid characters
QRegExp validFileNameRegex("^[a-zA-Z0-9_\\-./]*$");
shouldPromptAgain = !validFileNameRegex.exactMatch(fileName);
// If the filename had invalid characters, then show a warning message and then we will re-prompt the save filename dialog
if (shouldPromptAgain)
{
QMessageBox::warning(parent, QObject::tr("Invalid filename"),
QObject::tr("O3DE assets are restricted to alphanumeric characters, hyphens (-), underscores (_), and dots (.)\n\n%1").arg(fileName));
}
}
else
{
// If the filePath is empty, then the user cancelled the dialog so we don't need to prompt again
shouldPromptAgain = false;
}
} while (shouldPromptAgain);
return filePath;
}
} // namespace AzQtComponents

@ -0,0 +1,29 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzQtComponents/AzQtComponentsAPI.h>
#if !defined(Q_MOC_RUN)
#include <QFileDialog>
#endif
namespace AzQtComponents
{
class AZ_QT_COMPONENTS_API FileDialog
{
public:
//! Helper method that extends QFileDialog::getSaveFileName to prevent the user from
//! saving a filename with invalid characters (e.g. AP doesn't allow @ characters because they are used for aliases)
static QString GetSaveFileName(QWidget* parent = nullptr, const QString& caption = QString(),
const QString& dir = QString(), const QString& filter = QString(),
QString* selectedFilter = nullptr, QFileDialog::Options options = QFileDialog::Options());
};
} // namespace AzQtComponents

@ -146,6 +146,8 @@ set(FILES
Components/Widgets/Eyedropper.h
Components/Widgets/Eyedropper.cpp
Components/Widgets/EyedropperConfig.ini
Components/Widgets/FileDialog.cpp
Components/Widgets/FileDialog.h
Components/Widgets/FilteredSearchWidget.qss
Components/Widgets/FilteredSearchWidgetConfig.ini
Components/Widgets/GradientSlider.cpp

@ -37,6 +37,10 @@ AZ_POP_DISABLE_WARNING
#include <AzFramework/Asset/GenericAssetHandler.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AzToolsFramework/UI/UICore/WidgetHelpers.h>
#include <SourceControl/SourceControlAPI.h>
#include <UI/PropertyEditor/PropertyRowWidget.hxx>
@ -46,9 +50,6 @@ AZ_POP_DISABLE_WARNING
#include <QMessageBox>
#include <QMenu>
#include <QMenuBar>
AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 'QFileInfo::d_ptr': class 'QSharedDataPointer<QFileInfoPrivate>' needs to have dll-interface to be used by clients of class 'QFileInfo'
#include <QFileDialog>
AZ_POP_DISABLE_WARNING
#include <QAction>
namespace AzToolsFramework
@ -414,7 +415,7 @@ namespace AzToolsFramework
filter.append(")");
}
const QString saveAs = QFileDialog::getSaveFileName(nullptr, tr("Save As..."), m_userSettings->m_lastSavePath.c_str(), filter);
const QString saveAs = AzQtComponents::FileDialog::GetSaveFileName(AzToolsFramework::GetActiveWindow(), tr("Save As..."), m_userSettings->m_lastSavePath.c_str(), filter);
return SaveImpl(asset, saveAs);
}
@ -902,7 +903,7 @@ namespace AzToolsFramework
statusString = QString("%1");
}
statusString = statusString.arg(m_currentAsset).arg(m_queuedAssetStatus);
statusString = statusString.arg(m_currentAsset);
if (!m_queuedAssetStatus.isEmpty())
{
@ -920,7 +921,7 @@ namespace AzToolsFramework
void AssetEditorWidget::SetupHeader()
{
QString nameString = QString("%1").arg(m_currentAsset).arg(m_queuedAssetStatus);
QString nameString = QString("%1").arg(m_currentAsset);
m_header->setName(nameString);

@ -66,6 +66,7 @@ ly_add_target(
3rdParty::PVRTexTool
3rdParty::squish-ccr
3rdParty::tiff
3rdParty::ISPCTexComp
3rdParty::ilmbase
Legacy::CryCommon
AZ::AzFramework

@ -70,7 +70,6 @@ namespace ImageProcessingAtom
virtual AZ::u32 GetPixelCount(AZ::u32 mip) const = 0;
virtual AZ::u32 GetWidth(AZ::u32 mip) const = 0;
virtual AZ::u32 GetHeight(AZ::u32 mip) const = 0;
virtual bool IsCubemap() const = 0;
virtual AZ::u32 GetMipCount() const = 0;
//get pixel data buffer

@ -143,6 +143,11 @@ namespace ImageProcessingAtom
return ColorSpace::autoSelect;
}
const char* CTSquisher::GetName() const
{
return "CTSquisher";
}
EPixelFormat CTSquisher::GetSuggestedUncompressedFormat(EPixelFormat compressedfmt, EPixelFormat uncompressedfmt) const
{
//special cases

@ -27,6 +27,7 @@ namespace ImageProcessingAtom
EPixelFormat GetSuggestedUncompressedFormat(EPixelFormat compressedfmt, EPixelFormat uncompressedfmt) const override;
ColorSpace GetSupportedColorSpace(EPixelFormat compressFormat) const final;
const char* GetName() const final;
private:
static CryTextureSquisher::ECodingPreset GetCompressPreset(EPixelFormat compressFmt, EPixelFormat uncompressFmt);

@ -7,25 +7,19 @@
*/
#include <AzCore/PlatformIncl.h>
#include <Compressors/CTSquisher.h>
#include <Compressors/PVRTC.h>
#include <Compressors/ETC2.h>
// this is required for the AZ_TRAIT_IMAGEPROCESSING_USE_ISPC_TEXTURE_COMPRESSOR define
#include <ImageProcessing_Traits_Platform.h>
#if AZ_TRAIT_IMAGEPROCESSING_USE_ISPC_TEXTURE_COMPRESSOR
#include <Compressors/ISPCTextureCompressor.h>
#endif
namespace ImageProcessingAtom
{
ICompressorPtr ICompressor::FindCompressor(EPixelFormat fmt, ColorSpace colorSpace, bool isCompressing)
ICompressorPtr ICompressor::FindCompressor(EPixelFormat fmt, [[maybe_unused]] ColorSpace colorSpace, bool isCompressing)
{
// The ISPC texture compressor is able to compress BC1, BC3, BC6H and BC7 formats, and all of the ASTC formats.
// Note: The ISPC texture compressor is only able to compress images that are a multiple of the compressed format's blocksize.
// Another limitation is that the compressor requires LDR source images to be in sRGB colorspace.
#if AZ_TRAIT_IMAGEPROCESSING_USE_ISPC_TEXTURE_COMPRESSOR
if (ISPCCompressor::IsCompressedPixelFormatSupported(fmt))
{
if ((isCompressing && ISPCCompressor::IsSourceColorSpaceSupported(colorSpace, fmt)) || (!isCompressing && ISPCCompressor::DoesSupportDecompress(fmt)))
@ -33,7 +27,6 @@ namespace ImageProcessingAtom
return ICompressorPtr(new ISPCCompressor());
}
}
#endif
if (CTSquisher::IsCompressedPixelFormatSupported(fmt))
{

@ -48,6 +48,7 @@ namespace ImageProcessingAtom
virtual IImageObjectPtr DecompressImage(IImageObjectPtr srcImage, EPixelFormat fmtDst) const = 0;
virtual EPixelFormat GetSuggestedUncompressedFormat(EPixelFormat compressedfmt, EPixelFormat uncompressedfmt) const = 0;
virtual ColorSpace GetSupportedColorSpace(EPixelFormat compressFormat) const = 0;
virtual const char* GetName() const = 0;
//find compressor for specified compressed pixel format. isCompressing to indicate if it's for compressing or decompressing
static ICompressorPtr FindCompressor(EPixelFormat fmt, ColorSpace colorSpace, bool isCompressing);

@ -112,6 +112,11 @@ namespace ImageProcessingAtom
return ColorSpace::autoSelect;
}
const char* ETC2Compressor::GetName() const
{
return "ETC2Compressor";
}
IImageObjectPtr ETC2Compressor::CompressImage(IImageObjectPtr srcImage, EPixelFormat fmtDst,
const CompressOption* compressOption) const
{

@ -24,7 +24,8 @@ namespace ImageProcessingAtom
IImageObjectPtr DecompressImage(IImageObjectPtr srcImage, EPixelFormat fmtDst) const override;
EPixelFormat GetSuggestedUncompressedFormat(EPixelFormat compressedfmt, EPixelFormat uncompressedfmt) const override;
virtual ColorSpace GetSupportedColorSpace(EPixelFormat compressFormat) const final;
ColorSpace GetSupportedColorSpace(EPixelFormat compressFormat) const final;
const char* GetName() const final;
};
} // namespace ImageProcessingAtom

@ -111,6 +111,11 @@ namespace ImageProcessingAtom
return ColorSpace::autoSelect;
}
const char* ISPCCompressor::GetName() const
{
return "ISPCCompressor";
}
IImageObjectPtr ISPCCompressor::CompressImage(IImageObjectPtr sourceImage, EPixelFormat destinationFormat, const CompressOption* compressOption) const
{
// Used to find the profile setters, depending on the image quality

@ -29,6 +29,8 @@ namespace ImageProcessingAtom
ColorSpace GetSupportedColorSpace(EPixelFormat compressFormat) const final;
IImageObjectPtr CompressImage(IImageObjectPtr sourceImage, EPixelFormat destinationFormat, const CompressOption* compressOption) const final;
IImageObjectPtr DecompressImage(IImageObjectPtr sourceImage, EPixelFormat destinationFormat) const final;
const char* GetName() const final;
EPixelFormat GetSuggestedUncompressedFormat(EPixelFormat compressedfmt, EPixelFormat uncompressedfmt) const final;
};

@ -7,20 +7,12 @@
*/
#include <ImageProcessing_Traits_Platform.h>
#include <AzCore/PlatformIncl.h>
#include <Atom/ImageProcessing/ImageObject.h>
#include <Processing/ImageFlags.h>
#include <Processing/PixelFormatInfo.h>
#include <Compressors/PVRTC.h>
#if AZ_TRAIT_IMAGEPROCESSING_PVRTEXLIB_USE_WINDLL_IMPORT
//_WINDLL_IMPORT need to be defined before including PVRTexLib header files to avoid linking error on windows.
#define _WINDLL_IMPORT
// NOMINMAX needs to be defined before including PVRTexLib header files (which include Windows.h)
// so that Windows.h doesn't define min/max. Otherwise, a compile error may arise in Uber builds
#ifndef NOMINMAX
#define NOMINMAX
#endif
#endif
#include <PVRTexture.h>
#include <PVRTextureUtilities.h>
@ -107,6 +99,11 @@ namespace ImageProcessingAtom
return ColorSpace::autoSelect;
}
const char* PVRTCCompressor::GetName() const
{
return "PVRTCCompressor";
}
bool PVRTCCompressor::DoesSupportDecompress([[maybe_unused]] EPixelFormat fmtDst)
{
return true;

@ -25,5 +25,6 @@ namespace ImageProcessingAtom
EPixelFormat GetSuggestedUncompressedFormat(EPixelFormat compressedfmt, EPixelFormat uncompressedfmt) const override;
ColorSpace GetSupportedColorSpace(EPixelFormat compressFormat) const final;
const char* GetName() const final;
};
} // namespace ImageProcessingAtom

@ -6,6 +6,7 @@
*
*/
#include <AzCore/std/time.h>
#include <Processing/ImageFlags.h>
#include <Processing/ImageObjectImpl.h>
@ -97,9 +98,18 @@ namespace ImageProcessingAtom
else
{
IImageObjectPtr dstImage = nullptr;
const PixelFormatInfo* compressedInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(compressedFmt);
if (isSrcUncompressed)
{
AZ::u64 startTime = AZStd::GetTimeUTCMilliSecond();
dstImage = compressor->CompressImage(Get(), fmtDst, &m_compressOption);
AZ::u64 endTime = AZStd::GetTimeUTCMilliSecond();
[[maybe_unused]] double processTime = static_cast<double>(endTime - startTime) / 1000.0;
if (dstImage)
{
AZ_TracePrintf("Image Processing", "Image [%dx%d] was compressed to [%s] format by [%s] in %.3f seconds\n",
Get()->GetWidth(0), Get()->GetHeight(0), compressedInfo->szName, compressor->GetName(), processTime);
}
}
else
{
@ -107,11 +117,13 @@ namespace ImageProcessingAtom
}
Set(dstImage);
}
if (Get() == nullptr)
if (dstImage == nullptr)
{
AZ_Error("Image Processing", false, "The selected compressor failed to compress this image");
AZ_Error("Image Processing", false, "Failed to use [%s] to %s [%s] format", compressor->GetName(),
isSrcUncompressed ? "compress" : "decompress",
compressedInfo->szName);
}
}
}
}

@ -74,7 +74,7 @@ namespace ImageProcessingAtom
builderDescriptor.m_busId = azrtti_typeid<ImageBuilderWorker>();
builderDescriptor.m_createJobFunction = AZStd::bind(&ImageBuilderWorker::CreateJobs, &m_imageBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2);
builderDescriptor.m_processJobFunction = AZStd::bind(&ImageBuilderWorker::ProcessJob, &m_imageBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2);
builderDescriptor.m_version = 23; // [ATOM-14022]
builderDescriptor.m_version = 24; // [SPEC-7821]
builderDescriptor.m_analysisFingerprint = ImageProcessingAtom::BuilderSettingManager::Instance()->GetAnalysisFingerprint();
m_imageBuilder.BusConnect(builderDescriptor.m_busId);
AssetBuilderSDK::AssetBuilderBus::Broadcast(&AssetBuilderSDK::AssetBuilderBusTraits::RegisterBuilderInformation, builderDescriptor);

@ -28,6 +28,7 @@ namespace ImageProcessingAtom
QImage qimage(filename.c_str());
if (qimage.isNull())
{
AZ_Error("ImageProcessing", false, "Failed to load [%s] via QImage", filename.c_str());
return NULL;
}

@ -17,6 +17,8 @@
#include <AzCore/Serialization/EditContext.h>
#include <AzCore/std/string/wildcard.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
#include <AzToolsFramework/AssetBrowser/EBusFindAssetTypeByName.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
@ -202,7 +204,7 @@ namespace ImageProcessingAtom
AZ::Data::AssetId assetId = product->GetAssetId();
menu->addAction("Save as DDS...", [assetId, this]()
{
QString filePath = QFileDialog::getSaveFileName(nullptr, QString("Save to file"), m_lastSavedPath, QString("DDS file (*.dds)"));
QString filePath = AzQtComponents::FileDialog::GetSaveFileName(nullptr, QString("Save to file"), m_lastSavedPath, QString("DDS file (*.dds)"));
if (filePath.isEmpty())
{
return;

@ -13,4 +13,3 @@
#define AZ_TRAIT_IMAGEPROCESSING_PVRTEXLIB_USE_WINDLL_IMPORT 0
#define AZ_TRAIT_IMAGEPROCESSING_SQUISH_DO_NOT_USE_FASTCALL 0
#define AZ_TRAIT_IMAGEPROCESSING_USE_BASE10_BYTE_PREFIX 0
#define AZ_TRAIT_IMAGEPROCESSING_USE_ISPC_TEXTURE_COMPRESSOR 0

@ -13,4 +13,3 @@
#define AZ_TRAIT_IMAGEPROCESSING_PVRTEXLIB_USE_WINDLL_IMPORT 0
#define AZ_TRAIT_IMAGEPROCESSING_SQUISH_DO_NOT_USE_FASTCALL 1
#define AZ_TRAIT_IMAGEPROCESSING_USE_BASE10_BYTE_PREFIX 0
#define AZ_TRAIT_IMAGEPROCESSING_USE_ISPC_TEXTURE_COMPRESSOR 0

@ -13,4 +13,3 @@
#define AZ_TRAIT_IMAGEPROCESSING_PVRTEXLIB_USE_WINDLL_IMPORT 0
#define AZ_TRAIT_IMAGEPROCESSING_SQUISH_DO_NOT_USE_FASTCALL 1
#define AZ_TRAIT_IMAGEPROCESSING_USE_BASE10_BYTE_PREFIX 1
#define AZ_TRAIT_IMAGEPROCESSING_USE_ISPC_TEXTURE_COMPRESSOR 0

@ -13,4 +13,3 @@
#define AZ_TRAIT_IMAGEPROCESSING_PVRTEXLIB_USE_WINDLL_IMPORT 1
#define AZ_TRAIT_IMAGEPROCESSING_SQUISH_DO_NOT_USE_FASTCALL 0
#define AZ_TRAIT_IMAGEPROCESSING_USE_BASE10_BYTE_PREFIX 0
#define AZ_TRAIT_IMAGEPROCESSING_USE_ISPC_TEXTURE_COMPRESSOR 1

@ -6,11 +6,3 @@
#
#
# windows requires the 3rd Party ISPCTexComp library.
ly_associate_package(PACKAGE_NAME ISPCTexComp-2021.3-rev1-windows TARGETS ISPCTexComp PACKAGE_HASH 324fb051a549bc96571530e63c01e18a4c860db45317734d86276fe27a45f6dd)
set(LY_BUILD_DEPENDENCIES
PUBLIC
3rdParty::ISPCTexComp
)

@ -9,6 +9,4 @@
set(FILES
ImageProcessing_Traits_Platform.h
ImageProcessing_Traits_Windows.h
../../Compressors/ISPCTextureCompressor.cpp
../../Compressors/ISPCTextureCompressor.h
)

@ -13,4 +13,3 @@
#define AZ_TRAIT_IMAGEPROCESSING_PVRTEXLIB_USE_WINDLL_IMPORT 0
#define AZ_TRAIT_IMAGEPROCESSING_SQUISH_DO_NOT_USE_FASTCALL 1
#define AZ_TRAIT_IMAGEPROCESSING_USE_BASE10_BYTE_PREFIX 1
#define AZ_TRAIT_IMAGEPROCESSING_USE_ISPC_TEXTURE_COMPRESSOR 0

@ -869,7 +869,7 @@ namespace ImageProcessingAtom
return process;
}
void ImageConvertProcess::CreateIBLCubemap(AZ::Uuid presetUUID, const char* fileNameSuffix, IImageObjectPtr cubemapImage)
void ImageConvertProcess::CreateIBLCubemap(AZ::Uuid presetUUID, const char* fileNameSuffix, IImageObjectPtr& cubemapImage)
{
const AZStd::string& platformId = m_input->m_platform;
AZStd::string_view filePath;

@ -161,7 +161,7 @@ namespace ImageProcessingAtom
bool FillCubemapMipmaps();
//IBL cubemap generation, this creates a separate ImageConvertProcess
void CreateIBLCubemap(AZ::Uuid presetUUID, const char* fileNameSuffix, IImageObjectPtr cubemapImage);
void CreateIBLCubemap(AZ::Uuid presetUUID, const char* fileNameSuffix, IImageObjectPtr& cubemapImage);
//convert color space to linear with pixel format rgba32f
bool ConvertToLinear();

@ -36,10 +36,6 @@ namespace ImageProcessingAtom
AZ::u32 GetWidth(AZ::u32 mip) const override;
AZ::u32 GetHeight(AZ::u32 mip) const override;
AZ::u32 GetMipCount() const override;
bool IsCubemap() const override
{
return false;
};
void GetImagePointer(AZ::u32 mip, AZ::u8*& pMem, AZ::u32& pitch) const override;
AZ::u32 GetMipBufSize(AZ::u32 mip) const override;

@ -71,11 +71,6 @@ using namespace ImageProcessingAtom;
namespace UnitTest
{
namespace
{
static const char* s_gemFolder;
}
// Expose AZ::AssetManagerComponent::Reflect function for testing
class MyAssetManagerComponent
: public AZ::AssetManagerComponent
@ -125,6 +120,8 @@ namespace UnitTest
AZStd::unique_ptr<AZ::JsonSystemComponent> m_jsonSystemComponent;
AZStd::vector<AZStd::unique_ptr<AZ::Data::AssetHandler>> m_assetHandlers;
AZStd::string m_gemFolder;
AZStd::string m_outputRootFolder;
AZStd::string m_outputFolder;
void SetUp() override
{
@ -172,7 +169,7 @@ namespace UnitTest
AzQtComponents::PrepareQtPaths();
m_gemFolder = AZ::Test::GetEngineRootPath() + "/Gems/Atom/Asset/ImageProcessingAtom/";
s_gemFolder = m_gemFolder.c_str();
m_outputFolder = m_gemFolder + AZStd::string("Code/Tests/TestAssets/temp/");
m_defaultSettingFolder = m_gemFolder + AZStd::string("Config/");
m_testFileFolder = m_gemFolder + AZStd::string("Code/Tests/TestAssets/");
@ -185,7 +182,7 @@ namespace UnitTest
void TearDown() override
{
m_gemFolder = AZStd::string();
s_gemFolder = "";
m_outputFolder = AZStd::string();
m_defaultSettingFolder = AZStd::string();
m_testFileFolder = AZStd::string();
@ -226,16 +223,16 @@ namespace UnitTest
Image_512X288_RGB8_Tga,
Image_1024X1024_RGB8_Tif,
Image_UpperCase_Tga,
Image_512x512_Normal_Tga,
Image_512x512_Normal_Tga, // QImage doesn't support loading this file.
Image_128x128_Transparent_Tga,
Image_237x177_RGB_Jpg,
Image_GreyScale_Png,
Image_BlackWhite_Png,
Image_Alpha8_64x64_Mip7_Dds,
Image_BGRA_64x64_Mip7_Dds,
Image_Luminance8bpp_66x33_dds,
Image_BGR_64x64_dds,
Image_Sunset_4096x2048_R16G16B16A16F_exr
Image_defaultprobe_cm_1536x256_64bits_tif,
Image_workshop_iblskyboxcm_exr
};
//image file names for testing
@ -258,17 +255,29 @@ namespace UnitTest
m_imagFileNameMap[Image_128x128_Transparent_Tga] = m_testFileFolder + "128x128_RGBA8.tga";
m_imagFileNameMap[Image_237x177_RGB_Jpg] = m_testFileFolder + "237x177_RGB.jpg";
m_imagFileNameMap[Image_GreyScale_Png] = m_testFileFolder + "greyscale.png";
m_imagFileNameMap[Image_BlackWhite_Png] = m_testFileFolder + "BlackWhite.png";
m_imagFileNameMap[Image_Alpha8_64x64_Mip7_Dds] = m_testFileFolder + "Alpha8_64x64_Mip7.dds";
m_imagFileNameMap[Image_BGRA_64x64_Mip7_Dds] = m_testFileFolder + "BGRA_64x64_MIP7.dds";
m_imagFileNameMap[Image_Luminance8bpp_66x33_dds] = m_testFileFolder + "Luminance8bpp_66x33.dds";
m_imagFileNameMap[Image_BGR_64x64_dds] = m_testFileFolder + "RGBA_64x64.dds";
m_imagFileNameMap[Image_Sunset_4096x2048_R16G16B16A16F_exr] = m_testFileFolder + "sunset_cm.exr";
m_imagFileNameMap[Image_defaultprobe_cm_1536x256_64bits_tif] = m_testFileFolder + "defaultProbe_cm.tif";
m_imagFileNameMap[Image_workshop_iblskyboxcm_exr] = m_testFileFolder + "workshop_iblskyboxcm.exr";
}
public:
void SetOutputSubFolder(const char* subFolderName)
{
if (subFolderName)
{
m_outputFolder = m_outputRootFolder + "/" + subFolderName;
}
else
{
m_outputFolder = m_outputRootFolder;
}
}
//helper function to save an image object to a file through QtImage
static void SaveImageToFile([[maybe_unused]] const IImageObjectPtr imageObject, [[maybe_unused]] const AZStd::string imageName, [[maybe_unused]] AZ::u32 maxMipCnt = 100)
void SaveImageToFile([[maybe_unused]] const IImageObjectPtr imageObject, [[maybe_unused]] const AZStd::string imageName, [[maybe_unused]] AZ::u32 maxMipCnt = 100)
{
#ifndef DEBUG_OUTPUT_IMAGES
return;
@ -278,12 +287,12 @@ namespace UnitTest
return;
}
//create the directory if it's not exist
AZStd::string outputDir = s_gemFolder + AZStd::string("Code/Tests/TestAssets/Output/");
QDir dir(outputDir.data());
if (!dir.exists())
// create dir if it doesn't exist
QDir dir;
QDir outputDir(m_outputFolder.c_str());
if (!outputDir.exists())
{
dir.mkpath(".");
dir.mkpath(m_outputFolder.c_str());
}
//save origin file pixel format so we could use it to generate name later
@ -303,12 +312,13 @@ namespace UnitTest
finalImage->GetImagePointer(mip, imageBuf, pitch);
uint32 width = finalImage->GetWidth(mip);
uint32 height = finalImage->GetHeight(mip);
uint32 originalSize = imageObject->GetMipBufSize(mip);
//generate file name
char filePath[2048];
azsprintf(filePath, "%s%s_%s_mip%d_%dx%d.png", outputDir.data(), imageName.c_str()
azsprintf(filePath, "%s%s_%s_mip%d_%dx%d_%d.png", m_outputFolder.data(), imageName.c_str()
, CPixelFormats::GetInstance().GetPixelFormatInfo(originPixelFormat)->szName
, mip, width, height);
, mip, width, height, originalSize);
QImage qimage(imageBuf, width, height, pitch, QImage::Format_RGBA8888);
qimage.save(filePath);
@ -385,7 +395,7 @@ namespace UnitTest
}
static bool CompareDDSImage(const QString& imagePath1, const QString& imagePath2, QString& output)
bool CompareDDSImage(const QString& imagePath1, const QString& imagePath2, QString& output)
{
IImageObjectPtr image1, alphaImage1, image2, alphaImage2;
@ -530,15 +540,7 @@ namespace UnitTest
TEST_F(ImageProcessingTest, TestCubemapLayouts)
{
{
IImageObjectPtr srcImage(LoadImageFromFile(m_imagFileNameMap[Image_Sunset_4096x2048_R16G16B16A16F_exr]));
ImageToProcess imageToProcess(srcImage);
imageToProcess.ConvertCubemapLayout(CubemapLayoutHorizontalCross);
ASSERT_TRUE(imageToProcess.Get()->GetWidth(0) * 3 == imageToProcess.Get()->GetHeight(0) * 4);
SaveImageToFile(imageToProcess.Get(), "LatLong", 1);
}
{
IImageObjectPtr srcImage(LoadImageFromFile(m_testFileFolder + "defaultProbe_cm.tif"));
IImageObjectPtr srcImage(LoadImageFromFile(m_imagFileNameMap[Image_defaultprobe_cm_1536x256_64bits_tif]));
ImageToProcess imageToProcess(srcImage);
imageToProcess.ConvertCubemapLayout(CubemapLayoutVertical);
@ -635,12 +637,8 @@ namespace UnitTest
ASSERT_TRUE(img != nullptr);
ASSERT_TRUE(img->GetPixelFormat() == ePixelFormat_B8G8R8);
// Exr files
img = IImageObjectPtr(LoadImageFromFile(m_imagFileNameMap[Image_Sunset_4096x2048_R16G16B16A16F_exr]));
ASSERT_TRUE(img != nullptr);
img = IImageObjectPtr(LoadImageFromFile(m_testFileFolder + "abandoned_sanatorium_staircase_cm.exr"));
ASSERT_TRUE(img != nullptr);
img = IImageObjectPtr(LoadImageFromFile(m_testFileFolder + "road_in_tenerife_mountain_cm.exr"));
// Exr file
img = IImageObjectPtr(LoadImageFromFile(m_imagFileNameMap[Image_workshop_iblskyboxcm_exr]));
ASSERT_TRUE(img != nullptr);
}
@ -783,39 +781,36 @@ namespace UnitTest
ASSERT_TRUE(dstImage3->CompareImage(dstImage1));
}
TEST_F(ImageProcessingTest, DISABLED_TestConvertPVRTC)
{
//source image
AZStd::string inputFile;
inputFile = "../AutomatedTesting/Objects/ParticleAssets/ShowRoom/showroom_pipe_blue_001_ddna.tif";
IImageObjectPtr srcImage(LoadImageFromFile(inputFile));
ImageToProcess imageToProcess(srcImage);
for (EPixelFormat pixelFormat = ePixelFormat_PVRTC2; pixelFormat <= ePixelFormat_ETC2a;)
{
imageToProcess.Set(srcImage);
imageToProcess.ConvertFormat(pixelFormat);
SaveImageToFile(imageToProcess.Get(), "Compressor", 1);
//next format
pixelFormat = EPixelFormat(pixelFormat + 1);
}
}
TEST_F(ImageProcessingTest, DISABLED_TestConvertFormat)
TEST_F(ImageProcessingTest, TestConvertFormatCompressed)
{
EPixelFormat pixelFormat;
IImageObjectPtr srcImage;
//images to be tested
static const int imageCount = 5;
static const int imageCount = 4;
ImageFeature images[imageCount] = {
Image_20X16_RGBA8_Png,
Image_32X32_16bit_F_Tif,
Image_32X32_32bit_F_Tif,
Image_512x512_Normal_Tga,
Image_128x128_Transparent_Tga };
Image_237x177_RGB_Jpg,
Image_128x128_Transparent_Tga,
Image_defaultprobe_cm_1536x256_64bits_tif};
// collect all compressed pixel formats
AZStd::vector<EPixelFormat> compressedFormats;
for (uint32 i = 0; i < ePixelFormat_Count; i++)
{
EPixelFormat pixelFormat = (EPixelFormat)i;
auto formatInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(pixelFormat);
if (formatInfo->bCompressed)
{
// exclude astc formats until we add astc compressor to all platforms
// exclude pvrtc formats (deprecating)
if (!IsASTCFormat(pixelFormat)
&& pixelFormat != ePixelFormat_PVRTC2 && pixelFormat != ePixelFormat_PVRTC4
&& !IsETCFormat(pixelFormat)) // skip ETC since it's very slow
{
compressedFormats.push_back(pixelFormat);
}
}
}
for (int imageIdx = 0; imageIdx < imageCount; imageIdx++)
{
@ -827,44 +822,39 @@ namespace UnitTest
ImageToProcess imageToProcess(srcImage);
//test ConvertFormat functions against all the pixel formats
for (pixelFormat = ePixelFormat_R8G8B8A8; pixelFormat < ePixelFormat_Unknown;)
for (EPixelFormat pixelFormat : compressedFormats)
{
//
if (!CPixelFormats::GetInstance().IsImageSizeValid(pixelFormat, srcImage->GetWidth(0), srcImage->GetHeight(0), false))
{
continue;
}
auto formatInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(pixelFormat);
imageToProcess.Set(srcImage);
imageToProcess.ConvertFormat(pixelFormat);
ASSERT_TRUE(imageToProcess.Get());
//if the format is compressed and there is no compressor for it, it won't be converted to the expected format
if (ICompressor::FindCompressor(pixelFormat, ImageProcessingAtom::ColorSpace::autoSelect, true) == nullptr
&& !CPixelFormats::GetInstance().IsPixelFormatUncompressed(pixelFormat))
{
ASSERT_TRUE(imageToProcess.Get()->GetPixelFormat() != pixelFormat);
}
else
if (!imageToProcess.Get())
{
//validate the size and it may not working for some uncompressed format
if (!CPixelFormats::GetInstance().IsImageSizeValid(
pixelFormat, srcImage->GetWidth(0), srcImage->GetHeight(0), false))
{
ASSERT_TRUE(imageToProcess.Get()->GetPixelFormat() != pixelFormat);
AZ_Warning("test", false, "unsupported format: %s", formatInfo->szName);
continue;
}
else
{
ASSERT_TRUE(imageToProcess.Get());
ASSERT_TRUE(imageToProcess.Get()->GetPixelFormat() == pixelFormat);
// Get compressor name
ColorSpace sourceColorSpace = srcImage->HasImageFlags(EIF_SRGBRead) ? ColorSpace::sRGB : ColorSpace::linear;
ICompressorPtr compressor = ICompressor::FindCompressor(pixelFormat, sourceColorSpace, true);
//save the image to a file so we can check the visual result
SaveImageToFile(imageToProcess.Get(), imageName, 1);
AZStd::string outputName = AZStd::string::format("%s_%s", imageName.c_str(), compressor->GetName());
SaveImageToFile(imageToProcess.Get(), outputName, 1);
//convert back to an uncompressed format and expect it will be successful
imageToProcess.ConvertFormat(ePixelFormat_R8G8B8A8);
ASSERT_TRUE(imageToProcess.Get()->GetPixelFormat() == ePixelFormat_R8G8B8A8);
}
}
//next pixel format
pixelFormat = EPixelFormat(pixelFormat + 1);
}
}
}
TEST_F(ImageProcessingTest, DISABLED_TestImageFilter)
@ -932,22 +922,22 @@ namespace UnitTest
#endif //AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS
}
TEST_F(ImageProcessingTest, DISABLED_TestCubemap)
//test image conversion for builder
TEST_F(ImageProcessingTest, TestBuilderImageConvertor)
{
//load builder presets
auto outcome = BuilderSettingManager::Instance()->LoadConfigFromFolder(m_defaultSettingFolder);
ASSERT_TRUE(outcome.IsSuccess());
const AZStd::string outputFolder = m_gemFolder + AZStd::string("Code/Tests/TestAssets/temp/");
AZStd::string inputFile;
AZStd::vector<AssetBuilderSDK::JobProduct> outProducts;
inputFile = m_testFileFolder + "defaultProbe_cm.tif";
ImageConvertProcess* process = CreateImageConvertProcess(inputFile, outputFolder, "pc", outProducts);
inputFile = m_imagFileNameMap[Image_128x128_Transparent_Tga];
ImageConvertProcess* process = CreateImageConvertProcess(inputFile, m_outputFolder, "pc", outProducts, m_context.get());
if (process != nullptr)
{
//the process can be stopped if the job is canceled or the worker is shutting down
int step = 0;
while (!process->IsFinished())
{
@ -958,78 +948,49 @@ namespace UnitTest
//get process result
ASSERT_TRUE(process->IsSucceed());
SaveImageToFile(process->GetOutputImage(), "cubemap", 100);
SaveImageToFile(process->GetOutputIBLSpecularCubemap(), "iblspecularcubemap", 100);
SaveImageToFile(process->GetOutputIBLDiffuseCubemap(), "ibldiffusecubemap", 100);
SaveImageToFile(process->GetOutputAlphaImage(), "alpha", 1);
SaveImageToFile(process->GetOutputImage(), "rgb", 10);
SaveImageToFile(process->GetOutputAlphaImage(), "alpha", 10);
process->GetAppendOutputProducts(outProducts);
delete process;
}
}
//test image conversion for builder
TEST_F(ImageProcessingTest, TestBuilderImageConvertor)
TEST_F(ImageProcessingTest, TestIblSkyboxPreset)
{
//load builder presets
auto outcome = BuilderSettingManager::Instance()->LoadConfigFromFolder(m_defaultSettingFolder);
ASSERT_TRUE(outcome.IsSuccess());
const AZStd::string outputFolder = m_gemFolder + AZStd::string("Code/Tests/TestAssets/temp/");
AZStd::string inputFile;
AZStd::vector<AssetBuilderSDK::JobProduct> outProducts;
inputFile = m_imagFileNameMap[Image_128x128_Transparent_Tga];
ImageConvertProcess* process = CreateImageConvertProcess(inputFile, outputFolder, "pc", outProducts, m_context.get());
inputFile = m_imagFileNameMap[Image_workshop_iblskyboxcm_exr];
ImageConvertProcess* process = CreateImageConvertProcess(inputFile, m_outputFolder, "pc", outProducts, m_context.get());
if (process != nullptr)
{
//the process can be stopped if the job is canceled or the worker is shutting down
int step = 0;
while (!process->IsFinished())
{
process->UpdateProcess();
step++;
}
process->ProcessAll();
//get process result
ASSERT_TRUE(process->IsSucceed());
SaveImageToFile(process->GetOutputImage(), "rgb", 10);
SaveImageToFile(process->GetOutputAlphaImage(), "alpha", 10);
auto specularImage = process->GetOutputIBLSpecularCubemap();
auto diffuseImage = process->GetOutputIBLDiffuseCubemap();
ASSERT_TRUE(process->GetOutputImage());
ASSERT_TRUE(specularImage);
ASSERT_TRUE(diffuseImage);
process->GetAppendOutputProducts(outProducts);
// output converted result if save image is enabled
SaveImageToFile(process->GetOutputImage(), "ibl_skybox", 10);
SaveImageToFile(specularImage, "ibl_specular", 10);
SaveImageToFile(diffuseImage, "ibl_diffuse", 10);
delete process;
}
}
//test image loading function for output dds files
TEST_F(ImageProcessingTest, DISABLED_TestLoadDdsImage)
{
IImageObjectPtr originImage, alphaImage;
AZStd::string inputFolder = "../AutomatedTesting/Cache/pc/engineassets/texturemsg/";
AZStd::string inputFile;
inputFile = "E:/Javelin_NWLYDev/dev/Cache/Assets/pc/assets/textures/blend_maps/moss/jav_moss_ddn.dds";
IImageObjectPtr newImage = IImageObjectPtr(DdsLoader::LoadImageFromFileLegacy(inputFile));
if (newImage->HasImageFlags(EIF_AttachedAlpha))
{
if (newImage->HasImageFlags(EIF_Splitted))
{
alphaImage = IImageObjectPtr(DdsLoader::LoadImageFromFileLegacy(inputFile + ".a"));
}
else
{
alphaImage = IImageObjectPtr(DdsLoader::LoadAttachedImageFromDdsFileLegacy(inputFile, newImage));
}
}
SaveImageToFile(newImage, "jav_moss_ddn", 10);
}
TEST_F(ImageProcessingTest, DISABLED_CompareOutputImage)
{
AZStd::string curretTextureFolder = "../TestAssets/TextureAssets/assets_new/textures";

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:969c6597a6346c5ff8ae24b4ae143bacbeed2944dd139ddef9b440483dbe4c02
size 8866921

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef6c54d5fa8dd3906d07eb4d3a4d664e82d957103e4bfbcaa951e3722348300d
size 749794

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:265ae231486dc6d5d61aa2416b0010ea743722f7238660faeed9edacd46e8a6b
size 6303186

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a559d4b21606d663bc9c7f9d8086646770f5e383c2214e6d3be0b192abbc6888
size 7736382

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:37d146db3de179add861ee86d2316ef1dd413cdb0b02448b3b95bf0023f44bae
size 613

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:95ec8e752ba10edb8242a9bb8cc78e5b85fe2861268cf95e06942e2a10ef243c
size 7484335

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da49114be7305fad10121f92cdf6f153ebb3bc302edc662f2ed75cd45306ab7f
size 50364729

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:010165af78bdafe61dad187b250598fa670325428271f5bcf9bd4d839f4cc1c0
size 20114684

@ -129,6 +129,8 @@ set(FILES
Source/Compressors/CryTextureSquisher/ColorBlockRGBA4x4s.h
Source/Compressors/CryTextureSquisher/ColorBlockRGBA4x4c.h
Source/Compressors/CryTextureSquisher/ColorTypes.h
Source/Compressors/ISPCTextureCompressor.cpp
Source/Compressors/ISPCTextureCompressor.h
Source/Thumbnail/ImageThumbnail.cpp
Source/Thumbnail/ImageThumbnail.h
Source/Thumbnail/ImageThumbnailSystemComponent.cpp

@ -14,6 +14,7 @@
#include <stdio.h>
#include <AzCore/std/parallel/thread.h>
#include <AzCore/std/parallel/atomic.h>
#include <AzCore/PlatformIncl.h>
#include "VectorMacros.h"
#include "CBBoxInt32.h"
@ -22,11 +23,9 @@
//has routines for saving .rgbe files
#define CG_RGBE_SUPPORT
#ifndef WCHAR
#ifndef WCHAR // For non-windows platforms, for Windows-based platforms it will be defined through PlatformIncl.h
#define WCHAR wchar_t
#endif //WCHAR
#endif // WCHAR
//used to index cube faces
#define CP_FACE_X_POS 0

@ -14,10 +14,11 @@
#include "VectorMacros.h"
#include <ImageBuilderBaseType.h>
#include <AzCore/PlatformIncl.h>
#ifndef WCHAR
#ifndef WCHAR // For non-windows platforms, for Windows-based platforms it will be defined through PlatformIncl.h
#define WCHAR wchar_t
#endif //WCHAR
#endif // WCHAR
#ifndef SAFE_DELETE
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }

@ -11,13 +11,13 @@
#include <AzCore/StringFunc/StringFunc.h>
#include <AzCore/Utils/Utils.h>
#include <AzFramework/API/ApplicationAPI.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
#include <AzToolsFramework/AssetBrowser/AssetSelectionModel.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserBus.h>
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT
#include <QApplication>
#include <QFileDialog>
#include <QMessageBox>
#include <QProcess>
AZ_POP_DISABLE_WARNING
@ -29,7 +29,7 @@ namespace AtomToolsFramework
const QFileInfo initialFileInfo(initialPath);
const QString initialExt(initialFileInfo.completeSuffix());
const QFileInfo selectedFileInfo(QFileDialog::getSaveFileName(
const QFileInfo selectedFileInfo(AzQtComponents::FileDialog::GetSaveFileName(
QApplication::activeWindow(),
"Save File",
initialFileInfo.absolutePath() +
@ -104,7 +104,7 @@ namespace AtomToolsFramework
const QFileInfo initialFileInfo(initialPath);
const QString initialExt(initialFileInfo.completeSuffix());
const QFileInfo duplicateFileInfo(QFileDialog::getSaveFileName(
const QFileInfo duplicateFileInfo(AzQtComponents::FileDialog::GetSaveFileName(
QApplication::activeWindow(),
"Duplicate File",
GetUniqueFileInfo(initialPath).absoluteFilePath(),

@ -11,6 +11,8 @@
#include <AzFramework/Application/Application.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AtomToolsFramework/Util/Util.h>
#include <Atom/RPI.Edit/Common/AssetUtils.h>
@ -19,8 +21,6 @@
#include <Atom/Document/MaterialDocumentSettings.h>
#include <QFileDialog>
namespace MaterialEditor
{
CreateMaterialDialog::CreateMaterialDialog(QWidget* parent)
@ -95,7 +95,7 @@ namespace MaterialEditor
//When the file selection button is pressed, open a file dialog to select where the material will be saved
QObject::connect(m_ui->m_materialFilePicker, &AzQtComponents::BrowseEdit::attachedButtonTriggered, m_ui->m_materialFilePicker, [this]() {
QFileInfo fileInfo = QFileDialog::getSaveFileName(this,
QFileInfo fileInfo = AzQtComponents::FileDialog::GetSaveFileName(this,
QString("Select Material Filename"),
m_materialFileInfo.absoluteFilePath(),
QString("Material (*.material)"));

@ -11,6 +11,7 @@
#include <AzFramework/API/ApplicationAPI.h>
#include <AzQtComponents/Components/Widgets/BrowseEdit.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
#include <AzToolsFramework/API/EditorWindowRequestBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
@ -22,7 +23,6 @@ AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnin
#include <QCheckBox>
#include <QComboBox>
#include <QDialogButtonBox>
#include <QFileDialog>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QLabel>
@ -145,7 +145,7 @@ namespace AZ
// Whenever the browse button is clicked, open a save file dialog in the same location as the current export file setting
QObject::connect(materialFileWidget, &AzQtComponents::BrowseEdit::attachedButtonTriggered, materialFileWidget, [&dialog, &exportItem, materialFileWidget, overwriteCheckBox]() {
QFileInfo fileInfo = QFileDialog::getSaveFileName(&dialog,
QFileInfo fileInfo = AzQtComponents::FileDialog::GetSaveFileName(&dialog,
QString("Select Material Filename"),
exportItem.GetExportPath().c_str(),
QString("Material (*.material)"),

@ -9,7 +9,6 @@
#include "FileManager.h"
#include <MCore/Source/LogManager.h>
#include <MCore/Source/FileSystem.h>
#include <QFileDialog>
#include <QString>
#include <QTranslator>
#include <QMessageBox>
@ -36,6 +35,8 @@
#include <Source/Integration/Assets/MotionSetAsset.h>
#include <Source/Integration/Assets/AnimGraphAsset.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AzToolsFramework/AssetBrowser/AssetSelectionModel.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
@ -412,14 +413,12 @@ namespace EMStudio
{
GetManager()->SetAvoidRendering(true);
QFileDialog::Options options;
QString selectedFilter;
const AZStd::string filename = QFileDialog::getSaveFileName(parent, // parent
const AZStd::string filename = AzQtComponents::FileDialog::GetSaveFileName(parent, // parent
"Save", // caption
GetLastUsedFolder(m_lastActorFolder), // directory
"EMotion FX Actor Files (*.actor)",
&selectedFilter,
options).toUtf8().data();
&selectedFilter).toUtf8().data();
GetManager()->SetAvoidRendering(false);
@ -471,14 +470,12 @@ namespace EMStudio
{
GetManager()->SetAvoidRendering(true);
QFileDialog::Options options;
QString selectedFilter;
AZStd::string filename = QFileDialog::getSaveFileName(parent, // parent
AZStd::string filename = AzQtComponents::FileDialog::GetSaveFileName(parent, // parent
"Save", // caption
GetLastUsedFolder(m_lastWorkspaceFolder), // directory
"EMotionFX Editor Workspace Files (*.emfxworkspace)",
&selectedFilter,
options).toUtf8().data();
&selectedFilter).toUtf8().data();
GetManager()->SetAvoidRendering(false);
@ -553,14 +550,12 @@ namespace EMStudio
{
GetManager()->SetAvoidRendering(true);
QFileDialog::Options options;
QString selectedFilter;
AZStd::string filename = QFileDialog::getSaveFileName(parent, // parent
AZStd::string filename = AzQtComponents::FileDialog::GetSaveFileName(parent, // parent
"Save", // caption
GetLastUsedFolder(m_lastMotionSetFolder), // directory
"EMotion FX Motion Set Files (*.motionset)",
&selectedFilter,
options).toUtf8().data();
&selectedFilter).toUtf8().data();
GetManager()->SetAvoidRendering(false);
@ -632,14 +627,12 @@ namespace EMStudio
{
GetManager()->SetAvoidRendering(true);
QFileDialog::Options options;
QString selectedFilter;
AZStd::string filename = QFileDialog::getSaveFileName(parent, // parent
AZStd::string filename = AzQtComponents::FileDialog::GetSaveFileName(parent, // parent
"Save", // caption
GetLastUsedFolder(m_lastAnimGraphFolder), // directory
"EMotion FX Anim Graph Files (*.animgraph);;All Files (*)",
&selectedFilter,
options).toUtf8().data();
&selectedFilter).toUtf8().data();
GetManager()->SetAvoidRendering(false);
@ -675,14 +668,12 @@ namespace EMStudio
{
GetManager()->SetAvoidRendering(true);
QFileDialog::Options options;
QString selectedFilter;
const AZStd::string filename = QFileDialog::getSaveFileName(parent, // parent
const AZStd::string filename = AzQtComponents::FileDialog::GetSaveFileName(parent, // parent
"Save", // caption
GetLastUsedFolder(m_lastNodeMapFolder), // directory
"Node Map Files (*.nodeMap);;All Files (*)",
&selectedFilter,
options).toUtf8().data();
&selectedFilter).toUtf8().data();
GetManager()->SetAvoidRendering(false);
@ -737,14 +728,12 @@ namespace EMStudio
GetManager()->SetAvoidRendering(true);
QFileDialog::Options options;
QString selectedFilter;
QString filename = QFileDialog::getSaveFileName(parent, // parent
QString filename = AzQtComponents::FileDialog::GetSaveFileName(parent, // parent
"Save", // caption
dir.c_str(), // directory
"EMotion FX Blend Config Files (*.cfg);;All Files (*)",
&selectedFilter,
options);
&selectedFilter);
GetManager()->SetAvoidRendering(false);

@ -14,6 +14,7 @@
#include <AzToolsFramework/Slice/SliceUtilities.h>
#include <AzToolsFramework/AssetBrowser/AssetBrowserEntry.h>
#include <AzQtComponents/Components/StyledDockWidget.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AzQtComponents/Components/Widgets/TabWidget.h>
#include <LyShine/UiComponentTypes.h>
#include <LyShine/Bus/UiEditorCanvasBus.h>
@ -32,7 +33,6 @@
#include <QClipboard>
#include <QUndoGroup>
#include <QScrollBar>
#include <QFileDialog>
#define UICANVASEDITOR_SETTINGS_EDIT_MODE_STATE_KEY (QString("Edit Mode State") + " " + FileHelpers::GetAbsoluteGameDir())
#define UICANVASEDITOR_SETTINGS_EDIT_MODE_GEOM_KEY (QString("Edit Mode Geometry") + " " + FileHelpers::GetAbsoluteGameDir())
@ -706,7 +706,7 @@ bool EditorWindow::SaveCanvasToXml(UiCanvasMetadata& canvasMetadata, bool forceA
dir.append(canvasMetadata.m_canvasDisplayName.c_str());
}
QString filename = QFileDialog::getSaveFileName(nullptr,
QString filename = AzQtComponents::FileDialog::GetSaveFileName(nullptr,
QString(),
dir,
"*." UICANVASEDITOR_CANVAS_EXTENSION,

@ -15,7 +15,6 @@
#include <QSplitter>
#include <QListView>
#include <QFileDialog>
#include <QShortcut>
#include <QKeySequence>
#include <QKeyEvent>
@ -91,6 +90,7 @@
#include <AzToolsFramework/ToolsComponents/ToolsAssetCatalogBus.h>
#include <AzToolsFramework/UI/UICore/WidgetHelpers.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AzQtComponents/Components/Widgets/TabWidget.h>
#include <ScriptCanvas/Core/ScriptCanvasBus.h>
@ -1868,7 +1868,7 @@ namespace ScriptCanvasEditor
while (!isValidFileName)
{
selectedFile = QFileDialog::getSaveFileName(this, tr("Save As..."), suggestedFilename.data(), filter);
selectedFile = AzQtComponents::FileDialog::GetSaveFileName(this, tr("Save As..."), suggestedFilename.data(), filter);
// If the selected file is empty that means we just cancelled.
// So we want to break out.

@ -24,6 +24,7 @@
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/std/numeric.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzQtComponents/Components/Widgets/FileDialog.h>
#include <AzToolsFramework/API/ComponentEntitySelectionBus.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
#include <AzToolsFramework/API/EditorPythonRunnerRequestsBus.h>
@ -31,7 +32,6 @@
#include <AzToolsFramework/Entity/EditorEntityInfoBus.h>
#include <AzToolsFramework/Maths/TransformUtils.h>
#include <AzToolsFramework/UI/UICore/WidgetHelpers.h>
#include <QFileDialog>
#include <QMessageBox>
#include <WhiteBox/EditorWhiteBoxColliderBus.h>
#include <WhiteBox/WhiteBoxBus.h>
@ -513,7 +513,7 @@ namespace WhiteBox
WhiteBoxPathAtProjectRoot(GetEntity()->GetName(), ObjExtension);
const QString fileFilter = AZStd::string::format("*.%s", ObjExtension).c_str();
const QString absoluteSaveFilePath = QFileDialog::getSaveFileName(
const QString absoluteSaveFilePath = AzQtComponents::FileDialog::GetSaveFileName(
nullptr, "Save As...", QString(initialAbsolutePathToExport.c_str()), fileFilter);
const auto absoluteSaveFilePathUtf8 = absoluteSaveFilePath.toUtf8();
@ -577,7 +577,7 @@ namespace WhiteBox
{
const QString fileFilter =
AZStd::string::format("*.%s", Pipeline::WhiteBoxMeshAssetHandler::AssetFileExtension).c_str();
const QString absolutePath = QFileDialog::getSaveFileName(
const QString absolutePath = AzQtComponents::FileDialog::GetSaveFileName(
nullptr, "Save As Asset...", QString(initialAbsolutePath.c_str()), fileFilter);
return AZStd::string(absolutePath.toUtf8());

@ -9,7 +9,6 @@
# shared by other platforms:
ly_associate_package(PACKAGE_NAME ilmbase-2.3.0-rev4-multiplatform TARGETS ilmbase PACKAGE_HASH 97547fdf1fbc4d81b8ccf382261f8c25514ed3b3c4f8fd493f0a4fa873bba348)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev11-multiplatform TARGETS assimplib PACKAGE_HASH 1a9113788b893ef4a2ee63ac01eb71b981a92894a5a51175703fa225f5804dec)
ly_associate_package(PACKAGE_NAME squish-ccr-20150601-rev3-multiplatform TARGETS squish-ccr PACKAGE_HASH c878c6c0c705e78403c397d03f5aa7bc87e5978298710e14d09c9daf951a83b3)
ly_associate_package(PACKAGE_NAME ASTCEncoder-2017_11_14-rev2-multiplatform TARGETS ASTCEncoder PACKAGE_HASH c240ffc12083ee39a5ce9dc241de44d116e513e1e3e4cc1d05305e7aa3bdc326)
ly_associate_package(PACKAGE_NAME md5-2.0-multiplatform TARGETS md5 PACKAGE_HASH 29e52ad22c78051551f78a40c2709594f0378762ae03b417adca3f4b700affdf)
ly_associate_package(PACKAGE_NAME RapidJSON-1.1.0-rev1-multiplatform TARGETS RapidJSON PACKAGE_HASH 2f5e26ecf86c3b7a262753e7da69ac59928e78e9534361f3d00c1ad5879e4023)
@ -45,5 +44,7 @@ ly_associate_package(PACKAGE_NAME DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-li
ly_associate_package(PACKAGE_NAME SPIRVCross-2021.04.29-rev1-linux TARGETS SPIRVCross PACKAGE_HASH 7889ee5460a688e9b910c0168b31445c0079d363affa07b25d4c8aeb608a0b80)
ly_associate_package(PACKAGE_NAME azslc-1.7.23-rev2-linux TARGETS azslc PACKAGE_HASH 1ba84d8321a566d35a1e9aa7400211ba8e6d1c11c08e4be3c93e6e74b8f7aef1)
ly_associate_package(PACKAGE_NAME zlib-1.2.11-rev1-linux TARGETS zlib PACKAGE_HASH 6418e93b9f4e6188f3b62cbd3a7822e1c4398a716e786d1522b809a727d08ba9)
ly_associate_package(PACKAGE_NAME squish-ccr-deb557d-rev1-linux TARGETS squish-ccr PACKAGE_HASH 85fecafbddc6a41a27c5f59ed4a5dfb123a94cb4666782cf26e63c0a4724c530)
ly_associate_package(PACKAGE_NAME ISPCTexComp-36b80aa-rev1-linux TARGETS ISPCTexComp PACKAGE_HASH 065fd12abe4247dde247330313763cf816c3375c221da030bdec35024947f259)

@ -1,9 +0,0 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
set(SQUISH-CCR_LIBS ${BASE_PATH}/lib/Linux/Release/libsquish-ccr.a)

@ -9,7 +9,6 @@
# shared by other platforms:
ly_associate_package(PACKAGE_NAME ilmbase-2.3.0-rev4-multiplatform TARGETS ilmbase PACKAGE_HASH 97547fdf1fbc4d81b8ccf382261f8c25514ed3b3c4f8fd493f0a4fa873bba348)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev11-multiplatform TARGETS assimplib PACKAGE_HASH 1a9113788b893ef4a2ee63ac01eb71b981a92894a5a51175703fa225f5804dec)
ly_associate_package(PACKAGE_NAME squish-ccr-20150601-rev3-multiplatform TARGETS squish-ccr PACKAGE_HASH c878c6c0c705e78403c397d03f5aa7bc87e5978298710e14d09c9daf951a83b3)
ly_associate_package(PACKAGE_NAME ASTCEncoder-2017_11_14-rev2-multiplatform TARGETS ASTCEncoder PACKAGE_HASH c240ffc12083ee39a5ce9dc241de44d116e513e1e3e4cc1d05305e7aa3bdc326)
ly_associate_package(PACKAGE_NAME md5-2.0-multiplatform TARGETS md5 PACKAGE_HASH 29e52ad22c78051551f78a40c2709594f0378762ae03b417adca3f4b700affdf)
ly_associate_package(PACKAGE_NAME RapidJSON-1.1.0-rev1-multiplatform TARGETS RapidJSON PACKAGE_HASH 2f5e26ecf86c3b7a262753e7da69ac59928e78e9534361f3d00c1ad5879e4023)
@ -43,3 +42,6 @@ ly_associate_package(PACKAGE_NAME OpenSSL-1.1.1b-rev1-mac
ly_associate_package(PACKAGE_NAME qt-5.15.2-rev5-mac TARGETS Qt PACKAGE_HASH 9d25918351898b308ded3e9e571fff6f26311b2071aeafd00dd5b249fdf53f7e)
ly_associate_package(PACKAGE_NAME libsamplerate-0.2.1-rev2-mac TARGETS libsamplerate PACKAGE_HASH b912af40c0ac197af9c43d85004395ba92a6a859a24b7eacd920fed5854a97fe)
ly_associate_package(PACKAGE_NAME zlib-1.2.11-rev1-mac TARGETS zlib PACKAGE_HASH 7fd8a77b3598423d9d6be5f8c60d52aecf346ab4224f563a5282db283aa0da02)
ly_associate_package(PACKAGE_NAME squish-ccr-deb557d-rev1-mac TARGETS squish-ccr PACKAGE_HASH 155bfbfa17c19a9cd2ef025de14c5db598f4290045d5b0d83ab58cb345089a77)
ly_associate_package(PACKAGE_NAME ISPCTexComp-36b80aa-rev1-mac TARGETS ISPCTexComp PACKAGE_HASH 8a4e93277b8face6ea2fd57c6d017bdb55643ed3d6387110bc5f6b3b884dd169)

@ -1,9 +0,0 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
set(SQUISH-CCR_LIBS ${BASE_PATH}/lib/Mac/Release/libsquish-ccr.a)

@ -9,7 +9,6 @@
# shared by other platforms:
ly_associate_package(PACKAGE_NAME ilmbase-2.3.0-rev4-multiplatform TARGETS ilmbase PACKAGE_HASH 97547fdf1fbc4d81b8ccf382261f8c25514ed3b3c4f8fd493f0a4fa873bba348)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev11-multiplatform TARGETS assimplib PACKAGE_HASH 1a9113788b893ef4a2ee63ac01eb71b981a92894a5a51175703fa225f5804dec)
ly_associate_package(PACKAGE_NAME squish-ccr-20150601-rev3-multiplatform TARGETS squish-ccr PACKAGE_HASH c878c6c0c705e78403c397d03f5aa7bc87e5978298710e14d09c9daf951a83b3)
ly_associate_package(PACKAGE_NAME ASTCEncoder-2017_11_14-rev2-multiplatform TARGETS ASTCEncoder PACKAGE_HASH c240ffc12083ee39a5ce9dc241de44d116e513e1e3e4cc1d05305e7aa3bdc326)
ly_associate_package(PACKAGE_NAME md5-2.0-multiplatform TARGETS md5 PACKAGE_HASH 29e52ad22c78051551f78a40c2709594f0378762ae03b417adca3f4b700affdf)
ly_associate_package(PACKAGE_NAME RapidJSON-1.1.0-rev1-multiplatform TARGETS RapidJSON PACKAGE_HASH 2f5e26ecf86c3b7a262753e7da69ac59928e78e9534361f3d00c1ad5879e4023)
@ -51,3 +50,5 @@ ly_associate_package(PACKAGE_NAME civetweb-1.8-rev1-windows
ly_associate_package(PACKAGE_NAME OpenSSL-1.1.1b-rev2-windows TARGETS OpenSSL PACKAGE_HASH 9af1c50343f89146b4053101a7aeb20513319a3fe2f007e356d7ce25f9241040)
ly_associate_package(PACKAGE_NAME Crashpad-0.8.0-rev1-windows TARGETS Crashpad PACKAGE_HASH d162aa3070147bc0130a44caab02c5fe58606910252caf7f90472bd48d4e31e2)
ly_associate_package(PACKAGE_NAME zlib-1.2.11-rev1-windows TARGETS zlib PACKAGE_HASH 6fb46a0ef8c8614cde3517b50fca47f2a6d1fd059b21f3b8ff13e635ca7f2fa6)
ly_associate_package(PACKAGE_NAME squish-ccr-deb557d-rev1-windows TARGETS squish-ccr PACKAGE_HASH 5c3d9fa491e488ccaf802304ad23b932268a2b2846e383f088779962af2bfa84)
ly_associate_package(PACKAGE_NAME ISPCTexComp-36b80aa-rev1-windows TARGETS ISPCTexComp PACKAGE_HASH b6fa6ea28a2808a9a5524c72c37789c525925e435770f2d94eb2d387360fa2d0)

@ -1,9 +0,0 @@
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
set(SQUISH-CCR_LIBS ${BASE_PATH}/lib/Windows/Release/squish-ccr.lib)
Loading…
Cancel
Save