Add 'Goto entity' support for the new Editor camera (#743)
* add find entity in viewport functionality to new camera * fix AZ_CVAR usage * updates following review feedback - updated comment styles from /// to //! - retrieve fov of camera (add test for fov access) * update namespace naming, fix AZ_CVAR usage * update missed namespace and use AZ::Transform::CreateLookAt * add missing include * move EditorViewportSettings to EditorLib * update DLL import/export API and rename namespace usage
This commit is contained in:
committed by
GitHub
parent
1c1b34cf76
commit
f4106fe73f
@@ -874,9 +874,9 @@ void MainWindow::InitActions()
|
||||
.SetCheckable(true)
|
||||
.RegisterUpdateCallback([](QAction* action) {
|
||||
Q_ASSERT(action->isCheckable());
|
||||
action->setChecked(Editor::GridSnappingEnabled());
|
||||
action->setChecked(SandboxEditor::GridSnappingEnabled());
|
||||
})
|
||||
.Connect(&QAction::triggered, []() { Editor::SetGridSnapping(!Editor::GridSnappingEnabled()); });
|
||||
.Connect(&QAction::triggered, []() { SandboxEditor::SetGridSnapping(!SandboxEditor::GridSnappingEnabled()); });
|
||||
|
||||
am->AddAction(ID_SNAPANGLE, tr("Snap angle"))
|
||||
.SetIcon(Style::icon("Angle"))
|
||||
@@ -885,9 +885,9 @@ void MainWindow::InitActions()
|
||||
.SetCheckable(true)
|
||||
.RegisterUpdateCallback([](QAction* action) {
|
||||
Q_ASSERT(action->isCheckable());
|
||||
action->setChecked(Editor::AngleSnappingEnabled());
|
||||
action->setChecked(SandboxEditor::AngleSnappingEnabled());
|
||||
})
|
||||
.Connect(&QAction::triggered, []() { Editor::SetAngleSnapping(!Editor::AngleSnappingEnabled()); });
|
||||
.Connect(&QAction::triggered, []() { SandboxEditor::SetAngleSnapping(!SandboxEditor::AngleSnappingEnabled()); });
|
||||
|
||||
// Display actions
|
||||
am->AddAction(ID_WIREFRAME, tr("&Wireframe"))
|
||||
@@ -1275,12 +1275,12 @@ QWidget* MainWindow::CreateSnapToGridWidget()
|
||||
{
|
||||
SnapToWidget::SetValueCallback setCallback = [](double snapStep)
|
||||
{
|
||||
Editor::SetGridSnappingSize(snapStep);
|
||||
SandboxEditor::SetGridSnappingSize(snapStep);
|
||||
};
|
||||
|
||||
SnapToWidget::GetValueCallback getCallback = []()
|
||||
{
|
||||
return Editor::GridSnappingSize();
|
||||
return SandboxEditor::GridSnappingSize();
|
||||
};
|
||||
|
||||
return new SnapToWidget(m_actionManager->GetAction(ID_SNAP_TO_GRID), setCallback, getCallback);
|
||||
@@ -1290,12 +1290,12 @@ QWidget* MainWindow::CreateSnapToAngleWidget()
|
||||
{
|
||||
SnapToWidget::SetValueCallback setCallback = [](double snapAngle)
|
||||
{
|
||||
Editor::SetAngleSnappingSize(snapAngle);
|
||||
SandboxEditor::SetAngleSnappingSize(snapAngle);
|
||||
};
|
||||
|
||||
SnapToWidget::GetValueCallback getCallback = []()
|
||||
{
|
||||
return Editor::AngleSnappingSize();
|
||||
return SandboxEditor::AngleSnappingSize();
|
||||
};
|
||||
|
||||
return new SnapToWidget(m_actionManager->GetAction(ID_SNAPANGLE), setCallback, getCallback);
|
||||
|
||||
Reference in New Issue
Block a user