Merge pull request #51 from aws-lumberyard-dev/nvsickle/EnableAtomViewport
Switch on the Atom-native viewport by default
This commit is contained in:
@@ -65,7 +65,7 @@ namespace AzToolsFramework
|
||||
|
||||
if (!contextMenu.m_menu->isEmpty())
|
||||
{
|
||||
contextMenu.m_menu->popup(QCursor::pos());
|
||||
contextMenu.m_menu->exec(QCursor::pos());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,6 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra
|
||||
m_inRotateMode = true;
|
||||
}
|
||||
|
||||
shouldConsumeEvent = true;
|
||||
shouldCaptureCursor = true;
|
||||
}
|
||||
else if (state == InputChannel::State::Ended)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <AzFramework/API/AtomActiveInterface.h>
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
|
||||
AZ_CVAR(bool, ed_useAtomNativeViewport, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Atom-native Editor viewport (experimental, not yet stable");
|
||||
AZ_CVAR(bool, ed_useAtomNativeViewport, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Atom-native Editor viewport (experimental, not yet stable");
|
||||
|
||||
bool CViewManager::IsMultiViewportEnabled()
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
static const auto ManipulatorPriority = AzFramework::ViewportControllerPriority::Highest;
|
||||
static const auto InteractionPriority = AzFramework::ViewportControllerPriority::High;
|
||||
static const auto ManipulatorPriority = AzFramework::ViewportControllerPriority::High;
|
||||
static const auto InteractionPriority = AzFramework::ViewportControllerPriority::Low;
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
|
||||
@@ -98,15 +98,16 @@ namespace Camera
|
||||
AZ_Assert(m_atomCamera, "Attempted to activate Atom camera before component activation");
|
||||
|
||||
const AZ::Name contextName = atomViewportRequests->GetDefaultViewportContextName();
|
||||
atomViewportRequests->PushView(contextName, m_atomCamera);
|
||||
AZ::RPI::ViewportContextNotificationBus::Handler::BusConnect(contextName);
|
||||
|
||||
// Ensure the Atom camera is updated with our current transform state
|
||||
AZ::Transform localTransform;
|
||||
AZ::TransformBus::EventResult(localTransform, m_entityId, &AZ::TransformBus::Events::GetLocalTM);
|
||||
AZ::Transform worldTransform;
|
||||
AZ::TransformBus::EventResult(worldTransform, m_entityId, &AZ::TransformBus::Events::GetWorldTM);
|
||||
OnTransformChanged(localTransform, worldTransform);
|
||||
|
||||
// Push the Atom camera after we make sure we're up-to-date with our component's transform to ensure the viewport reads the correct state
|
||||
atomViewportRequests->PushView(contextName, m_atomCamera);
|
||||
AZ::RPI::ViewportContextNotificationBus::Handler::BusConnect(contextName);
|
||||
UpdateCamera();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user