Remove legacy sandbox picking - no longer used (#4472)
Signed-off-by: hultonha <hultonha@amazon.co.uk>
This commit is contained in:
@@ -142,8 +142,7 @@ void GetSelectedEntitiesSetWithFlattenedHierarchy(AzToolsFramework::EntityIdSet&
|
||||
}
|
||||
|
||||
SandboxIntegrationManager::SandboxIntegrationManager()
|
||||
: m_inObjectPickMode(false)
|
||||
, m_startedUndoRecordingNestingLevel(0)
|
||||
: m_startedUndoRecordingNestingLevel(0)
|
||||
, m_dc(nullptr)
|
||||
, m_notificationWindowManager(new AzToolsFramework::SliceOverridesNotificationWindowManager())
|
||||
{
|
||||
@@ -1000,62 +999,6 @@ void SandboxIntegrationManager::SetupSliceContextMenu_Modify(QMenu* menu, const
|
||||
revertAction->setEnabled(canRevert);
|
||||
}
|
||||
|
||||
void SandboxIntegrationManager::HandleObjectModeSelection(const AZ::Vector2& point, [[maybe_unused]] int flags, bool& handled)
|
||||
{
|
||||
// Todo - Use a custom "edit tool". This will eliminate the need for this bus message entirely, which technically
|
||||
// makes this feature less intrusive on Sandbox.
|
||||
// UPDATE: This is now provided by EditorPickEntitySelection when the new Viewport Interaction Model changes are enabled.
|
||||
if (m_inObjectPickMode)
|
||||
{
|
||||
CViewport* view = GetIEditor()->GetViewManager()->GetGameViewport();
|
||||
const QPoint viewPoint(static_cast<int>(point.GetX()), static_cast<int>(point.GetY()));
|
||||
|
||||
HitContext hitInfo;
|
||||
hitInfo.view = view;
|
||||
if (view->HitTest(viewPoint, hitInfo))
|
||||
{
|
||||
if (hitInfo.object && (hitInfo.object->GetType() == OBJTYPE_AZENTITY))
|
||||
{
|
||||
CComponentEntityObject* entityObject = static_cast<CComponentEntityObject*>(hitInfo.object);
|
||||
AzToolsFramework::EditorPickModeRequestBus::Broadcast(
|
||||
&AzToolsFramework::EditorPickModeRequests::PickModeSelectEntity, entityObject->GetAssociatedEntityId());
|
||||
}
|
||||
}
|
||||
|
||||
AzToolsFramework::EditorPickModeRequestBus::Broadcast(
|
||||
&AzToolsFramework::EditorPickModeRequests::StopEntityPickMode);
|
||||
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
void SandboxIntegrationManager::UpdateObjectModeCursor(AZ::u32& cursorId, AZStd::string& cursorStr)
|
||||
{
|
||||
if (m_inObjectPickMode)
|
||||
{
|
||||
cursorId = static_cast<AZ::u64>(STD_CURSOR_HAND);
|
||||
cursorStr = "Pick an entity...";
|
||||
}
|
||||
}
|
||||
|
||||
void SandboxIntegrationManager::OnEntityPickModeStarted()
|
||||
{
|
||||
m_inObjectPickMode = true;
|
||||
|
||||
// Currently this object pick mode is activated only via PropertyEntityIdCtrl picker.
|
||||
// When the picker button is clicked, we transfer focus to the viewport so the
|
||||
// spacebar can still be used to activate selection helpers.
|
||||
if (CViewport* view = GetIEditor()->GetViewManager()->GetGameViewport())
|
||||
{
|
||||
view->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
void SandboxIntegrationManager::OnEntityPickModeStopped()
|
||||
{
|
||||
m_inObjectPickMode = false;
|
||||
}
|
||||
|
||||
void SandboxIntegrationManager::CreateEditorRepresentation(AZ::Entity* entity)
|
||||
{
|
||||
IEditor* editor = GetIEditor();
|
||||
|
||||
Reference in New Issue
Block a user