First step removing legacy code from the camera

Signed-off-by: aaguilea <aaguilea@amazon.com>
This commit is contained in:
aaguilea
2021-08-10 09:19:16 +01:00
parent 868d718a18
commit d124044498
4 changed files with 4 additions and 642 deletions
+4 -12
View File
@@ -72,7 +72,6 @@
#include "IPostEffectGroup.h"
#include "EditorPreferencesPageGeneral.h"
#include "ViewportManipulatorController.h"
#include "LegacyViewportCameraController.h"
#include "ViewPane.h"
#include "CustomResolutionDlg.h"
@@ -102,14 +101,13 @@
AZ_CVAR(
bool, ed_visibility_logTiming, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Output the timing of the new IVisibilitySystem query");
AZ_CVAR(bool, ed_useNewCameraSystem, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Editor camera system");
AZ_CVAR(bool, ed_showCursorCameraLook, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Show the cursor when using free look with the new camera system");
namespace SandboxEditor
{
bool UsingNewCameraSystem()
{
return ed_useNewCameraSystem;
return true;
}
} // namespace SandboxEditor
@@ -1476,14 +1474,9 @@ void EditorViewportWidget::SetViewportId(int id)
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::ViewportManipulatorController>());
if (ed_useNewCameraSystem)
{
m_renderViewport->GetControllerList()->Add(CreateModularViewportCameraController(AzFramework::ViewportId(id)));
}
else
{
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::LegacyViewportCameraController>());
}
m_renderViewport->GetControllerList()->Add(CreateModularViewportCameraController(AzFramework::ViewportId(id)));
m_renderViewport->SetViewportSettings(&g_EditorViewportSettings);
@@ -2519,7 +2512,6 @@ void EditorViewportWidget::CenterOnAABB(const AABB& aabb)
m_orbitDistance = fabs(m_orbitDistance);
SetViewTM(newTM);
SandboxEditor::OrbitCameraControlsBus::Event(GetViewportId(), &SandboxEditor::OrbitCameraControlsBus::Events::SetOrbitDistance, m_orbitDistance);
}
void EditorViewportWidget::CenterOnSliceInstance()