Additional preview renderer checks
Preventing multiple preview renderers from being created with multiple catalog loaded notifications Purging material preview images reaching a maximum number of stored images Purging material previews if entity gets destroyed Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
+11
-5
@@ -216,11 +216,17 @@ namespace AZ
|
||||
using namespace LyIntegration;
|
||||
|
||||
ThumbnailerRequestsBus::Broadcast(
|
||||
&ThumbnailerRequests::RegisterThumbnailProvider, MAKE_TCACHE(SharedThumbnailCache),
|
||||
ThumbnailContext::DefaultContext);
|
||||
&ThumbnailerRequests::RegisterThumbnailProvider, MAKE_TCACHE(SharedThumbnailCache), ThumbnailContext::DefaultContext);
|
||||
|
||||
m_renderer = AZStd::make_unique<AZ::LyIntegration::SharedThumbnailRenderer>();
|
||||
m_previewerFactory = AZStd::make_unique<LyIntegration::SharedPreviewerFactory>();
|
||||
if (!m_thumbnailRenderer)
|
||||
{
|
||||
m_thumbnailRenderer = AZStd::make_unique<AZ::LyIntegration::SharedThumbnailRenderer>();
|
||||
}
|
||||
|
||||
if (!m_previewerFactory)
|
||||
{
|
||||
m_previewerFactory = AZStd::make_unique<LyIntegration::SharedPreviewerFactory>();
|
||||
}
|
||||
}
|
||||
|
||||
void EditorCommonFeaturesSystemComponent::TeardownThumbnails()
|
||||
@@ -232,7 +238,7 @@ namespace AZ
|
||||
&ThumbnailerRequests::UnregisterThumbnailProvider, SharedThumbnailCache::ProviderName,
|
||||
ThumbnailContext::DefaultContext);
|
||||
|
||||
m_renderer.reset();
|
||||
m_thumbnailRenderer.reset();
|
||||
m_previewerFactory.reset();
|
||||
}
|
||||
} // namespace Render
|
||||
|
||||
Reference in New Issue
Block a user