Delete code which was only commented out
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
This commit is contained in:
@@ -952,7 +952,8 @@ void Q2DViewport::DrawViewerMarker(DisplayContext& dc)
|
||||
dc.SetColor(QColor(0, 0, 255)); // blue
|
||||
dc.DrawWireBox(-dim * noScale, dim * noScale);
|
||||
|
||||
float fov = 60; // GetIEditor()->GetSystem()->GetViewCamera().GetFov();
|
||||
constexpr float DefaultFov = 60.f;
|
||||
float fov = DefaultFov;
|
||||
|
||||
Vec3 q[4];
|
||||
float dist = 30;
|
||||
|
||||
+2
-65
@@ -3728,24 +3728,12 @@ void CCryEditApp::OnToolsPreferences()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnSwitchToDefaultCamera()
|
||||
{
|
||||
//CViewport* vp = GetIEditor()->GetViewManager()->GetSelectedViewport();
|
||||
//if (CRenderViewport* rvp = viewport_cast<CRenderViewport*>(vp))
|
||||
//{
|
||||
// rvp->SetDefaultCamera();
|
||||
//}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnUpdateSwitchToDefaultCamera([[maybe_unused]] QAction* action)
|
||||
void CCryEditApp::OnUpdateSwitchToDefaultCamera(QAction* action)
|
||||
{
|
||||
Q_ASSERT(action->isCheckable());
|
||||
//CViewport* pViewport = GetIEditor()->GetViewManager()->GetSelectedViewport();
|
||||
//if (false) // (CRenderViewport* rvp = viewport_cast<CRenderViewport*>(pViewport))
|
||||
//{
|
||||
// action->setEnabled(true);
|
||||
// action->setChecked(rvp->IsDefaultCamera());
|
||||
//}
|
||||
//else
|
||||
{
|
||||
action->setEnabled(false);
|
||||
}
|
||||
@@ -3754,39 +3742,12 @@ void CCryEditApp::OnUpdateSwitchToDefaultCamera([[maybe_unused]] QAction* action
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnSwitchToSequenceCamera()
|
||||
{
|
||||
//CViewport* vp = GetIEditor()->GetViewManager()->GetSelectedViewport();
|
||||
//if (CRenderViewport* rvp = viewport_cast<CRenderViewport*>(vp))
|
||||
//{
|
||||
// rvp->SetSequenceCamera();
|
||||
//}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnUpdateSwitchToSequenceCamera(QAction* action)
|
||||
{
|
||||
Q_ASSERT(action->isCheckable());
|
||||
|
||||
//CViewport* pViewport = GetIEditor()->GetViewManager()->GetSelectedViewport();
|
||||
|
||||
//if (CRenderViewport* rvp = viewport_cast<CRenderViewport*>(pViewport))
|
||||
//{
|
||||
// bool enableAction = false;
|
||||
|
||||
// // only enable if we're editing a sequence in Track View and have cameras in the level
|
||||
// if (GetIEditor()->GetAnimation()->GetSequence())
|
||||
// {
|
||||
|
||||
// AZ::EBusAggregateResults<AZ::EntityId> componentCameras;
|
||||
// Camera::CameraBus::BroadcastResult(componentCameras, &Camera::CameraRequests::GetCameras);
|
||||
|
||||
// const int numCameras = componentCameras.values.size();
|
||||
// enableAction = (numCameras > 0);
|
||||
// }
|
||||
|
||||
// action->setEnabled(enableAction);
|
||||
// action->setChecked(rvp->IsSequenceCamera());
|
||||
//}
|
||||
//else
|
||||
{
|
||||
action->setEnabled(false);
|
||||
}
|
||||
@@ -3795,32 +3756,12 @@ void CCryEditApp::OnUpdateSwitchToSequenceCamera(QAction* action)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnSwitchToSelectedcamera()
|
||||
{
|
||||
//CViewport* vp = GetIEditor()->GetViewManager()->GetSelectedViewport();
|
||||
//if (CRenderViewport* rvp = viewport_cast<CRenderViewport*>(vp))
|
||||
//{
|
||||
// rvp->SetSelectedCamera();
|
||||
//}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnUpdateSwitchToSelectedCamera(QAction* action)
|
||||
{
|
||||
Q_ASSERT(action->isCheckable());
|
||||
(void)action;
|
||||
//AzToolsFramework::EntityIdList selectedEntityList;
|
||||
//AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(selectedEntityList, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
|
||||
//AZ::EBusAggregateResults<AZ::EntityId> cameras;
|
||||
//Camera::CameraBus::BroadcastResult(cameras, &Camera::CameraRequests::GetCameras);
|
||||
//bool isCameraComponentSelected = selectedEntityList.size() > 0 ? AZStd::find(cameras.values.begin(), cameras.values.end(), *selectedEntityList.begin()) != cameras.values.end() : false;
|
||||
|
||||
//CViewport* pViewport = GetIEditor()->GetViewManager()->GetSelectedViewport();
|
||||
//CRenderViewport* rvp = viewport_cast<CRenderViewport*>(pViewport);
|
||||
//if (isCameraComponentSelected && rvp)
|
||||
//{
|
||||
// action->setEnabled(true);
|
||||
// action->setChecked(rvp->IsSelectedCamera());
|
||||
//}
|
||||
//else
|
||||
{
|
||||
action->setEnabled(false);
|
||||
}
|
||||
@@ -3829,11 +3770,7 @@ void CCryEditApp::OnUpdateSwitchToSelectedCamera(QAction* action)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CCryEditApp::OnSwitchcameraNext()
|
||||
{
|
||||
//CViewport* vp = GetIEditor()->GetActiveView();
|
||||
//if (CRenderViewport* rvp = viewport_cast<CRenderViewport*>(vp))
|
||||
//{
|
||||
// rvp->CycleCamera();
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1524,33 +1524,6 @@ bool EditorViewportWidget::AddCameraMenuItems(QMenu* menu)
|
||||
customCameraMenu->addAction(cameraAction);
|
||||
}
|
||||
|
||||
// should this functionality be supported? You can already look through a camera entity
|
||||
// in multiple different ways, and this additional method of doing so seems unneccessary and confusing
|
||||
// (since it would select some arbitrary camera entity if there are multiple selected)
|
||||
|
||||
//action = customCameraMenu->addAction(tr("Look through entity"));
|
||||
//bool areAnyEntitiesSelected = false;
|
||||
//AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(areAnyEntitiesSelected, &AzToolsFramework::ToolsApplicationRequests::AreAnyEntitiesSelected);
|
||||
//action->setCheckable(areAnyEntitiesSelected || m_viewSourceType == ViewSourceType::AZ_Entity);
|
||||
//action->setEnabled(areAnyEntitiesSelected || m_viewSourceType == ViewSourceType::AZ_Entity);
|
||||
//action->setChecked(m_viewSourceType == ViewSourceType::AZ_Entity);
|
||||
//connect(action, &QAction::triggered, this, [this](bool isChecked)
|
||||
// {
|
||||
// if (isChecked)
|
||||
// {
|
||||
// AzToolsFramework::EntityIdList selectedEntityList;
|
||||
// AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(selectedEntityList, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
|
||||
// if (selectedEntityList.size())
|
||||
// {
|
||||
// SetEntityAsCamera(*selectedEntityList.begin());
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SetDefaultCamera();
|
||||
// }
|
||||
// });
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2212,14 +2185,10 @@ bool EditorViewportWidget::HitTest(const QPoint& point, HitContext& hitInfo)
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool EditorViewportWidget::IsBoundsVisible(const AABB& box) const
|
||||
bool EditorViewportWidget::IsBoundsVisible(const AABB&) const
|
||||
{
|
||||
AZ_Assert(false, "Not supported");
|
||||
(void)box;
|
||||
return false;
|
||||
|
||||
// If at least part of bbox is visible then its visible.
|
||||
//return m_Camera.IsAABBVisible_F(AABB(box.min, box.max));
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -2333,7 +2302,7 @@ float EditorViewportWidget::GetFOV() const
|
||||
{
|
||||
if (m_viewEntityId.IsValid())
|
||||
{
|
||||
float fov = 0.f; // AZ::RadToDeg(m_camFOV);
|
||||
float fov = 0.f;
|
||||
Camera::CameraRequestBus::EventResult(fov, m_viewEntityId, &Camera::CameraComponentRequests::GetFovRadians);
|
||||
return fov;
|
||||
}
|
||||
@@ -2504,17 +2473,6 @@ void EditorViewportWidget::CycleCamera()
|
||||
SetFirstComponentCamera();
|
||||
break;
|
||||
}
|
||||
//case EditorViewportWidget::ViewSourceType::SequenceCamera:
|
||||
//{
|
||||
// AZ_Error("EditorViewportWidget", false, "Legacy cameras no longer exist, unable to set sequence camera.");
|
||||
// break;
|
||||
//}
|
||||
//case EditorViewportWidget::ViewSourceType::LegacyCamera:
|
||||
//{
|
||||
// AZ_Warning("EditorViewportWidget", false, "Legacy cameras no longer exist, using first found component camera instead.");
|
||||
// SetFirstComponentCamera();
|
||||
// break;
|
||||
//}
|
||||
case EditorViewportWidget::ViewSourceType::CameraComponent:
|
||||
{
|
||||
AZ::EBusAggregateResults<AZ::EntityId> results;
|
||||
@@ -2533,12 +2491,6 @@ void EditorViewportWidget::CycleCamera()
|
||||
SetDefaultCamera();
|
||||
break;
|
||||
}
|
||||
//case EditorViewportWidget::ViewSourceType::AZ_Entity:
|
||||
//{
|
||||
// // we may decide to have this iterate over just selected entities
|
||||
// SetDefaultCamera();
|
||||
// break;
|
||||
//}
|
||||
default:
|
||||
{
|
||||
SetDefaultCamera();
|
||||
@@ -2889,7 +2841,7 @@ float EditorViewportSettings::AngleStep() const
|
||||
|
||||
AZ_CVAR_EXTERNED(bool, ed_previewGameInFullscreen_once);
|
||||
|
||||
bool EditorViewportWidget::ShouldPreviewFullscreen()
|
||||
bool EditorViewportWidget::ShouldPreviewFullscreen() const
|
||||
{
|
||||
CLayoutWnd* layout = GetIEditor()->GetViewManager()->GetLayout();
|
||||
if (!layout)
|
||||
|
||||
@@ -662,12 +662,6 @@ bool CExportManager::ProcessObjectsForExport()
|
||||
GetIEditor()->GetAnimation()->SetRecording(false);
|
||||
GetIEditor()->GetAnimation()->SetPlaying(false);
|
||||
|
||||
//CViewport* vp = GetIEditor()->GetViewManager()->GetSelectedViewport();
|
||||
//if (CRenderViewport* rvp = viewport_cast<CRenderViewport*>(vp))
|
||||
//{
|
||||
// rvp->SetSequenceCamera();
|
||||
//}
|
||||
|
||||
int startFrame = 0;
|
||||
timeValue = startFrame * fpsTimeInterval;
|
||||
|
||||
|
||||
@@ -1331,7 +1331,6 @@ void CObjectManager::FindDisplayableObjects(DisplayContext& dc, [[maybe_unused]]
|
||||
|
||||
pDispayedViewObjects->SetSerialNumber(m_visibilitySerialNumber); // update viewport to be latest serial number
|
||||
|
||||
//const CCamera& camera = GetIEditor()->GetSystem()->GetViewCamera();
|
||||
AABB bbox;
|
||||
bbox.min.zero();
|
||||
bbox.max.zero();
|
||||
@@ -1380,11 +1379,9 @@ void CObjectManager::FindDisplayableObjects(DisplayContext& dc, [[maybe_unused]]
|
||||
{
|
||||
CBaseObject* obj = m_visibleObjects[i];
|
||||
|
||||
if (obj /* && obj->IsInCameraView(camera)*/)
|
||||
if (obj)
|
||||
{
|
||||
// Check if object is too far.
|
||||
// float visRatio = obj->GetCameraVisRatio(camera);
|
||||
if (/*visRatio > m_maxObjectViewDistRatio || */ (dc.flags & DISPLAY_SELECTION_HELPERS) || obj->IsSelected())
|
||||
if ((dc.flags & DISPLAY_SELECTION_HELPERS) || obj->IsSelected())
|
||||
{
|
||||
pDispayedViewObjects->AddObject(obj);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,6 @@ CViewManager::CViewManager()
|
||||
else
|
||||
{
|
||||
AZ_Assert(false, "Non-Atom viewport no longer supported");
|
||||
//RegisterQtViewPaneWithName<CRenderViewport>(GetIEditor(), "Perspective", LyViewPane::CategoryViewport, viewportOptions);
|
||||
}
|
||||
|
||||
viewportOptions.viewportType = ET_ViewportMap;
|
||||
@@ -252,11 +251,6 @@ void CViewManager::SelectViewport(CViewport* pViewport)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CViewport* CViewManager::GetGameViewport() const
|
||||
{
|
||||
//if (CRenderViewport::GetPrimaryViewport())
|
||||
//{
|
||||
// return CRenderViewport::GetPrimaryViewport();
|
||||
//}
|
||||
|
||||
return GetViewport(ET_ViewportCamera);;
|
||||
}
|
||||
|
||||
|
||||
@@ -618,12 +618,6 @@ ILevel* CLevelSystem::LoadLevelInternal(const char* _levelName)
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the camera to (1,1,1) (not (0,0,0) which is the invalid/uninitialised state,
|
||||
// to avoid the hack in the renderer to not show anything if the camera is at the origin).
|
||||
//CCamera defaultCam;
|
||||
//defaultCam.SetPosition(Vec3(1.0f));
|
||||
//m_pSystem->SetViewCamera(defaultCam);
|
||||
|
||||
m_pLoadingLevelInfo = pLevelInfo;
|
||||
OnLoadingStart(levelName);
|
||||
|
||||
@@ -952,10 +946,6 @@ void CLevelSystem::UnloadLevel()
|
||||
oAudioRequestData.pData = &oAMData3;
|
||||
Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData);
|
||||
|
||||
// Reset the camera to (0,0,0) which is the invalid/uninitialised state
|
||||
//CCamera defaultCam;
|
||||
//m_pSystem->SetViewCamera(defaultCam);
|
||||
|
||||
OnUnloadComplete(m_lastLevelName.c_str());
|
||||
|
||||
// -- kenzo: this will close all pack files for this level
|
||||
|
||||
@@ -268,12 +268,6 @@ namespace LegacyLevelSystem
|
||||
// This is a workaround until the replacement for GameEntityContext is done
|
||||
AzFramework::GameEntityContextEventBus::Broadcast(&AzFramework::GameEntityContextEventBus::Events::OnPreGameEntitiesStarted);
|
||||
|
||||
// Reset the camera to (1,1,1) (not (0,0,0) which is the invalid/uninitialised state,
|
||||
// to avoid the hack in the renderer to not show anything if the camera is at the origin).
|
||||
CCamera defaultCam;
|
||||
defaultCam.SetPosition(Vec3(1.0f));
|
||||
//m_pSystem->SetViewCamera(defaultCam);
|
||||
|
||||
OnLoadingStart(levelName);
|
||||
|
||||
auto pPak = gEnv->pCryPak;
|
||||
@@ -587,10 +581,6 @@ namespace LegacyLevelSystem
|
||||
oAudioRequestData.pData = &oAMData3;
|
||||
Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData);
|
||||
|
||||
// Reset the camera to (0,0,0) which is the invalid/uninitialised state
|
||||
//CCamera defaultCam;
|
||||
//m_pSystem->SetViewCamera(defaultCam);
|
||||
|
||||
OnUnloadComplete(m_lastLevelName.c_str());
|
||||
|
||||
AzFramework::RootSpawnableInterface::Get()->ReleaseRootSpawnable();
|
||||
|
||||
@@ -58,10 +58,10 @@ DebugCamera::~DebugCamera()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void DebugCamera::OnEnable()
|
||||
{
|
||||
m_position = Vec3_Zero; // gEnv->pSystem->GetViewCamera().GetPosition();
|
||||
m_position = Vec3_Zero;
|
||||
m_moveInput = Vec3_Zero;
|
||||
|
||||
Ang3 cameraAngles = Ang3(ZERO); // Ang3(gEnv->pSystem->GetViewCamera().GetMatrix());
|
||||
Ang3 cameraAngles = Ang3(ZERO);
|
||||
m_cameraYaw = RAD2DEG(cameraAngles.z);
|
||||
m_cameraPitch = RAD2DEG(cameraAngles.x);
|
||||
m_view = Matrix33(Ang3(DEG2RAD(m_cameraPitch), 0.0f, DEG2RAD(m_cameraYaw)));
|
||||
@@ -126,13 +126,6 @@ void DebugCamera::Update()
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
void DebugCamera::PostUpdate()
|
||||
{
|
||||
//if (m_cameraMode == DebugCamera::ModeOff)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
|
||||
//CCamera& camera = gEnv->pSystem->GetViewCamera();
|
||||
//camera.SetMatrix(Matrix34(m_view, m_position));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -59,77 +59,6 @@ void CView::Update(float frameTime, bool isActive)
|
||||
{
|
||||
(void)(frameTime, isActive);
|
||||
AZ_ErrorOnce("CryLegacy", false, "CryLegacy view system no longer available (CView::Update)");
|
||||
////FIXME:some cameras may need to be updated always
|
||||
//if (!isActive)
|
||||
//{
|
||||
// return;
|
||||
//}
|
||||
|
||||
//if (m_azEntity)
|
||||
//{
|
||||
// m_viewParams.SaveLast();
|
||||
|
||||
// CCamera* pSysCam = &m_pSystem->GetViewCamera();
|
||||
|
||||
// //process screen shaking
|
||||
// ProcessShaking(frameTime);
|
||||
|
||||
// //FIXME:to let the updateView implementation use the correct shakeVector
|
||||
// m_viewParams.currentShakeShift = m_viewParams.rotation * m_viewParams.currentShakeShift;
|
||||
|
||||
// m_viewParams.frameTime = frameTime;
|
||||
// //update view position/rotation
|
||||
// if (m_azEntity != nullptr)
|
||||
// {
|
||||
// auto entityTransform = m_azEntity->GetTransform();
|
||||
// if (entityTransform != nullptr)
|
||||
// {
|
||||
// AZ::Transform transform = entityTransform->GetWorldTM();
|
||||
// m_viewParams.position = AZVec3ToLYVec3(transform.GetTranslation());
|
||||
// m_viewParams.rotation = AZQuaternionToLYQuaternion(transform.GetRotation());
|
||||
// }
|
||||
// }
|
||||
|
||||
// ApplyFrameAdditiveAngles(m_viewParams.rotation);
|
||||
|
||||
// const float fNearZ = gEnv->pSystem->GetIViewSystem()->GetDefaultZNear();
|
||||
|
||||
// //see if the view have to use a custom near clipping plane
|
||||
// const float nearPlane = (m_viewParams.nearplane >= CAMERA_MIN_NEAR) ? (m_viewParams.nearplane) : fNearZ;
|
||||
// const float farPlane = (m_viewParams.farplane > 0.f) ? m_viewParams.farplane : DEFAULT_FAR;
|
||||
// float fov = (m_viewParams.fov < 0.001f) ? DEFAULT_FOV : m_viewParams.fov;
|
||||
|
||||
// m_camera.SetFrustum(pSysCam->GetViewSurfaceX(), pSysCam->GetViewSurfaceZ(), fov, nearPlane, farPlane, pSysCam->GetPixelAspectRatio());
|
||||
|
||||
// //apply shake & set the view matrix
|
||||
// m_viewParams.rotation *= m_viewParams.currentShakeQuat;
|
||||
// m_viewParams.rotation.NormalizeSafe();
|
||||
// m_viewParams.position += m_viewParams.currentShakeShift;
|
||||
|
||||
// // Blending between cameras needs to happen after Camera space rendering calculations have been applied
|
||||
// // so that the m_viewParams.position is in World Space again
|
||||
// m_viewParams.UpdateBlending(frameTime);
|
||||
|
||||
// // [VR] specific
|
||||
// // Add HMD's pose tracking on top of current camera pose
|
||||
// // Each game-title can decide whether to keep this functionality here or (most likely)
|
||||
// // move it somewhere else.
|
||||
|
||||
// Quat q = m_viewParams.rotation;
|
||||
// Vec3 pos = m_viewParams.position;
|
||||
// Vec3 p = Vec3(ZERO);
|
||||
|
||||
// Matrix34 viewMtx(q);
|
||||
// viewMtx.SetTranslation(pos + p);
|
||||
// m_camera.SetMatrix(viewMtx);
|
||||
|
||||
// m_camera.SetEntityRotation(m_viewParams.rotation);
|
||||
// m_camera.SetEntityPos(pos);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// m_linkedTo = AZ::EntityId(0);
|
||||
//}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -254,7 +254,6 @@ void CViewSystem::Update(float frameTime)
|
||||
}
|
||||
|
||||
AZ_ErrorOnce("CryLegacy", false, "CryLegacy view system no longer available (CViewSystem::Update)");
|
||||
//m_pSystem->SetViewCamera(rCamera);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,24 +558,6 @@ void CViewSystem::SetOverrideCameraRotation(bool bOverride, Quat rotation)
|
||||
void CViewSystem::UpdateSoundListeners()
|
||||
{
|
||||
AZ_ErrorOnce("CryLegacy", false, "CryLegacy view system no longer available (CViewSystem::UpdateSoundListeners)");
|
||||
|
||||
//assert(gEnv->IsEditor() && !gEnv->IsEditorGameMode());
|
||||
|
||||
//// In Editor we may want to control global listeners outside of the game view.
|
||||
//if (m_bControlsAudioListeners)
|
||||
//{
|
||||
// IView* const pActiveView = static_cast<IView*>(GetActiveView());
|
||||
// TViewMap::const_iterator Iter(m_views.begin());
|
||||
// TViewMap::const_iterator const IterEnd(m_views.end());
|
||||
|
||||
// for (; Iter != IterEnd; ++Iter)
|
||||
// {
|
||||
// IView* const pView = Iter->second;
|
||||
// bool const bIsActive = (pView == pActiveView);
|
||||
// CCamera const& rCamera = bIsActive ? gEnv->pSystem->GetViewCamera() : pView->GetCamera();
|
||||
// pView->UpdateAudioListener(rCamera.GetMatrix());
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -158,36 +158,6 @@ namespace Camera
|
||||
/// Maestro::EditorSequenceNotificationBus::Handler
|
||||
void CameraListModel::OnSequenceSelected(const AZ::EntityId& )
|
||||
{
|
||||
// Add or Remove the Sequence Camera option if a valid
|
||||
// sequence is selected in Track View.
|
||||
|
||||
// Check to see if the Sequence Camera option is already present
|
||||
//bool found = false;
|
||||
//int index = 0;
|
||||
//for (const CameraListItem& cameraItem : m_cameraItems)
|
||||
//{
|
||||
// if (cameraItem.m_cameraName == m_sequenceCameraName)
|
||||
// {
|
||||
// found = true;
|
||||
// break;
|
||||
// }
|
||||
// ++index;
|
||||
//}
|
||||
|
||||
//// If it is present, but no sequence is selected, removed it.
|
||||
//if (found && !sequenceEntityId.IsValid())
|
||||
//{
|
||||
// beginRemoveRows(QModelIndex(), index, index);
|
||||
// m_cameraItems.erase(m_cameraItems.begin() + index);
|
||||
// endRemoveRows();
|
||||
//}
|
||||
//// If it is not present, and there is a sequence selected show it.
|
||||
//else if (!found && sequenceEntityId.IsValid())
|
||||
//{
|
||||
// beginInsertRows(QModelIndex(), rowCount(), rowCount());
|
||||
// m_cameraItems.push_back(CameraListItem(m_sequenceCameraName, sequenceEntityId));
|
||||
// endInsertRows();
|
||||
//}
|
||||
}
|
||||
|
||||
QModelIndex CameraListModel::GetIndexForEntityId(const AZ::EntityId entityId)
|
||||
@@ -204,8 +174,6 @@ namespace Camera
|
||||
return index(row, 0);
|
||||
}
|
||||
|
||||
//const char* CameraListModel::m_sequenceCameraName = "Sequence camera";
|
||||
|
||||
ViewportCameraSelectorWindow::ViewportCameraSelectorWindow(QWidget* parent)
|
||||
: m_ignoreViewportViewEntityChanged(false)
|
||||
{
|
||||
@@ -254,9 +222,6 @@ namespace Camera
|
||||
{
|
||||
if (current.row() != previous.row())
|
||||
{
|
||||
// Lock camera editing when in sequence camera mode.
|
||||
//const AZStd::string& selectedCameraName = selectionModel()->currentIndex().data(Qt::DisplayRole).toString().toUtf8().data();
|
||||
//bool lockCameraMovement = (selectedCameraName == CameraListModel::m_sequenceCameraName);
|
||||
bool lockCameraMovement = false;
|
||||
|
||||
QScopedValueRollback<bool> rb(m_ignoreViewportViewEntityChanged, true);
|
||||
@@ -313,14 +278,6 @@ namespace Camera
|
||||
{
|
||||
AZ_UNUSED(oldCameraEntityId);
|
||||
AZ_UNUSED(newCameraEntityId);
|
||||
|
||||
//// If the Sequence camera option is selected, respond to camera changes by selecting the camera used by the sequence.
|
||||
//const AZStd::string& selectedCameraName = selectionModel()->currentIndex().data(Qt::DisplayRole).toString().toUtf8().data();
|
||||
//if (selectedCameraName == CameraListModel::m_sequenceCameraName)
|
||||
//{
|
||||
// QScopedValueRollback<bool> rb(m_ignoreViewportViewEntityChanged, true);
|
||||
// EditorCameraRequests::Bus::Broadcast(&EditorCameraRequests::SetViewAndMovementLockFromEntityPerspective, newCameraEntityId, true);
|
||||
//}
|
||||
}
|
||||
|
||||
// swallow mouse move events so we can disable sloppy selection
|
||||
|
||||
@@ -55,9 +55,6 @@ namespace Camera
|
||||
, public Maestro::EditorSequenceNotificationBus::Handler
|
||||
{
|
||||
public:
|
||||
|
||||
//static const char* m_sequenceCameraName;
|
||||
|
||||
CameraListModel(ViewportCameraSelectorWindow* myParent);
|
||||
~CameraListModel();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user