Camera Component, Editor Viewport Widget refactoring.

- Handle changing of active camera entirely inside CameraComponentController
- Remove a LOT of legacy Cry things related to cameras
- Add a CameraSystemComponent to handle ActiveCameraRequestBus and CameraSystemRequestBus

Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
This commit is contained in:
Yuriy Toporovskyy
2021-08-04 10:39:57 -04:00
parent 6d2765ef42
commit 73fee0c57e
47 changed files with 1126 additions and 6046 deletions
@@ -44,7 +44,12 @@ namespace
{
const int g_useActiveViewportResolution = -1; // reserved value to indicate the use of the active viewport resolution
int resolutions[][2] = {
{ 1280, 720 }, { 1920, 1080 }, { 1998, 1080 }, { 2048, 858 }, { 2560, 1440 },
{1280, 720},
{1920, 1080},
{1998, 1080},
{2048, 858},
{2560, 1440},
{3840, 2160},
{ g_useActiveViewportResolution, g_useActiveViewportResolution } // active viewport res must be the last element of the resolution array
};
@@ -1067,6 +1072,10 @@ void CSequenceBatchRenderDialog::OnUpdateEnd(IAnimSequence* sequence)
{
GetIEditor()->GetMovieSystem()->DisableFixedStepForCapture();
// Important: End batch render mode BEFORE leaving Game Mode.
// Otherwise track view will set the active camera based on the directors in the current sequence while leaving game mode
GetIEditor()->GetMovieSystem()->EnableBatchRenderMode(false);
GetIEditor()->GetMovieSystem()->RemoveMovieListener(sequence, this);
GetIEditor()->SetInGameMode(false);
GetIEditor()->GetGameEngine()->Update(); // Update is needed because SetInGameMode() queues game mode, Update() executes it.
@@ -1186,7 +1195,6 @@ void CSequenceBatchRenderDialog::OnUpdateFinalize()
m_ui->m_pGoBtn->setText(tr("Start"));
m_ui->m_pGoBtn->setIcon(QPixmap(":/Trackview/clapperboard_ready.png"));
GetIEditor()->GetMovieSystem()->EnableBatchRenderMode(false);
m_renderContext.currentItemIndex = -1;
m_ui->BATCH_RENDER_PRESS_ESC_TO_CANCEL->setText(m_ffmpegPluginStatusMsg);