|
|
|
@ -1334,39 +1334,6 @@ namespace AzToolsFramework
|
|
|
|
EndRecordManipulatorCommand();
|
|
|
|
EndRecordManipulatorCommand();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// surface
|
|
|
|
|
|
|
|
translationManipulators->InstallSurfaceManipulatorMouseDownCallback(
|
|
|
|
|
|
|
|
[this, manipulatorEntityIds]([[maybe_unused]] const SurfaceManipulator::Action& action)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BuildSortedEntityIdVectorFromEntityIdMap(m_entityIdManipulators.m_lookups, manipulatorEntityIds->m_entityIds);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InitializeTranslationLookup(m_entityIdManipulators);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_axisPreview.m_translation = m_entityIdManipulators.m_manipulators->GetLocalTransform().GetTranslation();
|
|
|
|
|
|
|
|
m_axisPreview.m_orientation = QuaternionFromTransformNoScaling(m_entityIdManipulators.m_manipulators->GetLocalTransform());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// [ref 1.]
|
|
|
|
|
|
|
|
BeginRecordManipulatorCommand();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
translationManipulators->InstallSurfaceManipulatorMouseMoveCallback(
|
|
|
|
|
|
|
|
[this, prevModifiers, manipulatorEntityIds](const SurfaceManipulator::Action& action) mutable
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
UpdateTranslationManipulator(
|
|
|
|
|
|
|
|
action, manipulatorEntityIds->m_entityIds, m_entityIdManipulators, m_pivotOverrideFrame, prevModifiers,
|
|
|
|
|
|
|
|
m_transformChangedInternally, m_spaceCluster.m_spaceLock);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
translationManipulators->InstallSurfaceManipulatorMouseUpCallback(
|
|
|
|
|
|
|
|
[this, manipulatorEntityIds]([[maybe_unused]] const SurfaceManipulator::Action& action)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AzToolsFramework::EditorTransformChangeNotificationBus::Broadcast(
|
|
|
|
|
|
|
|
&AzToolsFramework::EditorTransformChangeNotificationBus::Events::OnEntityTransformChanged,
|
|
|
|
|
|
|
|
manipulatorEntityIds->m_entityIds);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EndRecordManipulatorCommand();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// transfer ownership
|
|
|
|
// transfer ownership
|
|
|
|
m_entityIdManipulators.m_manipulators = AZStd::move(translationManipulators);
|
|
|
|
m_entityIdManipulators.m_manipulators = AZStd::move(translationManipulators);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|