Merge branch 'stabilization/2106' into tomhh_stabilization-to-development
This commit is contained in:
@@ -117,6 +117,8 @@ void AssetEditorWindow::RegisterViewClass()
|
||||
{
|
||||
AzToolsFramework::ViewPaneOptions options;
|
||||
options.preferedDockingArea = Qt::LeftDockWidgetArea;
|
||||
options.showOnToolsToolbar = true;
|
||||
options.toolbarIcon = ":/Menu/asset_editor.svg";
|
||||
AzToolsFramework::RegisterViewPane<AssetEditorWindow>(LyViewPane::AssetEditor, LyViewPane::CategoryTools, options);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
|
||||
|
||||
ly_add_target(
|
||||
NAME EditorCore SHARED
|
||||
NAMESPACE Legacy
|
||||
@@ -161,7 +159,7 @@ ly_add_source_properties(
|
||||
# Editor
|
||||
################################################################################
|
||||
ly_add_target(
|
||||
NAME Editor ${PAL_TRAIT_BUILD_EDITOR_APPLICATION_TYPE} # Mac Editor is a bare executable on Atom until we can fix packaging of the shader compilers. DO NOT MERGE BACK TO MAINLINE
|
||||
NAME Editor APPLICATION
|
||||
NAMESPACE Legacy
|
||||
AUTORCC
|
||||
FILES_CMAKE
|
||||
|
||||
@@ -1292,7 +1292,7 @@ void LevelEditorMenuHandler::AddEditMenuAction(QAction* action)
|
||||
}
|
||||
}
|
||||
|
||||
void LevelEditorMenuHandler::AddMenuAction(AZStd::string_view categoryId, QAction* action)
|
||||
void LevelEditorMenuHandler::AddMenuAction(AZStd::string_view categoryId, QAction* action, bool addToToolsToolbar)
|
||||
{
|
||||
auto menuWrapper = m_actionManager->FindMenu(categoryId.data());
|
||||
if (menuWrapper.isNull())
|
||||
@@ -1301,6 +1301,11 @@ void LevelEditorMenuHandler::AddMenuAction(AZStd::string_view categoryId, QActio
|
||||
return;
|
||||
}
|
||||
menuWrapper.Get()->addAction(action);
|
||||
|
||||
if (addToToolsToolbar)
|
||||
{
|
||||
m_mainWindow->GetToolbarManager()->AddButtonToEditToolbar(action);
|
||||
}
|
||||
}
|
||||
|
||||
void LevelEditorMenuHandler::RestoreEditMenuToDefault()
|
||||
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
|
||||
// EditorMenuRequestBus
|
||||
void AddEditMenuAction(QAction* action) override;
|
||||
void AddMenuAction(AZStd::string_view categoryId, QAction* action) override;
|
||||
void AddMenuAction(AZStd::string_view categoryId, QAction* action, bool addToToolsToolbar) override;
|
||||
void RestoreEditMenuToDefault() override;
|
||||
|
||||
MainWindow* m_mainWindow;
|
||||
|
||||
@@ -2664,6 +2664,18 @@ bool EditorViewportWidget::GetActiveCameraPosition(AZ::Vector3& cameraPos)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditorViewportWidget::GetActiveCameraState(AzFramework::CameraState& cameraState)
|
||||
{
|
||||
if (m_pPrimaryViewport == this)
|
||||
{
|
||||
cameraState = GetCameraState();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void EditorViewportWidget::OnStartPlayInEditor()
|
||||
{
|
||||
if (m_viewEntityId.IsValid())
|
||||
|
||||
@@ -184,6 +184,7 @@ public:
|
||||
void SetViewAndMovementLockFromEntityPerspective(const AZ::EntityId& entityId, bool lockCameraMovement) override;
|
||||
AZ::EntityId GetCurrentViewEntityId() override { return m_viewEntityId; }
|
||||
bool GetActiveCameraPosition(AZ::Vector3& cameraPos) override;
|
||||
bool GetActiveCameraState(AzFramework::CameraState& cameraState) override;
|
||||
|
||||
// AzToolsFramework::EditorEntityContextNotificationBus (handler moved to cpp to resolve link issues in unity builds)
|
||||
virtual void OnStartPlayInEditor();
|
||||
|
||||
@@ -593,6 +593,8 @@ void CGameEngine::SwitchToInGame()
|
||||
&AzFramework::InputSystemCursorRequests::SetSystemCursorState,
|
||||
AzFramework::SystemCursorState::ConstrainedAndHidden);
|
||||
}
|
||||
|
||||
Log("Entered game mode");
|
||||
}
|
||||
|
||||
void CGameEngine::SwitchToInEditor()
|
||||
@@ -647,6 +649,8 @@ void CGameEngine::SwitchToInEditor()
|
||||
AzFramework::InputSystemCursorRequestBus::Event(AzFramework::InputDeviceMouse::Id,
|
||||
&AzFramework::InputSystemCursorRequests::SetSystemCursorState,
|
||||
AzFramework::SystemCursorState::UnconstrainedAndVisible);
|
||||
|
||||
Log("Exited game mode");
|
||||
}
|
||||
|
||||
void CGameEngine::HandleQuitRequest(IConsoleCmdArgs* /*args*/)
|
||||
|
||||
@@ -833,13 +833,6 @@ void MainWindow::InitActions()
|
||||
.Connect(&QAction::triggered, []() { SandboxEditor::SetAngleSnapping(!SandboxEditor::AngleSnappingEnabled()); });
|
||||
|
||||
// Display actions
|
||||
am->AddAction(ID_WIREFRAME, tr("&Wireframe"))
|
||||
.SetShortcut(tr("F3"))
|
||||
.SetToolTip(tr("Wireframe (F3)"))
|
||||
.SetCheckable(true)
|
||||
.SetStatusTip(tr("Render in Wireframe Mode."))
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateWireframe);
|
||||
|
||||
am->AddAction(ID_SWITCHCAMERA_DEFAULTCAMERA, tr("Default Camera")).SetCheckable(true)
|
||||
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateSwitchToDefaultCamera);
|
||||
am->AddAction(ID_SWITCHCAMERA_SEQUENCECAMERA, tr("Sequence Camera")).SetCheckable(true)
|
||||
|
||||
@@ -1277,7 +1277,6 @@ void CEntityObject::OnEvent(ObjectEvent event)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
AZ_TracePrintf("CEntityObject", "Unhandled object event: %d", event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +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.
|
||||
#
|
||||
|
||||
set (PAL_TRAIT_BUILD_EDITOR_APPLICATION_TYPE APPLICATION)
|
||||
|
||||
@@ -1,13 +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.
|
||||
#
|
||||
|
||||
set (PAL_TRAIT_BUILD_EDITOR_APPLICATION_TYPE APPLICATION)
|
||||
|
||||
@@ -1,13 +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.
|
||||
#
|
||||
|
||||
set (PAL_TRAIT_BUILD_EDITOR_APPLICATION_TYPE APPLICATION)
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
// AzToolsFramework
|
||||
#include <AzToolsFramework/API/ComponentEntityObjectBus.h>
|
||||
#include <AzToolsFramework/API/ComponentEntitySelectionBus.h>
|
||||
#include <AzToolsFramework/Editor/EditorContextMenuBus.h>
|
||||
#include <AzToolsFramework/Manipulators/ManipulatorManager.h>
|
||||
#include <AzToolsFramework/ViewportSelection/EditorInteractionSystemViewportSelectionRequestBus.h>
|
||||
#include <AzToolsFramework/ViewportSelection/EditorSelectionUtil.h>
|
||||
@@ -112,20 +113,20 @@ static const char TextCantCreateCameraNoLevel[] = "Cannot create camera when no
|
||||
|
||||
class EditorEntityNotifications
|
||||
: public AzToolsFramework::EditorEntityContextNotificationBus::Handler
|
||||
, public AzToolsFramework::EditorEvents::Bus::Handler
|
||||
, public AzToolsFramework::EditorContextMenuBus::Handler
|
||||
{
|
||||
public:
|
||||
EditorEntityNotifications(CRenderViewport& renderViewport)
|
||||
: m_renderViewport(renderViewport)
|
||||
{
|
||||
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorContextMenuBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
~EditorEntityNotifications() override
|
||||
{
|
||||
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorContextMenuBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
// AzToolsFramework::EditorEntityContextNotificationBus
|
||||
@@ -138,7 +139,7 @@ public:
|
||||
m_renderViewport.OnStopPlayInEditor();
|
||||
}
|
||||
|
||||
// AzToolsFramework::EditorEvents::Bus
|
||||
// AzToolsFramework::EditorContextMenu::Bus
|
||||
void PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags) override
|
||||
{
|
||||
m_renderViewport.PopulateEditorGlobalContextMenu(menu, point, flags);
|
||||
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
virtual void OnStartPlayInEditor();
|
||||
virtual void OnStopPlayInEditor();
|
||||
|
||||
// AzToolsFramework::EditorEvents::Bus (handler moved to cpp to resolve link issues in unity builds)
|
||||
// AzToolsFramework::EditorContextMenu::Bus (handler moved to cpp to resolve link issues in unity builds)
|
||||
// We use this to determine when the viewport context menu is being displayed so we can exit move mode
|
||||
void PopulateEditorGlobalContextMenu(QMenu* /*menu*/, const AZ::Vector2& /*point*/, int /*flags*/);
|
||||
|
||||
|
||||
@@ -116,6 +116,8 @@ void CTrackViewDialog::RegisterViewClass()
|
||||
AzToolsFramework::ViewPaneOptions opts;
|
||||
opts.shortcut = QKeySequence(Qt::Key_T);
|
||||
opts.isDisabledInSimMode = true;
|
||||
opts.showOnToolsToolbar = true;
|
||||
opts.toolbarIcon = ":/Menu/trackview_editor.svg";
|
||||
|
||||
AzToolsFramework::RegisterViewPane<CTrackViewDialog>(LyViewPane::TrackView, LyViewPane::CategoryTools, opts);
|
||||
GetIEditor()->GetSettingsManager()->AddToolName(s_kTrackViewLayoutSection, LyViewPane::TrackView);
|
||||
|
||||
@@ -154,11 +154,6 @@ void CViewportTitleDlg::SetupCameraDropdownMenu()
|
||||
QAction* gotoPositionAction = new QAction("Go to position", cameraMenu);
|
||||
connect(gotoPositionAction, &QAction::triggered, this, &CViewportTitleDlg::OnBnClickedGotoPosition);
|
||||
cameraMenu->addAction(gotoPositionAction);
|
||||
m_syncPlayerToCameraAction = new QAction("Sync camera to player", cameraMenu);
|
||||
m_syncPlayerToCameraAction->setCheckable(true);
|
||||
connect(m_syncPlayerToCameraAction, &QAction::triggered, this, &CViewportTitleDlg::OnBnClickedSyncplayer);
|
||||
cameraMenu->addAction(m_syncPlayerToCameraAction);
|
||||
|
||||
cameraMenu->addSeparator();
|
||||
|
||||
auto cameraSpeedActionWidget = new QWidgetAction(cameraMenu);
|
||||
@@ -238,47 +233,35 @@ void CViewportTitleDlg::SetupOverflowMenu()
|
||||
overFlowMenu->addAction(m_enableGridSnappingAction);
|
||||
|
||||
m_gridSizeActionWidget = new QWidgetAction(overFlowMenu);
|
||||
auto gridSizeContainer = new QWidget(overFlowMenu);
|
||||
auto gridSizeLabel = new QLabel(tr("Grid Size"), overFlowMenu);
|
||||
|
||||
m_gridSpinBox = new AzQtComponents::DoubleSpinBox();
|
||||
m_gridSpinBox->setValue(SandboxEditor::GridSnappingSize());
|
||||
m_gridSpinBox->setMinimum(1e-2f);
|
||||
m_gridSpinBox->setToolTip(tr("Grid size"));
|
||||
|
||||
QObject::connect(
|
||||
m_gridSpinBox, QOverload<double>::of(&AzQtComponents::DoubleSpinBox::valueChanged), this, &CViewportTitleDlg::OnGridSpinBoxChanged);
|
||||
|
||||
QHBoxLayout* gridSizeLayout = new QHBoxLayout;
|
||||
gridSizeLayout->addWidget(gridSizeLabel);
|
||||
gridSizeLayout->addWidget(m_gridSpinBox);
|
||||
gridSizeContainer->setLayout(gridSizeLayout);
|
||||
m_gridSizeActionWidget->setDefaultWidget(gridSizeContainer);
|
||||
m_gridSizeActionWidget->setDefaultWidget(m_gridSpinBox);
|
||||
overFlowMenu->addAction(m_gridSizeActionWidget);
|
||||
|
||||
overFlowMenu->addSeparator();
|
||||
|
||||
m_enableAngleSnappingAction = new QAction("Enable Grid Snapping", overFlowMenu);
|
||||
m_enableAngleSnappingAction = new QAction("Enable Angle Snapping", overFlowMenu);
|
||||
connect(m_enableAngleSnappingAction, &QAction::triggered, this, &CViewportTitleDlg::OnAngleSnappingToggled);
|
||||
m_enableAngleSnappingAction->setCheckable(true);
|
||||
overFlowMenu->addAction(m_enableAngleSnappingAction);
|
||||
|
||||
m_angleSizeActionWidget = new QWidgetAction(overFlowMenu);
|
||||
auto angleSizeContainer = new QWidget(overFlowMenu);
|
||||
auto angleSizeLabel = new QLabel(tr("Angle Snapping"), overFlowMenu);
|
||||
|
||||
m_angleSpinBox = new AzQtComponents::DoubleSpinBox();
|
||||
m_angleSpinBox->setValue(SandboxEditor::AngleSnappingSize());
|
||||
m_angleSpinBox->setMinimum(1e-2f);
|
||||
m_angleSpinBox->setToolTip(tr("Angle Snapping"));
|
||||
|
||||
QObject::connect(
|
||||
m_angleSpinBox, QOverload<double>::of(&AzQtComponents::DoubleSpinBox::valueChanged), this,
|
||||
&CViewportTitleDlg::OnAngleSpinBoxChanged);
|
||||
|
||||
QHBoxLayout* angleSizeLayout = new QHBoxLayout;
|
||||
angleSizeLayout->addWidget(angleSizeLabel);
|
||||
angleSizeLayout->addWidget(m_angleSpinBox);
|
||||
angleSizeContainer->setLayout(angleSizeLayout);
|
||||
m_angleSizeActionWidget->setDefaultWidget(angleSizeContainer);
|
||||
m_angleSizeActionWidget->setDefaultWidget(m_angleSpinBox);
|
||||
overFlowMenu->addAction(m_angleSizeActionWidget);
|
||||
|
||||
m_ui->m_overflowBtn->setMenu(overFlowMenu);
|
||||
@@ -850,14 +833,6 @@ bool CViewportTitleDlg::eventFilter(QObject* object, QEvent* event)
|
||||
return QWidget::eventFilter(object, event) || consumeEvent;
|
||||
}
|
||||
|
||||
void CViewportTitleDlg::OnBnClickedSyncplayer()
|
||||
{
|
||||
emit ActionTriggered(ID_GAME_SYNCPLAYER);
|
||||
|
||||
bool bSyncPlayer = GetIEditor()->GetGameEngine()->IsSyncPlayerPosition();
|
||||
m_syncPlayerToCameraAction->setChecked(!bSyncPlayer);
|
||||
}
|
||||
|
||||
void CViewportTitleDlg::OnBnClickedGotoPosition()
|
||||
{
|
||||
emit ActionTriggered(ID_DISPLAY_GOTOPOSITION);
|
||||
|
||||
@@ -115,10 +115,10 @@ protected:
|
||||
float m_prevMoveSpeed;
|
||||
|
||||
// Speed combobox/lineEdit settings
|
||||
double m_minSpeed = 0.1;
|
||||
double m_minSpeed = 0.01;
|
||||
double m_maxSpeed = 100.0;
|
||||
double m_speedStep = 0.1;
|
||||
int m_numDecimals = 1;
|
||||
double m_speedStep = 0.01;
|
||||
int m_numDecimals = 3;
|
||||
|
||||
// Speed presets
|
||||
float m_speedPresetValues[3] = { 0.1f, 1.0f, 10.0f };
|
||||
@@ -143,7 +143,6 @@ protected:
|
||||
void SetFullViewportInfo();
|
||||
void SetCompactViewportInfo();
|
||||
|
||||
void OnBnClickedSyncplayer();
|
||||
void OnBnClickedGotoPosition();
|
||||
void OnBnClickedMuteAudio();
|
||||
void OnBnClickedEnableVR();
|
||||
@@ -174,7 +173,6 @@ protected:
|
||||
QAction* m_fullInformationAction = nullptr;
|
||||
QAction* m_compactInformationAction = nullptr;
|
||||
QAction* m_debugHelpersAction = nullptr;
|
||||
QAction* m_syncPlayerToCameraAction = nullptr;
|
||||
QAction* m_audioMuteAction = nullptr;
|
||||
QAction* m_enableVRAction = nullptr;
|
||||
QAction* m_enableGridSnappingAction = nullptr;
|
||||
|
||||
@@ -167,7 +167,7 @@ void SandboxIntegrationManager::Setup()
|
||||
AzToolsFramework::ToolsApplicationEvents::Bus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorRequests::Bus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorWindowRequests::Bus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorContextMenuBus::Handler::BusConnect();
|
||||
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect();
|
||||
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusConnect();
|
||||
|
||||
@@ -384,7 +384,7 @@ void SandboxIntegrationManager::Teardown()
|
||||
AzFramework::DisplayContextRequestBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::SliceEditorEntityOwnershipServiceNotificationBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorContextMenuBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorWindowRequests::Bus::Handler::BusDisconnect();
|
||||
AzToolsFramework::EditorRequests::Bus::Handler::BusDisconnect();
|
||||
AzToolsFramework::ToolsApplicationEvents::Bus::Handler::BusDisconnect();
|
||||
@@ -589,6 +589,11 @@ void SandboxIntegrationManager::OnSaveLevel()
|
||||
m_unsavedEntities.clear();
|
||||
}
|
||||
|
||||
int SandboxIntegrationManager::GetMenuPosition() const
|
||||
{
|
||||
return aznumeric_cast<int>(AzToolsFramework::EditorContextMenuOrdering::TOP);
|
||||
}
|
||||
|
||||
void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags)
|
||||
{
|
||||
if (!IsLevelDocumentOpen())
|
||||
@@ -662,13 +667,6 @@ void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, con
|
||||
|
||||
SetupSliceContextMenu(menu);
|
||||
}
|
||||
else
|
||||
{
|
||||
menu->addSeparator();
|
||||
|
||||
// Allow handlers to append menu items to the context menu
|
||||
AzToolsFramework::EditorContextMenuBus::Broadcast(&AzToolsFramework::EditorContextMenuEvents::PopulateEditorGlobalContextMenu, menu);
|
||||
}
|
||||
|
||||
action = menu->addAction(QObject::tr("Duplicate"));
|
||||
QObject::connect(action, &QAction::triggered, action, [this] { ContextMenu_Duplicate(); });
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <AzFramework/Viewport/DisplayContextRequestBus.h>
|
||||
#include <AzToolsFramework/API/EditorWindowRequestBus.h>
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
#include <AzToolsFramework/Editor/EditorContextMenuBus.h>
|
||||
#include <AzToolsFramework/ToolsComponents/EditorLayerComponentBus.h>
|
||||
#include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
|
||||
#include <AzToolsFramework/UI/Layer/LayerUiHandler.h>
|
||||
@@ -97,7 +98,7 @@ class SandboxIntegrationManager
|
||||
: private AzToolsFramework::ToolsApplicationEvents::Bus::Handler
|
||||
, private AzToolsFramework::EditorRequests::Bus::Handler
|
||||
, private AzToolsFramework::EditorPickModeNotificationBus::Handler
|
||||
, private AzToolsFramework::EditorEvents::Bus::Handler
|
||||
, private AzToolsFramework::EditorContextMenuBus::Handler
|
||||
, private AzToolsFramework::EditorWindowRequests::Bus::Handler
|
||||
, private AzFramework::AssetCatalogEventBus::Handler
|
||||
, private AzFramework::DisplayContextRequestBus::Handler
|
||||
@@ -184,8 +185,9 @@ private:
|
||||
void OnEntityPickModeStopped() override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// AzToolsFramework::EditorEvents::Bus::Handler overrides
|
||||
// AzToolsFramework::EditorContextMenu::Bus::Handler overrides
|
||||
void PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags) override;
|
||||
int GetMenuPosition() const;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <AzQtComponents/Utilities/QtViewPaneEffects.h>
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
#include <AzToolsFramework/Commands/SelectionCommand.h>
|
||||
#include <AzToolsFramework/Editor/EditorContextMenuBus.h>
|
||||
#include <AzToolsFramework/Entity/EditorEntityContextBus.h>
|
||||
#include <AzToolsFramework/Entity/EditorEntityHelpers.h>
|
||||
#include <AzToolsFramework/Entity/EditorEntityInfoBus.h>
|
||||
@@ -530,8 +531,8 @@ void OutlinerWidget::contextMenuEvent(QContextMenuEvent* event)
|
||||
QMenu* contextMenu = new QMenu(this);
|
||||
|
||||
// Populate global context menu.
|
||||
EBUS_EVENT(AzToolsFramework::EditorEvents::Bus,
|
||||
PopulateEditorGlobalContextMenu,
|
||||
|
||||
AzToolsFramework::EditorContextMenuBus::Broadcast(&AzToolsFramework::EditorContextMenuEvents::PopulateEditorGlobalContextMenu,
|
||||
contextMenu,
|
||||
AZ::Vector2::CreateZero(),
|
||||
AzToolsFramework::EditorEvents::eECMF_HIDE_ENTITY_CREATION | AzToolsFramework::EditorEvents::eECMF_USE_VIEWPORT_CENTER);
|
||||
|
||||
Reference in New Issue
Block a user