Moved asynchronous image loading function to atom tools framework
Moved settings registry wrapper function to atom tools framework Created registry settings with default values for preview configurations based on asset type Changed lighting preset previews and thumbnails to use reflective material Created registry settings for preset selection dialog borders, padding, sizes Updated shared preview utility functions to compare against registered asset types instead of passing them in individually Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
+16
-12
@@ -8,9 +8,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <AzCore/Asset/AssetCommon.h>
|
||||
#include <AzCore/Asset/AssetManagerBus.h>
|
||||
#include <AzToolsFramework/Thumbnails/Thumbnail.h>
|
||||
#endif
|
||||
|
||||
@@ -20,21 +20,25 @@ namespace AZ
|
||||
{
|
||||
namespace SharedPreviewUtils
|
||||
{
|
||||
//! Get assetId by assetType that belongs to either source or product thumbnail key
|
||||
Data::AssetId GetAssetId(
|
||||
AzToolsFramework::Thumbnailer::SharedThumbnailKey key,
|
||||
const Data::AssetType& assetType,
|
||||
const Data::AssetId& defaultAssetId = {});
|
||||
|
||||
//! Word wrap function for previewer QLabel, since by default it does not break long words such as filenames, so manual word
|
||||
//! wrap needed
|
||||
QString WordWrap(const QString& string, int maxLength);
|
||||
|
||||
//! Get the set of all asset types supported by the shared preview
|
||||
AZStd::unordered_set<AZ::Uuid> GetSupportedAssetTypes();
|
||||
|
||||
//! Determine if a thumbnail key has an asset supported by the shared preview
|
||||
bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key);
|
||||
|
||||
//! Get assetInfo of source or product thumbnail key if asset type is supported by the shared preview
|
||||
AZ::Data::AssetInfo GetSupportedAssetInfo(AzToolsFramework::Thumbnailer::SharedThumbnailKey key);
|
||||
|
||||
//! Get assetId of source or product thumbnail key if asset type is supported by the shared preview
|
||||
AZ::Data::AssetId GetSupportedAssetId(
|
||||
AzToolsFramework::Thumbnailer::SharedThumbnailKey key, const AZ::Data::AssetId& defaultAssetId = {});
|
||||
|
||||
//! Wraps AZ::RPI::AssetUtils::GetAssetIdForProductPath to handle empty productPath
|
||||
AZ::Data::AssetId GetAssetIdForProductPath(const AZStd::string_view productPath);
|
||||
|
||||
//! Inserts new line characters into a string whenever the maximum number of characters per line is exceeded
|
||||
QString WordWrap(const QString& string, int maxLength);
|
||||
|
||||
} // namespace SharedPreviewUtils
|
||||
} // namespace LyIntegration
|
||||
} // namespace AZ
|
||||
|
||||
Reference in New Issue
Block a user