Integrating up through commit 90f050496

This commit is contained in:
alexpete
2021-04-07 14:03:29 -07:00
parent 8f2ed080a9
commit c2cbd430fe
2694 changed files with 285622 additions and 176874 deletions
@@ -191,6 +191,8 @@ void LevelEditorMenuHandler::Initialize()
m_viewPaneManager, &QtViewPaneManager::registeredPanesChanged,
this, &LevelEditorMenuHandler::ResetToolsMenus);
m_levelExtension = EditorUtils::LevelFile::GetDefaultFileExtension();
m_topLevelMenus << CreateFileMenu();
auto editMenu = CreateEditMenu();
@@ -230,6 +232,11 @@ bool LevelEditorMenuHandler::MRUEntryIsValid(const QString& entry, const QString
return false;
}
if (!entry.endsWith(m_levelExtension))
{
return false;
}
const QDir gameDir(gameFolderPath);
QDir dir(entry); // actually pointing at file, first cdUp() gets us the parent dir
while (dir.cdUp())
@@ -473,8 +480,18 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe
// editMenu->addAction(ID_EDIT_PASTE);
// editMenu.AddSeparator();
// Duplicate
editMenu.AddAction(ID_EDIT_CLONE);
bool isPrefabSystemEnabled = false;
AzFramework::ApplicationRequests::Bus::BroadcastResult(isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
bool prefabWipFeaturesEnabled = false;
AzFramework::ApplicationRequests::Bus::BroadcastResult(
prefabWipFeaturesEnabled, &AzFramework::ApplicationRequests::ArePrefabWipFeaturesEnabled);
if (!isPrefabSystemEnabled || (isPrefabSystemEnabled && prefabWipFeaturesEnabled))
{
// Duplicate
editMenu.AddAction(ID_EDIT_CLONE);
}
// Delete
editMenu.AddAction(ID_EDIT_DELETE);
@@ -701,8 +718,15 @@ QMenu* LevelEditorMenuHandler::CreateGameMenu()
gameMenu.AddAction(ID_SWITCH_PHYSICS);
gameMenu.AddSeparator();
// Export to Engine
gameMenu.AddAction(ID_FILE_EXPORTTOGAMENOSURFACETEXTURE);
bool usePrefabSystemForLevels = false;
AzFramework::ApplicationRequests::Bus::BroadcastResult(
usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled);
if (!usePrefabSystemForLevels)
{
// Export to Engine
gameMenu.AddAction(ID_FILE_EXPORTTOGAMENOSURFACETEXTURE);
}
// Export Selected Objects
gameMenu.AddAction(ID_FILE_EXPORT_SELECTEDOBJECTS);
@@ -42,7 +42,7 @@ public:
void Initialize();
static bool MRUEntryIsValid(const QString& entry, const QString& gameFolderPath);
bool MRUEntryIsValid(const QString& entry, const QString& gameFolderPath);
void IncrementViewPaneVersion();
int GetViewPaneVersion() const;
@@ -119,6 +119,7 @@ private:
ActionManager::MenuWrapper m_layoutsMenu;
ActionManager::MenuWrapper m_macrosMenu;
const char* m_levelExtension = nullptr;
int m_viewPaneVersion = 0;
QList<QMenu*> m_topLevelMenus;