From 6c1185bcbbab762ad3ae011ef75721d4b45c6867 Mon Sep 17 00:00:00 2001 From: Hulton-Harrop Date: Mon, 6 Sep 2021 14:55:49 +0100 Subject: [PATCH] rename CEditorPreferencesPage_ViewportMovmement to CEditorPreferencesPage_ViewportCamera Signed-off-by: Hulton-Harrop Signed-off-by: hultonha --- Code/Editor/EditorPreferencesDialog.cpp | 2 +- .../EditorPreferencesPageViewportMovement.cpp | 24 +++++++++---------- .../EditorPreferencesPageViewportMovement.h | 8 +++---- Code/Editor/PreferencesStdPages.cpp | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Code/Editor/EditorPreferencesDialog.cpp b/Code/Editor/EditorPreferencesDialog.cpp index 6cbbccb7ac..22c108ebf9 100644 --- a/Code/Editor/EditorPreferencesDialog.cpp +++ b/Code/Editor/EditorPreferencesDialog.cpp @@ -66,7 +66,7 @@ EditorPreferencesDialog::EditorPreferencesDialog(QWidget* pParent) CEditorPreferencesPage_Files::Reflect(*serializeContext); CEditorPreferencesPage_ViewportGeneral::Reflect(*serializeContext); CEditorPreferencesPage_ViewportManipulator::Reflect(*serializeContext); - CEditorPreferencesPage_ViewportMovement::Reflect(*serializeContext); + CEditorPreferencesPage_ViewportCamera::Reflect(*serializeContext); CEditorPreferencesPage_ViewportDebug::Reflect(*serializeContext); CEditorPreferencesPage_ExperimentalLighting::Reflect(*serializeContext); CEditorPreferencesPage_AWS::Reflect(*serializeContext); diff --git a/Code/Editor/EditorPreferencesPageViewportMovement.cpp b/Code/Editor/EditorPreferencesPageViewportMovement.cpp index 8b8506d694..a272b3759f 100644 --- a/Code/Editor/EditorPreferencesPageViewportMovement.cpp +++ b/Code/Editor/EditorPreferencesPageViewportMovement.cpp @@ -58,7 +58,7 @@ static AZStd::vector GetEditorInputNames() return inputNames; } -void CEditorPreferencesPage_ViewportMovement::Reflect(AZ::SerializeContext& serialize) +void CEditorPreferencesPage_ViewportCamera::Reflect(AZ::SerializeContext& serialize) { serialize.Class() ->Version(2) @@ -93,10 +93,10 @@ void CEditorPreferencesPage_ViewportMovement::Reflect(AZ::SerializeContext& seri ->Field("OrbitDolly", &CameraInputSettings::m_orbitDollyChannelId) ->Field("OrbitPan", &CameraInputSettings::m_orbitPanChannelId); - serialize.Class() + serialize.Class() ->Version(1) - ->Field("CameraMovementSettings", &CEditorPreferencesPage_ViewportMovement::m_cameraMovementSettings) - ->Field("CameraInputSettings", &CEditorPreferencesPage_ViewportMovement::m_cameraInputSettings); + ->Field("CameraMovementSettings", &CEditorPreferencesPage_ViewportCamera::m_cameraMovementSettings) + ->Field("CameraInputSettings", &CEditorPreferencesPage_ViewportCamera::m_cameraInputSettings); if (AZ::EditContext* editContext = serialize.GetEditContext()) { @@ -208,35 +208,35 @@ void CEditorPreferencesPage_ViewportMovement::Reflect(AZ::SerializeContext& seri "Key/button to begin camera orbit pan") ->Attribute(AZ::Edit::Attributes::StringList, &GetEditorInputNames); - editContext->Class("Viewport Preferences", "Viewport Preferences") + editContext->Class("Viewport Preferences", "Viewport Preferences") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Visibility, AZ_CRC("PropertyVisibility_ShowChildrenOnly", 0xef428f20)) ->DataElement( - AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_ViewportMovement::m_cameraMovementSettings, + AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_ViewportCamera::m_cameraMovementSettings, "Camera Movement Settings", "Camera Movement Settings") ->DataElement( - AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_ViewportMovement::m_cameraInputSettings, "Camera Input Settings", + AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_ViewportCamera::m_cameraInputSettings, "Camera Input Settings", "Camera Input Settings"); } } -CEditorPreferencesPage_ViewportMovement::CEditorPreferencesPage_ViewportMovement() +CEditorPreferencesPage_ViewportCamera::CEditorPreferencesPage_ViewportCamera() { InitializeSettings(); m_icon = QIcon(":/res/Camera.svg"); } -const char* CEditorPreferencesPage_ViewportMovement::GetTitle() +const char* CEditorPreferencesPage_ViewportCamera::GetTitle() { return "Camera"; } -QIcon& CEditorPreferencesPage_ViewportMovement::GetIcon() +QIcon& CEditorPreferencesPage_ViewportCamera::GetIcon() { return m_icon; } -void CEditorPreferencesPage_ViewportMovement::OnApply() +void CEditorPreferencesPage_ViewportCamera::OnApply() { SandboxEditor::SetCameraTranslateSpeed(m_cameraMovementSettings.m_translateSpeed); SandboxEditor::SetCameraRotateSpeed(m_cameraMovementSettings.m_rotateSpeed); @@ -271,7 +271,7 @@ void CEditorPreferencesPage_ViewportMovement::OnApply() &SandboxEditor::EditorModularViewportCameraComposerNotificationBus::Events::OnEditorModularViewportCameraComposerSettingsChanged); } -void CEditorPreferencesPage_ViewportMovement::InitializeSettings() +void CEditorPreferencesPage_ViewportCamera::InitializeSettings() { m_cameraMovementSettings.m_translateSpeed = SandboxEditor::CameraTranslateSpeed(); m_cameraMovementSettings.m_rotateSpeed = SandboxEditor::CameraRotateSpeed(); diff --git a/Code/Editor/EditorPreferencesPageViewportMovement.h b/Code/Editor/EditorPreferencesPageViewportMovement.h index b7482fb048..64a3702432 100644 --- a/Code/Editor/EditorPreferencesPageViewportMovement.h +++ b/Code/Editor/EditorPreferencesPageViewportMovement.h @@ -19,15 +19,15 @@ inline AZ::Crc32 EditorPropertyVisibility(const bool enabled) return enabled ? AZ::Edit::PropertyVisibility::Show : AZ::Edit::PropertyVisibility::Hide; } -class CEditorPreferencesPage_ViewportMovement : public IPreferencesPage +class CEditorPreferencesPage_ViewportCamera : public IPreferencesPage { public: - AZ_RTTI(CEditorPreferencesPage_ViewportMovement, "{BC593332-7EAF-4171-8A35-1C5DE5B40909}", IPreferencesPage) + AZ_RTTI(CEditorPreferencesPage_ViewportCamera, "{BC593332-7EAF-4171-8A35-1C5DE5B40909}", IPreferencesPage) static void Reflect(AZ::SerializeContext& serialize); - CEditorPreferencesPage_ViewportMovement(); - virtual ~CEditorPreferencesPage_ViewportMovement() = default; + CEditorPreferencesPage_ViewportCamera(); + virtual ~CEditorPreferencesPage_ViewportCamera() = default; virtual const char* GetCategory() override { diff --git a/Code/Editor/PreferencesStdPages.cpp b/Code/Editor/PreferencesStdPages.cpp index 012a29368e..5cee5bd8da 100644 --- a/Code/Editor/PreferencesStdPages.cpp +++ b/Code/Editor/PreferencesStdPages.cpp @@ -35,7 +35,7 @@ CStdPreferencesClassDesc::CStdPreferencesClassDesc() [](){ return new CEditorPreferencesPage_General(); }, [](){ return new CEditorPreferencesPage_Files(); }, [](){ return new CEditorPreferencesPage_ViewportGeneral(); }, - [](){ return new CEditorPreferencesPage_ViewportMovement(); }, + [](){ return new CEditorPreferencesPage_ViewportCamera(); }, [](){ return new CEditorPreferencesPage_ViewportManipulator(); }, [](){ return new CEditorPreferencesPage_ViewportDebug(); } };