Fix track view bug where postfxs do not render correctly. (#5465)

* Fix track view bug where postfxs do not render correctly.

Signed-off-by: hershey5045 <43485729+hershey5045@users.noreply.github.com>

* Reduce scope and add comments.

Signed-off-by: hershey5045 <43485729+hershey5045@users.noreply.github.com>
This commit is contained in:
hershey5045
2021-11-10 16:03:50 -08:00
committed by GitHub
parent 27f0aa7f13
commit 9c57c9e64f
6 changed files with 61 additions and 6 deletions
@@ -16,6 +16,7 @@
#include <AzCore/Component/ComponentApplication.h>
#include <AzFramework/Windowing/WindowBus.h>
#include <Atom/RPI.Public/ViewProviderBus.h>
// Qt
#include <QAction>
@@ -91,9 +92,12 @@ namespace
static void UpdateAtomOutputFrameCaptureView(TrackView::AtomOutputFrameCapture& atomOutputFrameCapture, const int width, const int height)
{
const AZ::EntityId activeCameraEntityId = TrackView::ActiveCameraEntityId();
AZ::RPI::ViewPtr view = nullptr;
AZ::RPI::ViewProviderBus::EventResult(view, activeCameraEntityId, &AZ::RPI::ViewProvider::GetView);
atomOutputFrameCapture.UpdateView(
TrackView::TransformFromEntityId(activeCameraEntityId),
TrackView::ProjectionFromCameraEntityId(activeCameraEntityId, static_cast<float>(width), static_cast<float>(height)));
TrackView::ProjectionFromCameraEntityId(activeCameraEntityId, aznumeric_cast<float>(width), aznumeric_cast<float>(height)),
view);
}
CSequenceBatchRenderDialog::CSequenceBatchRenderDialog(float fps, QWidget* pParent /* = nullptr */)