/* * 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 #include #include #include #include #include #include #include #include namespace AZ { namespace LyIntegration { namespace Thumbnails { //! Provides custom rendering of material and model thumbnails class CommonThumbnailRenderer : public AzToolsFramework::Thumbnailer::ThumbnailerRendererRequestBus::MultiHandler , public SystemTickBus::Handler { public: AZ_CLASS_ALLOCATOR(CommonThumbnailRenderer, AZ::SystemAllocator, 0); CommonThumbnailRenderer(); ~CommonThumbnailRenderer(); private: //! ThumbnailerRendererRequestsBus::Handler interface overrides... void RenderThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize) override; bool Installed() const override; //! SystemTickBus::Handler interface overrides... void OnSystemTick() override; static constexpr const char* DefaultLightingPresetPath = "lightingpresets/thumbnail.lightingpreset.azasset"; const Data::AssetId DefaultLightingPresetAssetId = AZ::RPI::AssetUtils::GetAssetIdForProductPath(DefaultLightingPresetPath); Data::Asset m_defaultLightingPresetAsset; static constexpr const char* DefaultModelPath = "models/sphere.azmodel"; const Data::AssetId DefaultModelAssetId = AZ::RPI::AssetUtils::GetAssetIdForProductPath(DefaultModelPath); Data::Asset m_defaultModelAsset; static constexpr const char* DefaultMaterialPath = ""; const Data::AssetId DefaultMaterialAssetId; Data::Asset m_defaultMaterialAsset; AZStd::unique_ptr m_previewRenderer; }; } // namespace Thumbnails } // namespace LyIntegration } // namespace AZ