Cherry Picking (lyn1751) (#1854)
* Cherry Picking (lyn1751) Problem with DCO so we need to cherry pick this branch. Signed-off-by: aaguilea <aaguilea@amazon.com> * Cherry picking #2 Signed-off-by: aaguilea <aaguilea@amazon.com> * Cherry picking 3 Signed-off-by: aaguilea <aaguilea@amazon.com> * Changed variables reverseurls This was just changing some name variables. Signed-off-by: aaguilea <aaguilea@amazon.com> * Changes from past PR Signed-off-by: aaguilea <aaguilea@amazon.com> * changes from past PR and fixed small bug: Also removed some legacy code from Resources.h Signed-off-by: aaguilea <aaguilea@amazon.com> * couple of changes from actual PR Signed-off-by: aaguilea <aaguilea@amazon.com> * fixed copyright issues for AR Signed-off-by: aaguilea <aaguilea@amazon.com>
This commit is contained in:
committed by
GitHub
parent
a3d14e217e
commit
4f523e496f
@@ -385,6 +385,13 @@ void ActionManager::AddAction(int id, QAction* action)
|
||||
AddAction(action);
|
||||
}
|
||||
|
||||
void ActionManager::AddAction(AZ::Crc32 id, QAction* action)
|
||||
{
|
||||
action->setData(aznumeric_cast<AZ::u32>(id));
|
||||
AddAction(action);
|
||||
}
|
||||
|
||||
|
||||
void ActionManager::AddAction(QAction* action)
|
||||
{
|
||||
const int id = action->data().toInt();
|
||||
@@ -434,6 +441,15 @@ ActionManager::ActionWrapper ActionManager::AddAction(int id, const QString& nam
|
||||
return ActionWrapper(action, this);
|
||||
}
|
||||
|
||||
ActionManager::ActionWrapper ActionManager::AddAction(AZ::Crc32 id, const QString& name)
|
||||
{
|
||||
QAction* action = ActionIsWidget(aznumeric_cast<AZ::u32>(id))
|
||||
? new WidgetAction(aznumeric_cast<AZ::u32>(id), m_mainWindow, name, this)
|
||||
: static_cast<QAction*>(new PatchedAction(name, this)); // static cast to base so ternary compile
|
||||
AddAction(id, action);
|
||||
return ActionWrapper(action, this);
|
||||
}
|
||||
|
||||
bool ActionManager::HasAction(QAction* action) const
|
||||
{
|
||||
return action && HasAction(action->data().toInt());
|
||||
@@ -601,6 +617,11 @@ void ActionManager::AddActionViaBus(int id, QAction* action)
|
||||
AddAction(id, action);
|
||||
}
|
||||
|
||||
void ActionManager::AddActionViaBusCrc(AZ::Crc32 id, QAction* action)
|
||||
{
|
||||
AddAction(id, action);
|
||||
}
|
||||
|
||||
void ActionManager::RemoveActionViaBus(QAction* action)
|
||||
{
|
||||
RemoveAction(action);
|
||||
|
||||
@@ -300,8 +300,13 @@ public:
|
||||
|
||||
void AddAction(QAction* action);
|
||||
void AddAction(int id, QAction* action);
|
||||
void AddAction(AZ::Crc32 id, QAction* action);
|
||||
|
||||
void RemoveAction(QAction* action);
|
||||
|
||||
ActionWrapper AddAction(int id, const QString& name);
|
||||
ActionWrapper AddAction(AZ::Crc32, const QString& name);
|
||||
|
||||
bool HasAction(QAction*) const;
|
||||
bool HasAction(int id) const;
|
||||
|
||||
@@ -310,6 +315,7 @@ public:
|
||||
|
||||
// AzToolsFramework::EditorActionRequests
|
||||
void AddActionViaBus(int id, QAction* action) override;
|
||||
void AddActionViaBusCrc(AZ::Crc32 id, QAction* action) override;
|
||||
void RemoveActionViaBus(QAction* action) override;
|
||||
void EnableDefaultActions() override;
|
||||
void DisableDefaultActions() override;
|
||||
@@ -413,6 +419,7 @@ protected:
|
||||
|
||||
void AddAction(int id, QAction* action);
|
||||
ActionManager::ActionWrapper AddAction(int id, const QString& name);
|
||||
ActionManager::ActionWrapper AddAction(AZ::Crc32 id, const QString& name);
|
||||
void AddSeparator();
|
||||
|
||||
void UpdateAllActions();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
@@ -30,6 +30,9 @@
|
||||
// AzFramework
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
|
||||
// AzToolsFramework
|
||||
#include <AzToolsFramework/ViewportSelection/EditorTransformComponentSelectionRequestBus.h>
|
||||
|
||||
// AzQtComponents
|
||||
#include <AzQtComponents/Components/SearchLineEdit.h>
|
||||
|
||||
@@ -469,51 +472,48 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe
|
||||
// editMenu.AddSeparator();
|
||||
|
||||
// Duplicate
|
||||
editMenu.AddAction(ID_EDIT_CLONE);
|
||||
editMenu.AddAction(AzToolsFramework::DuplicateSelect);
|
||||
|
||||
// Delete
|
||||
editMenu.AddAction(ID_EDIT_DELETE);
|
||||
editMenu.AddAction(AzToolsFramework::DeleteSelect);
|
||||
|
||||
editMenu.AddSeparator();
|
||||
|
||||
// Select All
|
||||
editMenu.AddAction(ID_EDIT_SELECTALL);
|
||||
editMenu.AddAction(AzToolsFramework::SelectAll);
|
||||
|
||||
// Invert Selection
|
||||
editMenu.AddAction(ID_EDIT_INVERTSELECTION);
|
||||
editMenu.AddAction(AzToolsFramework::InvertSelect);
|
||||
|
||||
editMenu.AddSeparator();
|
||||
|
||||
// New Viewport Interaction Model actions/shortcuts
|
||||
editMenu.AddAction(ID_EDIT_PIVOT);
|
||||
editMenu.AddAction(ID_EDIT_RESET);
|
||||
editMenu.AddAction(ID_EDIT_RESET_MANIPULATOR);
|
||||
editMenu.AddAction(ID_EDIT_RESET_LOCAL);
|
||||
editMenu.AddAction(ID_EDIT_RESET_WORLD);
|
||||
editMenu.AddAction(AzToolsFramework::EditPivot);
|
||||
editMenu.AddAction(AzToolsFramework::EditReset);
|
||||
editMenu.AddAction(AzToolsFramework::EditResetManipulator);
|
||||
editMenu.AddAction(AzToolsFramework::EditResetLocal);
|
||||
editMenu.AddAction(AzToolsFramework::EditResetWorld);
|
||||
|
||||
// Hide Selection
|
||||
editMenu.AddAction(ID_EDIT_HIDE);
|
||||
editMenu.AddAction(AzToolsFramework::HideSelection);
|
||||
|
||||
// Unhide All
|
||||
editMenu.AddAction(ID_EDIT_UNHIDEALL);
|
||||
editMenu.AddAction(AzToolsFramework::ShowAll);
|
||||
|
||||
/*
|
||||
* The following block of code is part of the feature "Isolation Mode" and is temporarily
|
||||
* disabled for 1.10 release.
|
||||
* Jira: LY-49532
|
||||
|
||||
// Isolate Selected
|
||||
QAction* isolateSelectedAction = editMenu->addAction(tr("Isolate Selected"));
|
||||
connect(isolateSelectedAction, &QAction::triggered, this, []() {
|
||||
AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequestBus::Events::EnterEditorIsolationMode);
|
||||
});
|
||||
|
||||
// Exit Isolation
|
||||
QAction* exitIsolationAction = editMenu->addAction(tr("Exit Isolation"));
|
||||
connect(exitIsolationAction, &QAction::triggered, this, []() {
|
||||
AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequestBus::Events::ExitEditorIsolationMode);
|
||||
});
|
||||
|
||||
connect(editMenu, &QMenu::aboutToShow, this, [isolateSelectedAction, exitIsolationAction]() {
|
||||
bool isInIsolationMode = false;
|
||||
AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(isInIsolationMode, &AzToolsFramework::ToolsApplicationRequestBus::Events::IsEditorInIsolationMode);
|
||||
@@ -528,7 +528,6 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe
|
||||
exitIsolationAction->setDisabled(true);
|
||||
}
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
editMenu.AddSeparator();
|
||||
|
||||
@@ -3406,7 +3406,7 @@ CCryEditDoc* CCryEditApp::OpenDocumentFile(LPCTSTR lpszFileName)
|
||||
if (ActionManager* actionManager = MainWindow::instance()->GetActionManager())
|
||||
{
|
||||
GetIEditor()->GetUndoManager()->Suspend();
|
||||
actionManager->GetAction(ID_EDIT_SELECTALL)->trigger();
|
||||
actionManager->GetAction(AzToolsFramework::SelectAll)->trigger();
|
||||
actionManager->GetAction(ID_GOTO_SELECTED)->trigger();
|
||||
GetIEditor()->GetUndoManager()->Resume();
|
||||
}
|
||||
|
||||
@@ -71,8 +71,6 @@
|
||||
#define IDC_GROUPBOX_GLOBALTAGS 2916
|
||||
#define IDC_GROUPBOX_FRAGMENTTAGS 2917
|
||||
#define ID_RESOURCES_REDUCEWORKINGSET 32896
|
||||
#define ID_EDIT_HIDE 32898
|
||||
#define ID_EDIT_UNHIDEALL 32899
|
||||
#define ID_RELOAD_TERRAIN 32902
|
||||
#define ID_VIEW_CONFIGURELAYOUT 32906
|
||||
#define ID_TOOLS_LOGMEMORYUSAGE 32908
|
||||
@@ -97,7 +95,6 @@
|
||||
#define ID_TOOL_LAST 33173
|
||||
#define ID_TOOL_SHELVE_FIRST 33174
|
||||
#define ID_TOOL_SHELVE_LAST 33375
|
||||
#define ID_EDIT_SELECTALL 33376
|
||||
#define ID_WIREFRAME 33410
|
||||
#define ID_FILE_GENERATETERRAINTEXTURE 33445
|
||||
#define ID_GENERATORS_TEXTURE 33448
|
||||
@@ -107,7 +104,6 @@
|
||||
#define ID_FILE_EXPORTTOGAMENOSURFACETEXTURE 33473
|
||||
#define ID_VIEW_SWITCHTOGAME 33477
|
||||
#define ID_VIEW_SWITCHTOGAME_FULLSCREEN 33478
|
||||
#define ID_EDIT_DELETE 33480
|
||||
#define ID_MOVE_OBJECT 33481
|
||||
#define ID_RENAME_OBJ 33483
|
||||
#define ID_FETCH 33496
|
||||
@@ -117,7 +113,6 @@
|
||||
#define ID_SELECTION_DELETE 33512
|
||||
#define ID_EDIT_ESCAPE 33513
|
||||
#define ID_UNDO 33524
|
||||
#define ID_EDIT_CLONE 33525
|
||||
#define ID_GOTO_SELECTED 33535
|
||||
#define ID_EDIT_LEVELDATA 33542
|
||||
#define ID_FILE_EDITEDITORINI 33543
|
||||
@@ -185,7 +180,6 @@
|
||||
#define ID_PANEL_VEG_RENAMECATEGORY 33683
|
||||
#define ID_PANEL_VEG_REMOVECATEGORY 33684
|
||||
#define ID_TOOLS_PREFERENCES 33691
|
||||
#define ID_EDIT_INVERTSELECTION 33692
|
||||
#define ID_TOOLTERRAINMODIFY_SMOOTH 33695
|
||||
#define ID_TERRAINMODIFY_SMOOTH 33696
|
||||
#define ID_TERRAIN_PAINTLAYERS 33698
|
||||
@@ -330,11 +324,6 @@
|
||||
#define ID_DOCUMENTATION_FEEDBACK 36043
|
||||
#define ID_OPEN_SUBSTANCE_EDITOR 36060
|
||||
#define ID_IMPORT_ASSET 36069
|
||||
#define ID_EDIT_PIVOT 36203
|
||||
#define ID_EDIT_RESET 36204
|
||||
#define ID_EDIT_RESET_LOCAL 36205
|
||||
#define ID_EDIT_RESET_WORLD 36206
|
||||
#define ID_EDIT_RESET_MANIPULATOR 36207
|
||||
#define ID_GAME_PROVO_ENABLELOWSPEC 34603
|
||||
#define ID_GAME_PROVO_ENABLEMEDIUMSPEC 34604
|
||||
#define ID_GAME_PROVO_ENABLEHIGHSPEC 34605
|
||||
|
||||
Reference in New Issue
Block a user