Merge pull request #441 from aws-lumberyard-dev/cgalvan/OldVIMLogicRemovalSecondPass
[LYN-3419] Removed remaining references to checking if the new viewport interaction model is enabled.
This commit is contained in:
@@ -110,7 +110,6 @@ void CComponentEntityObject::AssignEntity(AZ::Entity* entity, bool destroyOld)
|
||||
|
||||
if (m_entityId.IsValid())
|
||||
{
|
||||
AzToolsFramework::EntitySelectionEvents::Bus::Handler::BusDisconnect();
|
||||
AZ::TransformNotificationBus::Handler::BusDisconnect();
|
||||
LmbrCentral::RenderBoundsNotificationBus::Handler::BusDisconnect();
|
||||
LmbrCentral::MeshComponentNotificationBus::Handler::BusDisconnect();
|
||||
@@ -157,7 +156,6 @@ void CComponentEntityObject::AssignEntity(AZ::Entity* entity, bool destroyOld)
|
||||
|
||||
EBUS_EVENT(AzToolsFramework::EditorEntityContextRequestBus, AddRequiredComponents, *entity);
|
||||
|
||||
AzToolsFramework::EntitySelectionEvents::Bus::Handler::BusConnect(m_entityId);
|
||||
AZ::TransformNotificationBus::Handler::BusConnect(m_entityId);
|
||||
LmbrCentral::RenderBoundsNotificationBus::Handler::BusConnect(m_entityId);
|
||||
LmbrCentral::MeshComponentNotificationBus::Handler::BusConnect(m_entityId);
|
||||
@@ -306,39 +304,6 @@ void CComponentEntityObject::OnEntityNameChanged(const AZStd::string& name)
|
||||
}
|
||||
}
|
||||
|
||||
void CComponentEntityObject::OnSelected()
|
||||
{
|
||||
if (GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_selectionReentryGuard)
|
||||
{
|
||||
EditorActionScope selectionChange(m_selectionReentryGuard);
|
||||
|
||||
// Invoked when selected via tools application, so we notify sandbox.
|
||||
const bool wasSelected = IsSelected();
|
||||
GetIEditor()->GetObjectManager()->SelectObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
void CComponentEntityObject::OnDeselected()
|
||||
{
|
||||
if (GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_selectionReentryGuard)
|
||||
{
|
||||
EditorActionScope selectionChange(m_selectionReentryGuard);
|
||||
|
||||
// Invoked when selected via tools application, so we notify sandbox.
|
||||
GetIEditor()->GetObjectManager()->UnselectObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
void CComponentEntityObject::AttachChild(CBaseObject* child, bool /*bKeepPos*/)
|
||||
{
|
||||
if (child->GetType() == OBJTYPE_AZENTITY)
|
||||
@@ -997,24 +962,12 @@ bool CComponentEntityObject::IsIsolated() const
|
||||
|
||||
bool CComponentEntityObject::IsSelected() const
|
||||
{
|
||||
if (GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
{
|
||||
return AzToolsFramework::IsSelected(m_entityId);
|
||||
}
|
||||
|
||||
// legacy is selected call
|
||||
return CBaseObject::IsSelected();
|
||||
return AzToolsFramework::IsSelected(m_entityId);
|
||||
}
|
||||
|
||||
bool CComponentEntityObject::IsSelectable() const
|
||||
{
|
||||
if (GetIEditor()->IsNewViewportInteractionModelEnabled())
|
||||
{
|
||||
return AzToolsFramework::IsSelectableInViewport(m_entityId);
|
||||
}
|
||||
|
||||
// legacy is selectable call
|
||||
return CBaseObject::IsSelectable();
|
||||
return AzToolsFramework::IsSelectableInViewport(m_entityId);
|
||||
}
|
||||
|
||||
void CComponentEntityObject::SetWorldPos(const Vec3& pos, int flags)
|
||||
|
||||
@@ -38,7 +38,6 @@ class QMenu;
|
||||
*/
|
||||
class CComponentEntityObject
|
||||
: public CEntityObject
|
||||
, private AzToolsFramework::EntitySelectionEvents::Bus::Handler
|
||||
, private AzToolsFramework::EditorLockComponentNotificationBus::Handler
|
||||
, private AzToolsFramework::EditorVisibilityNotificationBus::Handler
|
||||
, private AzToolsFramework::EditorEntityIconComponentNotificationBus::Handler
|
||||
@@ -111,12 +110,6 @@ public:
|
||||
void OnEntityNameChanged(const AZStd::string& name) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! AzToolsFramework::EntitySelectionEvents::Bus::Handler
|
||||
void OnSelected() override;
|
||||
void OnDeselected() override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// AzToolsFramework::EditorLockComponentNotificationBus::Handler
|
||||
void OnEntityLockChanged(bool locked) override;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user