diff --git a/Code/CryEngine/CrySystem/System.cpp b/Code/CryEngine/CrySystem/System.cpp index a48f63afdf..827a393103 100644 --- a/Code/CryEngine/CrySystem/System.cpp +++ b/Code/CryEngine/CrySystem/System.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include @@ -1162,31 +1161,6 @@ void CSystem::SleepIfInactive() { return; } - -#if defined(WIN32) - if (!AZ::Interface::Get()) - { - WIN_HWND hRendWnd = GetIRenderer()->GetHWND(); - if (!hRendWnd) - { - return; - } - - AZ_TRACE_METHOD(); - // Loop here waiting for window to be activated. - for (int nLoops = 0; nLoops < 5; nLoops++) - { - WIN_HWND hActiveWnd = ::GetActiveWindow(); - if (hActiveWnd == hRendWnd) - { - break; - } - - AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::PumpSystemEventLoopUntilEmpty); - Sleep(5); - } - } -#endif } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/CryEngine/CrySystem/SystemInit.cpp b/Code/CryEngine/CrySystem/SystemInit.cpp index d293f9ca80..826810ef8a 100644 --- a/Code/CryEngine/CrySystem/SystemInit.cpp +++ b/Code/CryEngine/CrySystem/SystemInit.cpp @@ -68,7 +68,6 @@ #include #include #include -#include #include #include @@ -2462,21 +2461,6 @@ AZ_POP_DISABLE_WARNING m_env.pRenderer->SetViewport(0, 0, screenWidth, screenHeight); - // Skip splash screen rendering - if (!AZ::Interface::Get()) - { - // make sure it's rendered in full screen mode when triple buffering is enabled as well - for (size_t n = 0; n < 3; n++) - { - m_env.pRenderer->BeginFrame(); - m_env.pRenderer->SetCullMode(R_CULL_NONE); - m_env.pRenderer->SetState(GS_BLSRC_SRCALPHA | GS_BLDST_ONEMINUSSRCALPHA | GS_NODEPTHTEST); - m_env.pRenderer->Draw2dImageStretchMode(true); - m_env.pRenderer->Draw2dImage(x * vx, y * vy, w * vx, h * vy, pTex->GetTextureID(), 0.0f, 1.0f, 1.0f, 0.0f); - m_env.pRenderer->Draw2dImageStretchMode(false); - m_env.pRenderer->EndFrame(); - } - } #if defined(AZ_PLATFORM_IOS) || defined(AZ_PLATFORM_MAC) // Pump system events in order to update the screen AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::PumpSystemEventLoopUntilEmpty); diff --git a/Code/Framework/AzFramework/AzFramework/API/AtomActiveInterface.h b/Code/Framework/AzFramework/AzFramework/API/AtomActiveInterface.h deleted file mode 100644 index 80d4f6c867..0000000000 --- a/Code/Framework/AzFramework/AzFramework/API/AtomActiveInterface.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or - * its licensors. - * - * For complete copyright and license terms please see the LICENSE at the root of this - * distribution (the "License"). All use of this software is governed by the License, - * or, if provided, by the license below or the license accompanying this file. Do not - * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * - */ -#pragma once - -#include - -namespace AzFramework -{ - class AtomActiveInterface - { - public: - AZ_RTTI(AtomActiveInterface, "{4BB59C86-0848-485D-AB28-700540470B2B}"); - - AtomActiveInterface() = default; - virtual ~AtomActiveInterface() = default; - }; -} // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake index b126a192ac..88f68d8bab 100644 --- a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake +++ b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake @@ -14,7 +14,6 @@ set(FILES AzFrameworkModule.h AzFrameworkModule.cpp API/ApplicationAPI.h - API/AtomActiveInterface.h Application/Application.cpp Application/Application.h Archive/Archive.cpp diff --git a/Code/Framework/AzQtComponents/Platform/Windows/AzQtComponents/Utilities/HandleDpiAwareness_Windows.cpp b/Code/Framework/AzQtComponents/Platform/Windows/AzQtComponents/Utilities/HandleDpiAwareness_Windows.cpp index 9ffe06f7e3..b834995bd9 100644 --- a/Code/Framework/AzQtComponents/Platform/Windows/AzQtComponents/Utilities/HandleDpiAwareness_Windows.cpp +++ b/Code/Framework/AzQtComponents/Platform/Windows/AzQtComponents/Utilities/HandleDpiAwareness_Windows.cpp @@ -16,7 +16,6 @@ #include #include -#include #include namespace AzQtComponents diff --git a/Code/Sandbox/Editor/Core/LevelEditorMenuHandler.cpp b/Code/Sandbox/Editor/Core/LevelEditorMenuHandler.cpp index 3f396894ff..869fa2fe25 100644 --- a/Code/Sandbox/Editor/Core/LevelEditorMenuHandler.cpp +++ b/Code/Sandbox/Editor/Core/LevelEditorMenuHandler.cpp @@ -23,7 +23,6 @@ #include "Objects/SelectionGroup.h" #include "ViewManager.h" -#include #include // Qt diff --git a/Code/Sandbox/Editor/CryEditDoc.cpp b/Code/Sandbox/Editor/CryEditDoc.cpp index 41c49ab026..2bc4dcf10c 100644 --- a/Code/Sandbox/Editor/CryEditDoc.cpp +++ b/Code/Sandbox/Editor/CryEditDoc.cpp @@ -27,7 +27,6 @@ // AzFramework #include #include -#include // AzToolsFramework #include @@ -2417,42 +2416,7 @@ void CCryEditDoc::InitEmptyLevel(int /*resolution*/, int /*unitSize*/, bool /*bU void CCryEditDoc::CreateDefaultLevelAssets(int resolution, int unitSize) { - if (AZ::Interface::Get()) - { - AzToolsFramework::EditorLevelNotificationBus::Broadcast(&AzToolsFramework::EditorLevelNotificationBus::Events::OnNewLevelCreated); - } - else - { - bool isPrefabSystemEnabled = false; - AzFramework::ApplicationRequests::Bus::BroadcastResult( - isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled); - - if (!isPrefabSystemEnabled) - { - AZ::Data::AssetCatalogRequestBus::BroadcastResult( - m_envProbeSliceAssetId, &AZ::Data::AssetCatalogRequests::GetAssetIdByPath, m_envProbeSliceRelativePath, - azrtti_typeid(), false); - - if (m_envProbeSliceAssetId.IsValid()) - { - AZ::Data::Asset asset = AZ::Data::AssetManager::Instance().FindOrCreateAsset( - m_envProbeSliceAssetId, AZ::Data::AssetLoadBehavior::Default); - if (asset) - { - m_terrainSize = resolution * unitSize; - const float halfTerrainSize = m_terrainSize / 2.0f; - - AZ::Transform worldTransform = AZ::Transform::CreateIdentity(); - worldTransform = AZ::Transform::CreateTranslation(AZ::Vector3(halfTerrainSize, halfTerrainSize, m_envProbeHeight / 2)); - - AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusConnect(); - GetIEditor()->SuspendUndo(); - AzToolsFramework::SliceEditorEntityOwnershipServiceRequestBus::Broadcast( - &AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::InstantiateEditorSlice, asset, worldTransform); - } - } - } - } + AzToolsFramework::EditorLevelNotificationBus::Broadcast(&AzToolsFramework::EditorLevelNotificationBus::Events::OnNewLevelCreated); } void CCryEditDoc::OnEnvironmentPropertyChanged(IVariable* pVar) diff --git a/Code/Sandbox/Editor/EditorViewportWidget.cpp b/Code/Sandbox/Editor/EditorViewportWidget.cpp index 9165809c7f..1a8d3a863d 100644 --- a/Code/Sandbox/Editor/EditorViewportWidget.cpp +++ b/Code/Sandbox/Editor/EditorViewportWidget.cpp @@ -40,7 +40,6 @@ # include #endif // defined(AZ_PLATFORM_WINDOWS) #include // for AzFramework::InputDeviceMouse -#include #include // AzQtComponents diff --git a/Code/Sandbox/Editor/IconManager.cpp b/Code/Sandbox/Editor/IconManager.cpp index 09c2d41035..3916ee7726 100644 --- a/Code/Sandbox/Editor/IconManager.cpp +++ b/Code/Sandbox/Editor/IconManager.cpp @@ -15,7 +15,6 @@ #include "IconManager.h" -#include #include // AzToolsFramework @@ -115,69 +114,11 @@ int CIconManager::GetIconTexture(const char* iconName) return 0; } - if (AZ::Interface::Get()) + ITexture* texture = GetIEditor()->GetRenderer() ? GetIEditor()->GetRenderer()->EF_LoadTexture(iconName) : nullptr; + if (texture) { - ITexture* texture = GetIEditor()->GetRenderer() ? GetIEditor()->GetRenderer()->EF_LoadTexture(iconName) : nullptr; - if (texture) - { - id = texture->GetTextureID(); - m_textures[iconName] = id; - } - } - else - { - QString ext = Path::GetExt(iconName); - QString actualName = iconName; - - char iconPath[AZ_MAX_PATH_LEN] = { 0 }; - gEnv->pFileIO->ResolvePath(actualName.toUtf8().data(), iconPath, AZ_MAX_PATH_LEN); - - // if we can't find it at the resolved path, try the devroot if necessary: - if (!gEnv->pFileIO->Exists(iconPath)) - { - if (iconName[0] != '@') // it has no specified alias - { - if (QString::compare(ext, "dds", Qt::CaseInsensitive) != 0) // if its a DDS, it comes out of processed files in @assets@, and assets is assumed by default (legacy renderer) - { - // check for a source file - AZStd::string iconFullPath; - bool pathFound = false; - using AssetSysReqBus = AzToolsFramework::AssetSystemRequestBus; - AssetSysReqBus::BroadcastResult(pathFound, &AssetSysReqBus::Events::GetFullSourcePathFromRelativeProductPath, iconName, iconFullPath); - - if (pathFound) - { - azstrncpy(iconPath, AZ_MAX_PATH_LEN, iconFullPath.c_str(), iconFullPath.length() + 1); - } - } - } - } - - CImageEx image; - // Load icon. - if (CImageUtil::LoadImage(iconPath, image)) - { - IRenderer* pRenderer(GetIEditor()->GetRenderer()); - if (pRenderer->GetRenderType() != eRT_DX11) - { - image.SwapRedAndBlue(); - } - - if (QString::compare(ext, "bmp", Qt::CaseInsensitive) == 0 || QString::compare(ext, "jpg", Qt::CaseInsensitive) == 0) - { - int sz = image.GetWidth() * image.GetHeight(); - uint8* buf = (uint8*)image.GetData(); - for (int i = 0; i < sz; i++) - { - uint32 alpha = max(max(buf[i * 4], buf[i * 4 + 1]), buf[i * 4 + 2]); - alpha *= 2; - buf[i * 4 + 3] = (alpha > 255) ? 255 : alpha; - } - } - - id = pRenderer->DownLoadToVideoMemory((unsigned char*)image.GetData(), image.GetWidth(), image.GetHeight(), eTF_R8G8B8A8, eTF_R8G8B8A8, 0, 0, 0); - m_textures[iconName] = id; - } + id = texture->GetTextureID(); + m_textures[iconName] = id; } return id; diff --git a/Code/Sandbox/Editor/LayoutWnd.cpp b/Code/Sandbox/Editor/LayoutWnd.cpp index 34a96bca53..54389f30c1 100644 --- a/Code/Sandbox/Editor/LayoutWnd.cpp +++ b/Code/Sandbox/Editor/LayoutWnd.cpp @@ -24,7 +24,6 @@ #include #include -#include #include // for AzQtComponents::Style // Editor diff --git a/Code/Sandbox/Editor/MainWindow.cpp b/Code/Sandbox/Editor/MainWindow.cpp index 96f4da7312..eadc137900 100644 --- a/Code/Sandbox/Editor/MainWindow.cpp +++ b/Code/Sandbox/Editor/MainWindow.cpp @@ -42,7 +42,6 @@ AZ_POP_DISABLE_WARNING #include #include #include -#include // AzToolsFramework #include @@ -1095,7 +1094,7 @@ void MainWindow::InitActions() QAction* saveLevelStatsAction = am->AddAction(ID_TOOLS_LOGMEMORYUSAGE, tr("Save Level Statistics")) .SetStatusTip(tr("Logs Editor memory usage.")); - if( saveLevelStatsAction && AZ::Interface::Get()) + if( saveLevelStatsAction ) { saveLevelStatsAction->setEnabled(false); } @@ -1191,13 +1190,6 @@ void MainWindow::InitActions() .SetIcon(Style::icon("Audio")) .SetApplyHoverEffect(); - if (!AZ::Interface::Get()) - { - am->AddAction(ID_TERRAIN_TIMEOFDAYBUTTON, tr("Time of Day Editor")) - .SetToolTip(tr("Open Time of Day")) - .SetApplyHoverEffect(); - } - am->AddAction(ID_OPEN_UICANVASEDITOR, tr(LyViewPane::UiEditor)) .SetToolTip(tr("Open UI Editor")) .SetApplyHoverEffect(); @@ -1654,10 +1646,6 @@ void MainWindow::RegisterStdViewClasses() AzAssetBrowserWindow::RegisterViewClass(); AssetEditorWindow::RegisterViewClass(); - if (!AZ::Interface::Get()) - { - CTimeOfDayDialog::RegisterViewClass(); - } #ifdef ThumbnailDemo ThumbnailsSampleWidget::RegisterViewClass(); #endif diff --git a/Code/Sandbox/Editor/RenderViewport.cpp b/Code/Sandbox/Editor/RenderViewport.cpp index cac1840b75..3e726f2468 100644 --- a/Code/Sandbox/Editor/RenderViewport.cpp +++ b/Code/Sandbox/Editor/RenderViewport.cpp @@ -42,7 +42,6 @@ # include #endif // defined(AZ_PLATFORM_WINDOWS) #include // for AzFramework::InputDeviceMouse -#include // AzQtComponents #include @@ -275,13 +274,10 @@ void CRenderViewport::resizeEvent(QResizeEvent* event) gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_RESIZE, width(), height()); - if (AZ::Interface::Get()) - { - // We queue the window resize event because the render overlay may be hidden. - // If the render overlay is not visible, the native window that is backing it will - // also be hidden, and it will not resize until it becomes visible. - m_windowResizedEvent = true; - } + // We queue the window resize event because the render overlay may be hidden. + // If the render overlay is not visible, the native window that is backing it will + // also be hidden, and it will not resize until it becomes visible. + m_windowResizedEvent = true; } ////////////////////////////////////////////////////////////////////////// @@ -1553,14 +1549,6 @@ void CRenderViewport::OnRender() if (levelIsDisplayable) { m_renderer->SetViewport(0, 0, m_renderer->GetWidth(), m_renderer->GetHeight(), m_nCurViewportID); - - if (!AZ::Interface::Get()) - { - m_engine->Tick(); - m_engine->Update(); - - m_engine->RenderWorld(SHDF_ALLOW_AO | SHDF_ALLOWPOSTPROCESS | SHDF_ALLOW_WATER | SHDF_ALLOWHDR | SHDF_ZPASS, SRenderingPassInfo::CreateGeneralPassRenderingInfo(m_Camera), __FUNCTION__); - } } else { @@ -3659,11 +3647,8 @@ bool CRenderViewport::CreateRenderContext() { m_bRenderContextCreated = true; - if (AZ::Interface::Get()) - { - AzFramework::WindowRequestBus::Handler::BusConnect(renderOverlayHWND()); - AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, renderOverlayHWND()); - } + AzFramework::WindowRequestBus::Handler::BusConnect(renderOverlayHWND()); + AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, renderOverlayHWND()); WIN_HWND oldContext = m_renderer->GetCurrentContextHWND(); m_renderer->CreateContext(renderOverlayHWND()); diff --git a/Code/Sandbox/Editor/ToolbarManager.cpp b/Code/Sandbox/Editor/ToolbarManager.cpp index 01bd7be82b..bbb3ef6790 100644 --- a/Code/Sandbox/Editor/ToolbarManager.cpp +++ b/Code/Sandbox/Editor/ToolbarManager.cpp @@ -16,7 +16,6 @@ // AzCore #include -#include #include // Qt diff --git a/Code/Sandbox/Editor/ViewManager.cpp b/Code/Sandbox/Editor/ViewManager.cpp index 7dd0f3e033..334e78a826 100644 --- a/Code/Sandbox/Editor/ViewManager.cpp +++ b/Code/Sandbox/Editor/ViewManager.cpp @@ -34,7 +34,6 @@ #include "EditorViewportWidget.h" #include "CryEditDoc.h" -#include #include AZ_CVAR(bool, ed_useAtomNativeViewport, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Atom-native Editor viewport (experimental, not yet stable"); @@ -42,7 +41,7 @@ AZ_CVAR(bool, ed_useAtomNativeViewport, true, nullptr, AZ::ConsoleFunctorFlags:: bool CViewManager::IsMultiViewportEnabled() { // Enable multi-viewport for legacy renderer, or if we're using the new fully Atom-native viewport - return !AZ::Interface::Get() || ed_useAtomNativeViewport; + return ed_useAtomNativeViewport; } ////////////////////////////////////////////////////////////////////// @@ -81,7 +80,7 @@ CViewManager::CViewManager() RegisterQtViewPane(GetIEditor(), "Left", LyViewPane::CategoryViewport, viewportOptions); viewportOptions.viewportType = ET_ViewportCamera; - if (ed_useAtomNativeViewport && AZ::Interface::Get()) + if (ed_useAtomNativeViewport) { RegisterQtViewPaneWithName(GetIEditor(), "Perspective", LyViewPane::CategoryViewport, viewportOptions); } diff --git a/Code/Sandbox/Editor/ViewPane.cpp b/Code/Sandbox/Editor/ViewPane.cpp index 43e4330113..480e39bedf 100644 --- a/Code/Sandbox/Editor/ViewPane.cpp +++ b/Code/Sandbox/Editor/ViewPane.cpp @@ -33,7 +33,6 @@ // AzFramework #include -#include #include // Editor diff --git a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp index ecfb155d79..b0dce80ec8 100644 --- a/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp +++ b/Code/Sandbox/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -163,7 +162,7 @@ void SandboxIntegrationManager::Setup() AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusConnect(); // turn on the this debug display request bus implementation if no other implementation is active - if( !(AZ::Interface::Get() && AzFramework::DebugDisplayRequestBus::HasHandlers())) + if( !(AzFramework::DebugDisplayRequestBus::HasHandlers())) { m_debugDisplayBusImplementationActive = true; AzFramework::DebugDisplayRequestBus::Handler::BusConnect( diff --git a/Code/Sandbox/Plugins/EditorCommon/QViewport.cpp b/Code/Sandbox/Plugins/EditorCommon/QViewport.cpp index 5ca6cf5ac6..362452a67e 100644 --- a/Code/Sandbox/Plugins/EditorCommon/QViewport.cpp +++ b/Code/Sandbox/Plugins/EditorCommon/QViewport.cpp @@ -37,8 +37,6 @@ #include #include -#include - #include // Class to implement the WindowRequestBus::Handler instead of the QViewport class. @@ -365,7 +363,7 @@ bool QViewport::CreateRenderContext() HWND windowHandle = reinterpret_cast(QWidget::winId()); - if( AZ::Interface::Get() && m_renderContextCreated && windowHandle == m_lastHwnd) + if( m_renderContextCreated && windowHandle == m_lastHwnd) { // the hwnd has not changed, no need to destroy and recreate context (and swap chain etc) return false; @@ -377,13 +375,10 @@ bool QViewport::CreateRenderContext() { m_renderContextCreated = true; - if (AZ::Interface::Get()) - { - m_viewportRequests.get()->BusConnect(windowHandle); - AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, windowHandle); + m_viewportRequests.get()->BusConnect(windowHandle); + AzFramework::WindowSystemNotificationBus::Broadcast(&AzFramework::WindowSystemNotificationBus::Handler::OnWindowCreated, windowHandle); - m_lastHwnd = windowHandle; - } + m_lastHwnd = windowHandle; StorePreviousContext(); GetIEditor()->GetEnv()->pRenderer->CreateContext(windowHandle); diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.cpp index f04e156afd..90731488f4 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.cpp @@ -62,12 +62,10 @@ namespace AZ AtomBridgeSystemComponent::AtomBridgeSystemComponent() { - AZ::Interface::Register(this); } AtomBridgeSystemComponent::~AtomBridgeSystemComponent() { - AZ::Interface::Unregister(this); } void AtomBridgeSystemComponent::GetProvidedServices(ComponentDescriptor::DependencyArrayType& provided) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.h b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.h index 2ffd966216..da75d3c35c 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.h +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomBridgeSystemComponent.h @@ -17,7 +17,6 @@ #include -#include #include #include @@ -37,7 +36,6 @@ namespace AZ class AtomBridgeSystemComponent : public Component - , public AzFramework::AtomActiveInterface , public AzFramework::Render::RenderSystemRequestBus::Handler , public AzFramework::Components::DeprecatedComponentsRequestBus::Handler , public Render::Bootstrap::NotificationBus::Handler diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/BuilderComponent.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/BuilderComponent.cpp index b6ff2cb66d..997b7c3b0c 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/BuilderComponent.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/BuilderComponent.cpp @@ -36,12 +36,10 @@ namespace AZ BuilderComponent::BuilderComponent() { - AZ::Interface::Register(this); } BuilderComponent::~BuilderComponent() { - AZ::Interface::Unregister(this); } void BuilderComponent::Activate() diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/BuilderComponent.h b/Gems/AtomLyIntegration/AtomBridge/Code/Source/BuilderComponent.h index 4e75fd2a88..d6c462cc43 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/BuilderComponent.h +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/BuilderComponent.h @@ -13,7 +13,6 @@ #pragma once #include -#include namespace AZ { @@ -21,7 +20,6 @@ namespace AZ { class BuilderComponent final : public AZ::Component - , public AzFramework::AtomActiveInterface { public: AZ_COMPONENT(BuilderComponent, "{D1FE015B-8431-4155-8FD0-8197F246901A}"); diff --git a/Gems/EMotionFX/Code/EMotionFX/Pipeline/RCExt/Actor/ActorBuilder.cpp b/Gems/EMotionFX/Code/EMotionFX/Pipeline/RCExt/Actor/ActorBuilder.cpp index d57105a589..1327045806 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Pipeline/RCExt/Actor/ActorBuilder.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Pipeline/RCExt/Actor/ActorBuilder.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include diff --git a/Gems/EMotionFX/Code/Source/Integration/Components/ActorComponent.h b/Gems/EMotionFX/Code/Source/Integration/Components/ActorComponent.h index 1a185edccc..416705bff4 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Components/ActorComponent.h +++ b/Gems/EMotionFX/Code/Source/Integration/Components/ActorComponent.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include @@ -130,11 +129,7 @@ namespace EMotionFX provided.push_back(AZ_CRC("EMotionFXActorService", 0xd6e8f48d)); provided.push_back(AZ_CRC("MeshService", 0x71d8a455)); provided.push_back(AZ_CRC("CharacterPhysicsDataService", 0x34757927)); - - if (AZ::Interface::Get()) - { - provided.push_back(AZ_CRC("MaterialReceiverService", 0x0d1a6a74)); - } + provided.push_back(AZ_CRC("MaterialReceiverService", 0x0d1a6a74)); } static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) diff --git a/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp b/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp index bcb1e3f300..42deabda49 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp +++ b/Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp @@ -822,7 +822,7 @@ namespace EMotionFX bool EditorActorComponent::IsAtomDisabled() const { - return !AZ::Interface::Get(); + return false; } void EditorActorComponent::OnActorReady(Actor* actor) diff --git a/Gems/GradientSignal/Code/Source/Editor/EditorImageBuilderComponent.cpp b/Gems/GradientSignal/Code/Source/Editor/EditorImageBuilderComponent.cpp index bd1fbfb464..d7fcd3e56e 100644 --- a/Gems/GradientSignal/Code/Source/Editor/EditorImageBuilderComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Editor/EditorImageBuilderComponent.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -334,14 +333,7 @@ namespace GradientSignal AZStd::unique_ptr EditorImageBuilderWorker::LoadImageFromPath(const AZStd::string& fullPath) { - if (AZ::Interface::Get()) - { - return AtomLoadImageFromPath(fullPath); - } - else - { - return LegacyLoadImageFromPath(fullPath); - } + return AtomLoadImageFromPath(fullPath); } AZStd::unique_ptr EditorImageBuilderWorker::LoadImageSettingsFromPath(const AZStd::string& fullPath) diff --git a/Gems/ImGui/Code/Editor/ImGuiEditorWindowSystemComponent.cpp b/Gems/ImGui/Code/Editor/ImGuiEditorWindowSystemComponent.cpp index 6c370e091c..07ab3b0a42 100644 --- a/Gems/ImGui/Code/Editor/ImGuiEditorWindowSystemComponent.cpp +++ b/Gems/ImGui/Code/Editor/ImGuiEditorWindowSystemComponent.cpp @@ -18,7 +18,6 @@ #include "ImGuiEditorWindowSystemComponent.h" #include "ImGuiMainWindow.h" #include -#include static const char* s_ImGuiQtViewPaneName = "ImGui Editor"; @@ -60,19 +59,5 @@ namespace ImGui void ImGuiEditorWindowSystemComponent::NotifyRegisterViews() { - if (!AZ::Interface::Get()) - { - // The Tools->ImGui menu currently crashes trying to enable a render pipeline when this is invoked - // Disable this menu item for now - // [GFX TODO][ATOM-4607] - QtViewOptions options; - options.canHaveMultipleInstances = false; - AzToolsFramework::EditorRequests::Bus::Broadcast( - &AzToolsFramework::EditorRequests::RegisterViewPane, - s_ImGuiQtViewPaneName, - "Tools", - options, - [](QWidget* parent = nullptr) { return new ImGui::ImGuiMainWindow(parent); }); - } } } diff --git a/Gems/ImGui/Code/Source/ImGuiManager.cpp b/Gems/ImGui/Code/Source/ImGuiManager.cpp index e10a59bde1..c9b32ac692 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.cpp +++ b/Gems/ImGui/Code/Source/ImGuiManager.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -380,14 +379,8 @@ void ImGuiManager::Render() TransformationMatrices backupSceneMatrices; - AZ::u32 backBufferWidth = 0; - AZ::u32 backBufferHeight = 0; - - if (AZ::Interface::Get()) - { - backBufferWidth = m_windowSize.m_width; - backBufferHeight = m_windowSize.m_height; - } + AZ::u32 backBufferWidth = m_windowSize.m_width; + AZ::u32 backBufferHeight = m_windowSize.m_height; // Find ImGui Render Resolution. int renderRes[2]; @@ -759,10 +752,7 @@ void ImGuiManager::RenderImGuiBuffers(const ImVec2& scaleRects) //@rky: Only render the main ImGui if it is visible if (m_clientMenuBarState != DisplayState::Hidden) { - if (AZ::Interface::Get()) - { - OtherActiveImGuiRequestBus::Broadcast(&OtherActiveImGuiRequestBus::Events::RenderImGuiBuffers, *drawData); - } + OtherActiveImGuiRequestBus::Broadcast(&OtherActiveImGuiRequestBus::Events::RenderImGuiBuffers, *drawData); } } diff --git a/Gems/WhiteBox/Code/Source/WhiteBoxSystemComponent.cpp b/Gems/WhiteBox/Code/Source/WhiteBoxSystemComponent.cpp index 6f24d409c9..8dc37c94fe 100644 --- a/Gems/WhiteBox/Code/Source/WhiteBoxSystemComponent.cpp +++ b/Gems/WhiteBox/Code/Source/WhiteBoxSystemComponent.cpp @@ -19,7 +19,6 @@ #include #include -#include namespace WhiteBox { @@ -63,12 +62,7 @@ namespace WhiteBox SetRenderMeshInterfaceBuilder( []() -> AZStd::unique_ptr { - if (AZ::Interface::Get()) - { - return AZStd::make_unique(); - } - - return AZStd::make_unique(); + return AZStd::make_unique(); }); WhiteBoxRequestBus::Handler::BusConnect();