[LYN-3419] Removed remaining references to checking if the new viewport interaction model is enabled.

This commit is contained in:
Chris Galvan
2021-04-29 16:45:39 -05:00
parent 54e06b0f63
commit 217ba1e816
18 changed files with 142 additions and 965 deletions
@@ -159,18 +159,6 @@ void SandboxIntegrationManager::Setup()
AzToolsFramework::ToolsApplicationEvents::Bus::Handler::BusConnect();
AzToolsFramework::EditorRequests::Bus::Handler::BusConnect();
AzToolsFramework::EditorWindowRequests::Bus::Handler::BusConnect();
// if the new viewport interaction model is enabled, then object picking is handled via
// EditorPickEntitySelection and SandboxIntegrationManager is not required
if (!IsNewViewportInteractionModelEnabled())
{
AzFramework::EntityContextId pickModeEntityContextId = GetEntityContextId();
if (!pickModeEntityContextId.IsNull())
{
AzToolsFramework::EditorPickModeNotificationBus::Handler::BusConnect(pickModeEntityContextId);
}
}
AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect();
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusConnect();
@@ -398,12 +386,6 @@ void SandboxIntegrationManager::Teardown()
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusDisconnect();
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect();
AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
if (!IsNewViewportInteractionModelEnabled())
{
AzToolsFramework::EditorPickModeNotificationBus::Handler::BusDisconnect();
}
AzToolsFramework::EditorWindowRequests::Bus::Handler::BusDisconnect();
AzToolsFramework::EditorRequests::Bus::Handler::BusDisconnect();
AzToolsFramework::ToolsApplicationEvents::Bus::Handler::BusDisconnect();
@@ -1243,21 +1225,14 @@ void SandboxIntegrationManager::CloneSelection(bool& handled)
}
}
void SandboxIntegrationManager::DeleteSelectedEntities(const bool includeDescendants)
void SandboxIntegrationManager::DeleteSelectedEntities([[maybe_unused]] const bool includeDescendants)
{
if (IsNewViewportInteractionModelEnabled())
{
AzToolsFramework::EntityIdList selectedEntityIds;
AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(
selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
AzToolsFramework::EntityIdList selectedEntityIds;
AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(
selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
AzToolsFramework::ToolsApplicationRequestBus::Broadcast(
&AzToolsFramework::ToolsApplicationRequests::DeleteEntitiesAndAllDescendants, selectedEntityIds);
}
else
{
CCryEditApp::instance()->DeleteSelectedEntities(includeDescendants);
}
AzToolsFramework::ToolsApplicationRequestBus::Broadcast(
&AzToolsFramework::ToolsApplicationRequests::DeleteEntitiesAndAllDescendants, selectedEntityIds);
}
AZ::EntityId SandboxIntegrationManager::CreateNewEntity(AZ::EntityId parentId)