From c2ec18dc0ead9e4b5ef39be84308cdf2064174d6 Mon Sep 17 00:00:00 2001 From: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> Date: Wed, 20 Oct 2021 14:41:35 -0700 Subject: [PATCH] Remove prefab WIP checks to make focus mode the default (and only) prefab editing workflow in the editor. (#4840) Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> --- .../UI/Prefab/PrefabIntegrationManager.cpp | 19 ++++--------------- .../UI/Prefab/PrefabUiHandler.cpp | 11 ++--------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp index bef08466ae..65f7b0cdfb 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp @@ -255,7 +255,7 @@ namespace AzToolsFramework if (s_prefabPublicInterface->IsInstanceContainerEntity(selectedEntity)) { // Edit Prefab - if (prefabWipFeaturesEnabled && !s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(selectedEntity)) + if (!s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(selectedEntity)) { QAction* editAction = menu->addAction(QObject::tr("Edit Prefab")); editAction->setToolTip(QObject::tr("Edit the prefab in focus mode.")); @@ -1159,25 +1159,14 @@ namespace AzToolsFramework { s_editorEntityUiInterface->RegisterEntity(entityId, m_prefabUiHandler.GetHandlerId()); - bool prefabWipFeaturesEnabled = false; - AzFramework::ApplicationRequests::Bus::BroadcastResult( - prefabWipFeaturesEnabled, &AzFramework::ApplicationRequests::ArePrefabWipFeaturesEnabled); - - if (prefabWipFeaturesEnabled) - { - // Register entity as a container - s_containerEntityInterface->RegisterEntityAsContainer(entityId); - } + // Register entity as a container + s_containerEntityInterface->RegisterEntityAsContainer(entityId); } } void PrefabIntegrationManager::OnPrefabComponentDeactivate(AZ::EntityId entityId) { - bool prefabWipFeaturesEnabled = false; - AzFramework::ApplicationRequests::Bus::BroadcastResult( - prefabWipFeaturesEnabled, &AzFramework::ApplicationRequests::ArePrefabWipFeaturesEnabled); - - if (prefabWipFeaturesEnabled && !s_prefabPublicInterface->IsLevelInstanceContainerEntity(entityId)) + if (!s_prefabPublicInterface->IsLevelInstanceContainerEntity(entityId)) { // Unregister entity as a container s_containerEntityInterface->UnregisterEntityAsContainer(entityId); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp index ccad85e32b..7c2c65d204 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabUiHandler.cpp @@ -316,14 +316,7 @@ namespace AzToolsFramework void PrefabUiHandler::OnDoubleClick(AZ::EntityId entityId) const { - bool prefabWipFeaturesEnabled = false; - AzFramework::ApplicationRequests::Bus::BroadcastResult( - prefabWipFeaturesEnabled, &AzFramework::ApplicationRequests::ArePrefabWipFeaturesEnabled); - - if (prefabWipFeaturesEnabled) - { - // Focus on this prefab - m_prefabFocusPublicInterface->FocusOnOwningPrefab(entityId); - } + // Focus on this prefab + m_prefabFocusPublicInterface->FocusOnOwningPrefab(entityId); } }