Merge pull request #526 from aws-lumberyard-dev/Atom/olexl/ATOM-15349
Deleted AzFramework::AtomActiveInterface
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user