SharedPreviewUtils.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #if !defined(Q_MOC_RUN)
  10. #include <AzCore/Asset/AssetCommon.h>
  11. #include <AzCore/Asset/AssetManagerBus.h>
  12. #include <AzToolsFramework/Thumbnails/Thumbnail.h>
  13. #endif
  14. namespace AZ
  15. {
  16. namespace LyIntegration
  17. {
  18. namespace SharedPreviewUtils
  19. {
  20. //! Get the set of all asset types supported by the shared preview
  21. AZStd::vector<AZ::Uuid> GetSupportedAssetTypes();
  22. //! Determine if a thumbnail key has an asset supported by the shared preview
  23. bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key);
  24. //! Get assetInfo of source or product thumbnail key if asset type is supported by the shared preview
  25. AZ::Data::AssetInfo GetSupportedAssetInfo(AzToolsFramework::Thumbnailer::SharedThumbnailKey key);
  26. //! Wraps AZ::RPI::AssetUtils::GetAssetIdForProductPath to handle empty productPath
  27. AZ::Data::AssetId GetAssetIdForProductPath(const AZStd::string_view productPath);
  28. //! Inserts new line characters into a string whenever the maximum number of characters per line is exceeded
  29. QString WordWrap(const QString& string, int maxLength);
  30. } // namespace SharedPreviewUtils
  31. } // namespace LyIntegration
  32. } // namespace AZ