Merge pull request #526 from aws-lumberyard-dev/Atom/olexl/ATOM-15349

Deleted AzFramework::AtomActiveInterface
This commit is contained in:
Olex Lozitskiy
2021-05-04 13:44:04 -04:00
committed by GitHub
30 changed files with 25 additions and 424 deletions
-26
View File
@@ -31,7 +31,6 @@
#include <AzCore/Interface/Interface.h>
#include <AzFramework/Logging/MissingAssetLogger.h>
#include <AzFramework/Entity/EntityDebugDisplayBus.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzCore/Interface/Interface.h>
@@ -1162,31 +1161,6 @@ void CSystem::SleepIfInactive()
{
return;
}
#if defined(WIN32)
if (!AZ::Interface<AzFramework::AtomActiveInterface>::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
}
//////////////////////////////////////////////////////////////////////////
-16
View File
@@ -68,7 +68,6 @@
#include <LyShine/Bus/UiSystemBus.h>
#include <AzFramework/Logging/MissingAssetLogger.h>
#include <AzFramework/Platform/PlatformDefaults.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzCore/Interface/Interface.h>
#include <AzCore/Utils/Utils.h>
@@ -2462,21 +2461,6 @@ AZ_POP_DISABLE_WARNING
m_env.pRenderer->SetViewport(0, 0, screenWidth, screenHeight);
// Skip splash screen rendering
if (!AZ::Interface<AzFramework::AtomActiveInterface>::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);
@@ -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 <AzCore/RTTI/RTTI.h>
namespace AzFramework
{
class AtomActiveInterface
{
public:
AZ_RTTI(AtomActiveInterface, "{4BB59C86-0848-485D-AB28-700540470B2B}");
AtomActiveInterface() = default;
virtual ~AtomActiveInterface() = default;
};
} // namespace AzFramework
@@ -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
@@ -16,7 +16,6 @@
#include <AzCore/std/string/string.h>
#include <AzCore/std/containers/fixed_vector.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzCore/Interface/Interface.h>
namespace AzQtComponents
@@ -23,7 +23,6 @@
#include "Objects/SelectionGroup.h"
#include "ViewManager.h"
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzCore/Interface/Interface.h>
// Qt
+5 -43
View File
@@ -27,12 +27,6 @@
// AzFramework
#include <AzFramework/Archive/IArchive.h>
#include <AzFramework/API/ApplicationAPI.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzFramework/Viewport/CameraInput.h>
// Atom
#include <Atom/RPI.Public/ViewportContext.h>
#include <Atom/RPI.Public/ViewportContextBus.h>
// AzToolsFramework
#include <AzToolsFramework/Slice/SliceUtilities.h>
@@ -68,6 +62,9 @@
#include "StatObjBus.h"
// LmbrCentral
#include <ModernViewportCameraController.h>
#include <Atom/RPI.Public/ViewportContext.h>
#include <Atom/RPI.Public/ViewportContextBus.h>
#include <LmbrCentral/Rendering/EditorLightComponentBus.h> // for LmbrCentral::EditorLightComponentRequestBus
@@ -2410,44 +2407,9 @@ void CCryEditDoc::InitEmptyLevel(int /*resolution*/, int /*unitSize*/, bool /*bU
GetIEditor()->SetStatusText("Ready");
}
void CCryEditDoc::CreateDefaultLevelAssets(int resolution, int unitSize)
void CCryEditDoc::CreateDefaultLevelAssets([[maybe_unused]] int resolution, [[maybe_unused]] int unitSize)
{
if (AZ::Interface<AzFramework::AtomActiveInterface>::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<AZ::SliceAsset>(), false);
if (m_envProbeSliceAssetId.IsValid())
{
AZ::Data::Asset<AZ::Data::AssetData> asset = AZ::Data::AssetManager::Instance().FindOrCreateAsset<AZ::SliceAsset>(
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)
@@ -40,7 +40,6 @@
# include <AzFramework/Input/Buses/Notifications/RawInputNotificationBus_Platform.h>
#endif // defined(AZ_PLATFORM_WINDOWS)
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h> // for AzFramework::InputDeviceMouse
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzFramework/Viewport/ViewportControllerList.h>
// AzQtComponents
-66
View File
@@ -15,7 +15,6 @@
#include "IconManager.h"
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzCore/Interface/Interface.h>
// AzToolsFramework
@@ -115,71 +114,6 @@ int CIconManager::GetIconTexture(const char* iconName)
return 0;
}
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
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;
}
}
return id;
}
-1
View File
@@ -24,7 +24,6 @@
#include <QTextDocumentFragment>
#include <AzCore/Interface/Interface.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzQtComponents/Components/Style.h> // for AzQtComponents::Style
// Editor
+1 -13
View File
@@ -42,7 +42,6 @@ AZ_POP_DISABLE_WARNING
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h>
#include <AzFramework/Network/SocketConnection.h>
#include <AzFramework/Asset/AssetSystemComponent.h>
#include <AzFramework/API/AtomActiveInterface.h>
// AzToolsFramework
#include <AzToolsFramework/Application/Ticker.h>
@@ -1093,7 +1092,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<AzFramework::AtomActiveInterface>::Get())
if( saveLevelStatsAction )
{
saveLevelStatsAction->setEnabled(false);
}
@@ -1189,13 +1188,6 @@ void MainWindow::InitActions()
.SetIcon(Style::icon("Audio"))
.SetApplyHoverEffect();
if (!AZ::Interface<AzFramework::AtomActiveInterface>::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();
@@ -1652,10 +1644,6 @@ void MainWindow::RegisterStdViewClasses()
AzAssetBrowserWindow::RegisterViewClass();
AssetEditorWindow::RegisterViewClass();
if (!AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
CTimeOfDayDialog::RegisterViewClass();
}
#ifdef ThumbnailDemo
ThumbnailsSampleWidget::RegisterViewClass();
#endif
+6 -21
View File
@@ -42,7 +42,6 @@
# include <AzFramework/Input/Buses/Notifications/RawInputNotificationBus_Platform.h>
#endif // defined(AZ_PLATFORM_WINDOWS)
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h> // for AzFramework::InputDeviceMouse
#include <AzFramework/API/AtomActiveInterface.h>
// AzQtComponents
#include <AzQtComponents/Utilities/QtWindowUtilities.h>
@@ -275,13 +274,10 @@ void CRenderViewport::resizeEvent(QResizeEvent* event)
gEnv->pSystem->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_RESIZE, width(), height());
if (AZ::Interface<AzFramework::AtomActiveInterface>::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<AzFramework::AtomActiveInterface>::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<AzFramework::AtomActiveInterface>::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());
-1
View File
@@ -16,7 +16,6 @@
// AzCore
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzCore/Interface/Interface.h>
// Qt
+2 -3
View File
@@ -34,7 +34,6 @@
#include "EditorViewportWidget.h"
#include "CryEditDoc.h"
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzCore/Console/IConsole.h>
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<AzFramework::AtomActiveInterface>::Get() || ed_useAtomNativeViewport;
return ed_useAtomNativeViewport;
}
//////////////////////////////////////////////////////////////////////
@@ -81,7 +80,7 @@ CViewManager::CViewManager()
RegisterQtViewPane<C2DViewport_YZ>(GetIEditor(), "Left", LyViewPane::CategoryViewport, viewportOptions);
viewportOptions.viewportType = ET_ViewportCamera;
if (ed_useAtomNativeViewport && AZ::Interface<AzFramework::AtomActiveInterface>::Get())
if (ed_useAtomNativeViewport)
{
RegisterQtViewPaneWithName<EditorViewportWidget>(GetIEditor(), "Perspective", LyViewPane::CategoryViewport, viewportOptions);
}
-1
View File
@@ -33,7 +33,6 @@
// AzFramework
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzCore/Interface/Interface.h>
// Editor
@@ -30,7 +30,6 @@
#include <AzFramework/Entity/EntityContextBus.h>
#include <AzFramework/Physics/Material.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
#include <AzToolsFramework/API/EntityCompositionRequestBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
@@ -162,13 +161,6 @@ void SandboxIntegrationManager::Setup()
AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
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<AzFramework::AtomActiveInterface>::Get() && AzFramework::DebugDisplayRequestBus::HasHandlers()))
{
m_debugDisplayBusImplementationActive = true;
AzFramework::DebugDisplayRequestBus::Handler::BusConnect(
AzToolsFramework::ViewportInteraction::g_mainViewportEntityDebugDisplayId);
}
AzFramework::DisplayContextRequestBus::Handler::BusConnect();
SetupFileExtensionMap();
@@ -37,8 +37,6 @@
#include <AzCore/Jobs/JobManager.h>
#include <AzCore/Interface/Interface.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzQtComponents/Utilities/QtWindowUtilities.h>
// Class to implement the WindowRequestBus::Handler instead of the QViewport class.
@@ -365,7 +363,7 @@ bool QViewport::CreateRenderContext()
HWND windowHandle = reinterpret_cast<HWND>(QWidget::winId());
if( AZ::Interface<AzFramework::AtomActiveInterface>::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<AzFramework::AtomActiveInterface>::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);
@@ -13,7 +13,6 @@
#include <AzCore/Memory/SystemAllocator.h>
#include <AzCore/Module/Module.h>
#include <AtomBridgeModule.h>
#include <BuilderComponent.h>
#include "./Editor/AssetCollectionAsyncLoaderTestComponent.h"
@@ -33,7 +32,6 @@ namespace AZ
{
// Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
m_descriptors.insert(m_descriptors.end(), {
BuilderComponent::CreateDescriptor(),
AssetCollectionAsyncLoaderTestComponent::CreateDescriptor(),
});
}
@@ -62,12 +62,10 @@ namespace AZ
AtomBridgeSystemComponent::AtomBridgeSystemComponent()
{
AZ::Interface<AzFramework::AtomActiveInterface>::Register(this);
}
AtomBridgeSystemComponent::~AtomBridgeSystemComponent()
{
AZ::Interface<AzFramework::AtomActiveInterface>::Unregister(this);
}
void AtomBridgeSystemComponent::GetProvidedServices(ComponentDescriptor::DependencyArrayType& provided)
@@ -17,7 +17,6 @@
#include <AzCore/Component/Component.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzFramework/Render/RenderSystemBus.h>
#include <AzFramework/Components/DeprecatedComponentsBus.h>
@@ -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
@@ -1,55 +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.
*
*/
#include <AzCore/Component/Entity.h>
#include <AzCore/Serialization/EditContext.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Interface/Interface.h>
#include <BuilderComponent.h>
#include <AssetBuilderSDK/AssetBuilderSDK.h>
namespace AZ
{
namespace AtomBridge
{
void BuilderComponent::Reflect(AZ::ReflectContext* context)
{
if (auto* serialize = azrtti_cast<AZ::SerializeContext*>(context))
{
serialize->Class<BuilderComponent, AZ::Component>()
->Version(0)
->Attribute(AZ::Edit::Attributes::SystemComponentTags, AZStd::vector<AZ::Crc32>({ AssetBuilderSDK::ComponentTags::AssetBuilder }))
;
}
}
BuilderComponent::BuilderComponent()
{
AZ::Interface<AzFramework::AtomActiveInterface>::Register(this);
}
BuilderComponent::~BuilderComponent()
{
AZ::Interface<AzFramework::AtomActiveInterface>::Unregister(this);
}
void BuilderComponent::Activate()
{
}
void BuilderComponent::Deactivate()
{
}
} // namespace RPI
} // namespace AZ
@@ -1,38 +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 <AzCore/Component/Component.h>
#include <AzFramework/API/AtomActiveInterface.h>
namespace AZ
{
namespace AtomBridge
{
class BuilderComponent final
: public AZ::Component
, public AzFramework::AtomActiveInterface
{
public:
AZ_COMPONENT(BuilderComponent, "{D1FE015B-8431-4155-8FD0-8197F246901A}");
static void Reflect(AZ::ReflectContext* context);
BuilderComponent();
~BuilderComponent() override;
// AZ::Component overrides...
void Activate() override;
void Deactivate() override;
};
} // namespace RPI
} // namespace AZ
@@ -13,8 +13,6 @@ set(FILES
Source/AtomBridgeEditorModule.cpp
Source/AtomBridgeModule.cpp
Source/AtomBridgeModule.h
Source/BuilderComponent.cpp
Source/BuilderComponent.h
Source/Editor/AssetCollectionAsyncLoaderTestComponent.cpp
Source/Editor/AssetCollectionAsyncLoaderTestComponent.h
)
@@ -43,7 +43,6 @@
#include <AzCore/std/smart_ptr/make_shared.h>
#include <AzCore/Interface/Interface.h>
#include <AzFramework/Application/Application.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <AzToolsFramework/Debug/TraceContext.h>
@@ -22,7 +22,6 @@
#include <AzFramework/Physics/RagdollPhysicsBus.h>
#include <AzFramework/Physics/CharacterPhysicsDataBus.h>
#include <AzFramework/Physics/Common/PhysicsEvents.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <Integration/Assets/ActorAsset.h>
#include <Integration/ActorComponentBus.h>
@@ -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<AzFramework::AtomActiveInterface>::Get())
{
provided.push_back(AZ_CRC("MaterialReceiverService", 0x0d1a6a74));
}
provided.push_back(AZ_CRC("MaterialReceiverService", 0x0d1a6a74));
}
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
@@ -815,7 +815,7 @@ namespace EMotionFX
bool EditorActorComponent::IsAtomDisabled() const
{
return !AZ::Interface<AzFramework::AtomActiveInterface>::Get();
return false;
}
void EditorActorComponent::OnActorReady(Actor* actor)
@@ -24,7 +24,6 @@
#include <AzCore/Interface/Interface.h>
#include <AzFramework/StringFunc/StringFunc.h>
#include <AzFramework/IO/LocalFileIO.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <QImageReader>
#include <QDirIterator>
#include <GradientSignalSystemComponent.h>
@@ -258,39 +257,6 @@ namespace GradientSignal
return AZ::Uuid::CreateString("{7520DF20-16CA-4CF6-A6DB-D96759A09EE4}");
}
static AZStd::unique_ptr<ImageAsset> LegacyLoadImageFromPath(const AZStd::string& fullPath)
{
ImageProcessing::IImageObjectPtr imageObject;
ImageProcessing::ImageProcessingRequestBus::BroadcastResult(imageObject, &ImageProcessing::ImageProcessingRequests::LoadImage,
fullPath);
if (!imageObject)
{
return {};
}
//create a new image asset
auto imageAsset = AZStd::make_unique<ImageAsset>();
if (!imageAsset)
{
return {};
}
imageAsset->m_imageWidth = imageObject->GetWidth(0);
imageAsset->m_imageHeight = imageObject->GetHeight(0);
imageAsset->m_imageFormat = imageObject->GetPixelFormat();
AZ::u8* mem = nullptr;
AZ::u32 pitch = 0;
AZ::u32 mipBufferSize = imageObject->GetMipBufSize(0);
imageObject->GetImagePointer(0, mem, pitch);
imageAsset->m_imageData = { mem, mem + mipBufferSize };
return imageAsset;
}
static ImageProcessing::EPixelFormat AtomPixelFormatToLegacyPixelFormat(ImageProcessingAtom::EPixelFormat atomPixFormat)
{
// This could be dangerous to do if these enums have differences in the middle.
@@ -334,14 +300,7 @@ namespace GradientSignal
AZStd::unique_ptr<ImageAsset> EditorImageBuilderWorker::LoadImageFromPath(const AZStd::string& fullPath)
{
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
return AtomLoadImageFromPath(fullPath);
}
else
{
return LegacyLoadImageFromPath(fullPath);
}
return AtomLoadImageFromPath(fullPath);
}
AZStd::unique_ptr<ImageSettings> EditorImageBuilderWorker::LoadImageSettingsFromPath(const AZStd::string& fullPath)
@@ -18,7 +18,6 @@
#include "ImGuiEditorWindowSystemComponent.h"
#include "ImGuiMainWindow.h"
#include <AzToolsFramework/API/ViewPaneOptions.h>
#include <AzFramework/API/AtomActiveInterface.h>
static const char* s_ImGuiQtViewPaneName = "ImGui Editor";
@@ -60,19 +59,5 @@ namespace ImGui
void ImGuiEditorWindowSystemComponent::NotifyRegisterViews()
{
if (!AZ::Interface<AzFramework::AtomActiveInterface>::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); });
}
}
}
+3 -13
View File
@@ -26,7 +26,6 @@
#include <AzFramework/Input/Devices/Gamepad/InputDeviceGamepad.h>
#include <AzFramework/Input/Devices/Touch/InputDeviceTouch.h>
#include <AzFramework/Input/Devices/VirtualKeyboard/InputDeviceVirtualKeyboard.h>
#include <AzFramework/API/AtomActiveInterface.h>
#include <imgui/imgui_internal.h>
#include <sstream>
#include <string>
@@ -380,14 +379,8 @@ void ImGuiManager::Render()
TransformationMatrices backupSceneMatrices;
AZ::u32 backBufferWidth = 0;
AZ::u32 backBufferHeight = 0;
if (AZ::Interface<AzFramework::AtomActiveInterface>::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<AzFramework::AtomActiveInterface>::Get())
{
OtherActiveImGuiRequestBus::Broadcast(&OtherActiveImGuiRequestBus::Events::RenderImGuiBuffers, *drawData);
}
OtherActiveImGuiRequestBus::Broadcast(&OtherActiveImGuiRequestBus::Events::RenderImGuiBuffers, *drawData);
}
}
@@ -19,7 +19,6 @@
#include <AzCore/Serialization/EditContext.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzFramework/API/AtomActiveInterface.h>
namespace WhiteBox
{
@@ -63,12 +62,7 @@ namespace WhiteBox
SetRenderMeshInterfaceBuilder(
[]() -> AZStd::unique_ptr<RenderMeshInterface>
{
if (AZ::Interface<AzFramework::AtomActiveInterface>::Get())
{
return AZStd::make_unique<AtomRenderMesh>();
}
return AZStd::make_unique<LegacyRenderMesh>();
return AZStd::make_unique<AtomRenderMesh>();
});
WhiteBoxRequestBus::Handler::BusConnect();