Deprecate profiler categories based on global enum
(to be supplanted by registered budgets in the future) Signed-off-by: Jeremy Ong <jcong@amazon.com>
This commit is contained in:
@@ -1047,7 +1047,7 @@ static bool TryRenameFile(const QString& oldPath, const QString& newPath, int re
|
||||
|
||||
bool CCryEditDoc::SaveLevel(const QString& filename)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
QWaitCursor wait;
|
||||
|
||||
CAutoCheckOutDialogEnableForAll enableForAll;
|
||||
@@ -1067,7 +1067,7 @@ bool CCryEditDoc::SaveLevel(const QString& filename)
|
||||
|
||||
{
|
||||
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "CCryEditDoc::SaveLevel BackupBeforeSave");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "CCryEditDoc::SaveLevel BackupBeforeSave");
|
||||
BackupBeforeSave();
|
||||
}
|
||||
|
||||
@@ -1178,7 +1178,7 @@ bool CCryEditDoc::SaveLevel(const QString& filename)
|
||||
CPakFile pakFile;
|
||||
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "CCryEditDoc::SaveLevel Open PakFile");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "CCryEditDoc::SaveLevel Open PakFile");
|
||||
if (!pakFile.Open(tempSaveFile.toUtf8().data(), false))
|
||||
{
|
||||
gEnv->pLog->LogWarning("Unable to open pack file %s for writing", tempSaveFile.toUtf8().data());
|
||||
@@ -1209,7 +1209,7 @@ bool CCryEditDoc::SaveLevel(const QString& filename)
|
||||
|
||||
AZ::IO::ByteContainerStream<AZStd::vector<char>> entitySaveStream(&entitySaveBuffer);
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "CCryEditDoc::SaveLevel Save Entities To Stream");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "CCryEditDoc::SaveLevel Save Entities To Stream");
|
||||
EBUS_EVENT_RESULT(
|
||||
savedEntities, AzToolsFramework::EditorEntityContextRequestBus, SaveToStreamForEditor, entitySaveStream, layerEntities,
|
||||
instancesInLayers);
|
||||
@@ -1223,7 +1223,7 @@ bool CCryEditDoc::SaveLevel(const QString& filename)
|
||||
|
||||
if (savedEntities)
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "CCryEditDoc::SaveLevel Updated PakFile levelEntities.editor_xml");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "CCryEditDoc::SaveLevel Updated PakFile levelEntities.editor_xml");
|
||||
pakFile.UpdateFile("LevelEntities.editor_xml", entitySaveBuffer.begin(), entitySaveBuffer.size());
|
||||
|
||||
// Save XML archive to pak file.
|
||||
|
||||
@@ -1950,7 +1950,7 @@ QPoint EditorViewportWidget::WorldToViewParticleEditor(const Vec3& wp, int width
|
||||
Vec3 EditorViewportWidget::ViewToWorld(
|
||||
const QPoint& vp, bool* collideWithTerrain, bool onlyTerrain, bool bSkipVegetation, bool bTestRenderMesh, bool* collideWithObject) const
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
AZ_UNUSED(collideWithTerrain)
|
||||
AZ_UNUSED(onlyTerrain)
|
||||
@@ -1985,7 +1985,7 @@ Vec3 EditorViewportWidget::ViewToWorldNormal(const QPoint& vp, bool onlyTerrain,
|
||||
AZ_UNUSED(onlyTerrain)
|
||||
AZ_UNUSED(bTestRenderMesh)
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
return Vec3(0, 0, 1);
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ Matrix34 CAxisGizmo::GetTransformation(RefCoordSys coordSys, IDisplayViewport* v
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CAxisGizmo::MouseCallback(CViewport* view, EMouseEvent event, QPoint& point, [[maybe_unused]] int nFlags)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
if (event == eMouseLDown)
|
||||
{
|
||||
|
||||
@@ -1233,7 +1233,7 @@ float CBaseObject::GetCameraVisRatio(const CCamera& camera)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CBaseObject::MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
if (event == eMouseMove || event == eMouseLDown)
|
||||
{
|
||||
@@ -1928,7 +1928,7 @@ bool CBaseObject::HitTestRectBounds(HitContext& hc, const AABB& box)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CBaseObject::HitTestRect(HitContext& hc)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
|
||||
AZ_PROFILE_FUNCTION(Entity);
|
||||
|
||||
AABB box;
|
||||
|
||||
@@ -1965,7 +1965,7 @@ bool CBaseObject::HitHelperTest(HitContext& hc)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CBaseObject::HitHelperAtTest(HitContext& hc, const Vec3& pos)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
|
||||
AZ_PROFILE_FUNCTION(Entity);
|
||||
|
||||
bool bResult = false;
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ bool CEntityObject::HitTestRect(HitContext& hc)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CEntityObject::MouseCreateCallback(CViewport* view, EMouseEvent event, QPoint& point, int flags)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
if (event == eMouseMove || event == eMouseLDown)
|
||||
{
|
||||
|
||||
@@ -368,7 +368,7 @@ CBaseObject* CObjectManager::NewObject(const QString& typeName, CBaseObject* pre
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CObjectManager::DeleteObject(CBaseObject* obj)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
if (m_currEditObject == obj)
|
||||
{
|
||||
EndEditParams();
|
||||
@@ -414,7 +414,7 @@ void CObjectManager::DeleteObject(CBaseObject* obj)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CObjectManager::DeleteSelection(CSelectionGroup* pSelection)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
if (pSelection == nullptr)
|
||||
{
|
||||
return;
|
||||
@@ -478,7 +478,7 @@ void CObjectManager::DeleteSelection(CSelectionGroup* pSelection)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CObjectManager::DeleteAllObjects()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
EndEditParams();
|
||||
|
||||
@@ -519,7 +519,7 @@ void CObjectManager::DeleteAllObjects()
|
||||
|
||||
CBaseObject* CObjectManager::CloneObject(CBaseObject* obj)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
assert(obj);
|
||||
//CRuntimeClass *cls = obj->GetRuntimeClass();
|
||||
//CBaseObject *clone = (CBaseObject*)cls->CreateObject();
|
||||
@@ -1112,7 +1112,7 @@ void CObjectManager::SerializeNameSelection(XmlNodeRef& rootNode, bool bLoading)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CObjectManager::ClearSelection()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
// Make sure to unlock selection.
|
||||
GetIEditor()->LockSelection(false);
|
||||
@@ -1165,7 +1165,7 @@ int CObjectManager::ClearSelection()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
int CObjectManager::InvertSelection()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
int selCount = 0;
|
||||
// iterate all objects.
|
||||
@@ -1189,7 +1189,7 @@ int CObjectManager::InvertSelection()
|
||||
|
||||
void CObjectManager::SetSelection(const QString& name)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
CSelectionGroup* selection = stl::find_in_map(m_selections, name, (CSelectionGroup*)nullptr);
|
||||
if (selection)
|
||||
{
|
||||
@@ -1202,7 +1202,7 @@ void CObjectManager::SetSelection(const QString& name)
|
||||
|
||||
void CObjectManager::RemoveSelection(const QString& name)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
QString selName = name;
|
||||
CSelectionGroup* selection = stl::find_in_map(m_selections, name, (CSelectionGroup*)nullptr);
|
||||
@@ -1221,7 +1221,7 @@ void CObjectManager::RemoveSelection(const QString& name)
|
||||
|
||||
void CObjectManager::SelectCurrent()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
for (int i = 0; i < m_currSelection->GetCount(); i++)
|
||||
{
|
||||
CBaseObject* obj = m_currSelection->GetObject(i);
|
||||
@@ -1236,7 +1236,7 @@ void CObjectManager::SelectCurrent()
|
||||
|
||||
void CObjectManager::UnselectCurrent()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
// Make sure to unlock selection.
|
||||
GetIEditor()->LockSelection(false);
|
||||
@@ -1260,7 +1260,7 @@ void CObjectManager::UnselectCurrent()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CObjectManager::Display(DisplayContext& dc)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
int currentHideMask = GetIEditor()->GetDisplaySettings()->GetObjectHideMask();
|
||||
if (m_lastHideMask != currentHideMask)
|
||||
@@ -1320,7 +1320,7 @@ void CObjectManager::FindDisplayableObjects(DisplayContext& dc, [[maybe_unused]]
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
CBaseObjectsCache* pDispayedViewObjects = dc.view->GetVisibleObjectsCache();
|
||||
@@ -1451,7 +1451,7 @@ void CObjectManager::EndEditParams([[maybe_unused]] int flags)
|
||||
//! Select objects within specified distance from given position.
|
||||
int CObjectManager::SelectObjects(const AABB& box, bool bUnselect)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
int numSel = 0;
|
||||
|
||||
AABB objBounds;
|
||||
@@ -1551,7 +1551,7 @@ bool CObjectManager::IsObjectDeletionAllowed(CBaseObject* pObject)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CObjectManager::DeleteSelection()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
// Make sure to unlock selection.
|
||||
GetIEditor()->LockSelection(false);
|
||||
@@ -1581,7 +1581,7 @@ void CObjectManager::DeleteSelection()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CObjectManager::HitTestObject(CBaseObject* obj, HitContext& hc)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
if (obj->IsFrozen())
|
||||
{
|
||||
@@ -1648,7 +1648,7 @@ bool CObjectManager::HitTestObject(CBaseObject* obj, HitContext& hc)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CObjectManager::HitTest(HitContext& hitInfo)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
hitInfo.object = nullptr;
|
||||
hitInfo.dist = FLT_MAX;
|
||||
@@ -1766,7 +1766,7 @@ bool CObjectManager::HitTest(HitContext& hitInfo)
|
||||
}
|
||||
void CObjectManager::FindObjectsInRect(CViewport* view, const QRect& rect, std::vector<GUID>& guids)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
if (rect.width() < 1 || rect.height() < 1)
|
||||
{
|
||||
@@ -1795,7 +1795,7 @@ void CObjectManager::FindObjectsInRect(CViewport* view, const QRect& rect, std::
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CObjectManager::SelectObjectsInRect(CViewport* view, const QRect& rect, bool bSelect)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
// Ignore too small rectangles.
|
||||
if (rect.width() < 1 || rect.height() < 1)
|
||||
@@ -2363,7 +2363,7 @@ bool CObjectManager::ConvertToType(CBaseObject* pObject, const QString& typeName
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CObjectManager::SetObjectSelected(CBaseObject* pObject, bool bSelect)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
// Only select/unselect once.
|
||||
if ((pObject->IsSelected() && bSelect) || (!pObject->IsSelected() && !bSelect))
|
||||
{
|
||||
|
||||
@@ -204,7 +204,7 @@ CUndoBaseObjectBulkSelect::CUndoBaseObjectBulkSelect(const AZStd::unordered_set<
|
||||
|
||||
void CUndoBaseObjectBulkSelect::Undo(bool bUndo)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
if (!bUndo)
|
||||
{
|
||||
return;
|
||||
@@ -217,7 +217,7 @@ void CUndoBaseObjectBulkSelect::Undo(bool bUndo)
|
||||
|
||||
void CUndoBaseObjectBulkSelect::Redo()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
AzToolsFramework::ToolsApplicationRequestBus::Broadcast(
|
||||
&AzToolsFramework::ToolsApplicationRequests::MarkEntitiesSelected,
|
||||
@@ -256,7 +256,7 @@ CUndoBaseObjectClearSelection::CUndoBaseObjectClearSelection(const CSelectionGro
|
||||
|
||||
void CUndoBaseObjectClearSelection::Undo(bool bUndo)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
if (!bUndo)
|
||||
{
|
||||
@@ -270,7 +270,7 @@ void CUndoBaseObjectClearSelection::Undo(bool bUndo)
|
||||
|
||||
void CUndoBaseObjectClearSelection::Redo()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
AzToolsFramework::ToolsApplicationRequestBus::Broadcast(
|
||||
&AzToolsFramework::ToolsApplicationRequests::SetSelectedEntities,
|
||||
|
||||
@@ -679,7 +679,7 @@ bool CComponentEntityObject::HitHelperTest(HitContext& hc)
|
||||
|
||||
bool CComponentEntityObject::HitTest(HitContext& hc)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
|
||||
AZ_PROFILE_FUNCTION(Entity);
|
||||
|
||||
if (m_iconOnlyHitTest)
|
||||
{
|
||||
@@ -705,7 +705,7 @@ bool CComponentEntityObject::HitTest(HitContext& hc)
|
||||
[&hc, &closestDistance, &rayIntersection, &preciseSelectionRequired, viewportId](
|
||||
AzToolsFramework::EditorComponentSelectionRequests* handler) -> bool
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
|
||||
AZ_PROFILE_FUNCTION(Entity);
|
||||
|
||||
if (handler->SupportsEditorRayIntersect())
|
||||
{
|
||||
@@ -768,7 +768,7 @@ bool CComponentEntityObject::HitTest(HitContext& hc)
|
||||
|
||||
void CComponentEntityObject::GetBoundBox(AABB& box)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Entity);
|
||||
AZ_PROFILE_FUNCTION(Entity);
|
||||
|
||||
box.Reset();
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ void SandboxIntegrationManager::EntityParentChanged(
|
||||
const AZ::EntityId newParentId,
|
||||
const AZ::EntityId oldParentId)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
if (m_unsavedEntities.find(entityId) != m_unsavedEntities.end())
|
||||
{
|
||||
@@ -858,7 +858,7 @@ void SandboxIntegrationManager::SetupLayerContextMenu(QMenu* menu)
|
||||
|
||||
void SandboxIntegrationManager::SetupSliceContextMenu(QMenu* menu)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
AzToolsFramework::EntityIdList selectedEntities;
|
||||
GetSelectedOrHighlightedEntities(selectedEntities);
|
||||
|
||||
@@ -960,7 +960,7 @@ void SandboxIntegrationManager::SetupSliceContextMenu(QMenu* menu)
|
||||
|
||||
void SandboxIntegrationManager::SetupSliceContextMenu_Modify(QMenu* menu, const AzToolsFramework::EntityIdList& selectedEntities, [[maybe_unused]] const AZ::u32 numEntitiesInSlices)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
using namespace AzToolsFramework;
|
||||
|
||||
// Gather the set of relevant entities from the selected entities and all descendants
|
||||
@@ -1083,7 +1083,7 @@ void SandboxIntegrationManager::CreateEditorRepresentation(AZ::Entity* entity)
|
||||
|
||||
bool SandboxIntegrationManager::DestroyEditorRepresentation(AZ::EntityId entityId, bool deleteAZEntity)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
IEditor* editor = GetIEditor();
|
||||
if (editor->GetObjectManager())
|
||||
@@ -1095,7 +1095,7 @@ bool SandboxIntegrationManager::DestroyEditorRepresentation(AZ::EntityId entityI
|
||||
{
|
||||
static_cast<CComponentEntityObject*>(object)->AssignEntity(nullptr, deleteAZEntity);
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "SandboxIntegrationManager::DestroyEditorRepresentation:ObjManagerDeleteObject");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "SandboxIntegrationManager::DestroyEditorRepresentation:ObjManagerDeleteObject");
|
||||
editor->GetObjectManager()->DeleteObject(object);
|
||||
}
|
||||
return true;
|
||||
@@ -1217,7 +1217,7 @@ void SandboxIntegrationManager::ClearRedoStack()
|
||||
|
||||
void SandboxIntegrationManager::CloneSelection(bool& handled)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
AzToolsFramework::EntityIdList entities;
|
||||
AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(
|
||||
@@ -1850,7 +1850,7 @@ AZStd::string SandboxIntegrationManager::GetComponentEditorIcon(const AZ::Uuid&
|
||||
AZStd::string SandboxIntegrationManager::GetComponentIconPath(const AZ::Uuid& componentType,
|
||||
AZ::Crc32 componentIconAttrib, AZ::Component* component)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
if (componentIconAttrib != AZ::Edit::Attributes::Icon
|
||||
&& componentIconAttrib != AZ::Edit::Attributes::ViewportIcon
|
||||
&& componentIconAttrib != AZ::Edit::Attributes::HideIcon)
|
||||
|
||||
@@ -1054,7 +1054,7 @@ bool OutlinerListModel::dropMimeDataEntities(const QMimeData* data, Qt::DropActi
|
||||
|
||||
bool OutlinerListModel::CanReparentEntities(const AZ::EntityId& newParentId, const AzToolsFramework::EntityIdList &selectedEntityIds) const
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
if (selectedEntityIds.empty())
|
||||
{
|
||||
return false;
|
||||
@@ -1143,7 +1143,7 @@ bool OutlinerListModel::CanReparentEntities(const AZ::EntityId& newParentId, con
|
||||
|
||||
bool OutlinerListModel::ReparentEntities(const AZ::EntityId& newParentId, const AzToolsFramework::EntityIdList &selectedEntityIds, const AZ::EntityId& beforeEntityId)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
if (!CanReparentEntities(newParentId, selectedEntityIds))
|
||||
{
|
||||
return false;
|
||||
@@ -1233,7 +1233,7 @@ bool OutlinerListModel::ReparentEntities(const AZ::EntityId& newParentId, const
|
||||
|
||||
QMimeData* OutlinerListModel::mimeData(const QModelIndexList& indexes) const
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
AZ::TypeId uuid1 = AZ::AzTypeInfo<AZ::Entity>::Uuid();
|
||||
AZ::TypeId uuid2 = AZ::AzTypeInfo<AzToolsFramework::EditorEntityIdContainer>::Uuid();
|
||||
|
||||
@@ -1323,7 +1323,7 @@ public:
|
||||
|
||||
void OutlinerListModel::ProcessEntityUpdates()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
m_entityChangeQueued = false;
|
||||
if (m_layoutResetQueued)
|
||||
{
|
||||
@@ -1331,7 +1331,7 @@ void OutlinerListModel::ProcessEntityUpdates()
|
||||
}
|
||||
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Editor, "OutlinerListModel::ProcessEntityUpdates:ExpandQueue");
|
||||
AZ_PROFILE_SCOPE(Editor, "OutlinerListModel::ProcessEntityUpdates:ExpandQueue");
|
||||
for (auto entityId : m_entityExpandQueue)
|
||||
{
|
||||
emit ExpandEntity(entityId, IsExpanded(entityId));
|
||||
@@ -1340,7 +1340,7 @@ void OutlinerListModel::ProcessEntityUpdates()
|
||||
}
|
||||
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Editor, "OutlinerListModel::ProcessEntityUpdates:SelectQueue");
|
||||
AZ_PROFILE_SCOPE(Editor, "OutlinerListModel::ProcessEntityUpdates:SelectQueue");
|
||||
for (auto entityId : m_entitySelectQueue)
|
||||
{
|
||||
emit SelectEntity(entityId, AzToolsFramework::IsSelected(entityId));
|
||||
@@ -1350,7 +1350,7 @@ void OutlinerListModel::ProcessEntityUpdates()
|
||||
|
||||
if (!m_entityChangeQueue.empty())
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Editor, "OutlinerListModel::ProcessEntityUpdates:ChangeQueue");
|
||||
AZ_PROFILE_SCOPE(Editor, "OutlinerListModel::ProcessEntityUpdates:ChangeQueue");
|
||||
|
||||
// its faster to just do a bulk data change than to carefully pick out indices
|
||||
// so we'll just merge all ranges into a single range rather than try to make gaps
|
||||
@@ -1383,7 +1383,7 @@ void OutlinerListModel::ProcessEntityUpdates()
|
||||
}
|
||||
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Editor, "OutlinerListModel::ProcessEntityUpdates:LayoutChanged");
|
||||
AZ_PROFILE_SCOPE(Editor, "OutlinerListModel::ProcessEntityUpdates:LayoutChanged");
|
||||
if (m_entityLayoutQueued)
|
||||
{
|
||||
emit layoutAboutToBeChanged();
|
||||
@@ -1393,7 +1393,7 @@ void OutlinerListModel::ProcessEntityUpdates()
|
||||
}
|
||||
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::Editor, "OutlinerListModel::ProcessEntityUpdates:InvalidateFilter");
|
||||
AZ_PROFILE_SCOPE(Editor, "OutlinerListModel::ProcessEntityUpdates:InvalidateFilter");
|
||||
if (m_isFilterDirty)
|
||||
{
|
||||
InvalidateFilter();
|
||||
@@ -1416,7 +1416,7 @@ void OutlinerListModel::OnEntityInfoResetEnd()
|
||||
|
||||
void OutlinerListModel::ProcessEntityInfoResetEnd()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
m_layoutResetQueued = false;
|
||||
m_entityChangeQueued = false;
|
||||
m_entityChangeQueue.clear();
|
||||
@@ -1437,7 +1437,7 @@ void OutlinerListModel::OnEntityInfoUpdatedAddChildBegin(AZ::EntityId parentId,
|
||||
void OutlinerListModel::OnEntityInfoUpdatedAddChildEnd(AZ::EntityId parentId, AZ::EntityId childId)
|
||||
{
|
||||
(void)parentId;
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
endInsertRows();
|
||||
|
||||
//expand ancestors if a new descendant is already selected
|
||||
@@ -1475,7 +1475,7 @@ void OutlinerListModel::OnEntityInfoUpdatedRemoveChildBegin(AZ::EntityId parentI
|
||||
void OutlinerListModel::OnEntityInfoUpdatedRemoveChildEnd(AZ::EntityId parentId, AZ::EntityId childId)
|
||||
{
|
||||
(void)childId;
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
endResetModel();
|
||||
|
||||
@@ -1494,7 +1494,7 @@ void OutlinerListModel::OnEntityInfoUpdatedOrderBegin(AZ::EntityId parentId, AZ:
|
||||
|
||||
void OutlinerListModel::OnEntityInfoUpdatedOrderEnd(AZ::EntityId parentId, AZ::EntityId childId, AZ::u64 index)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
(void)index;
|
||||
m_entityLayoutQueued = true;
|
||||
QueueEntityUpdate(parentId);
|
||||
@@ -1565,7 +1565,7 @@ QString OutlinerListModel::GetSliceAssetName(const AZ::EntityId& entityId) const
|
||||
|
||||
QModelIndex OutlinerListModel::GetIndexFromEntity(const AZ::EntityId& entityId, int column) const
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
if (entityId.IsValid())
|
||||
{
|
||||
@@ -1727,7 +1727,7 @@ void OutlinerListModel::OnEditorEntityDuplicated(const AZ::EntityId& oldEntity,
|
||||
|
||||
void OutlinerListModel::ExpandAncestors(const AZ::EntityId& entityId)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
//typically to reveal selected entities, expand all parent entities
|
||||
if (entityId.IsValid())
|
||||
{
|
||||
@@ -1932,7 +1932,7 @@ bool OutlinerListModel::HasSelectedDescendant(const AZ::EntityId& entityId) cons
|
||||
|
||||
bool OutlinerListModel::AreAllDescendantsSameLockState(const AZ::EntityId& entityId) const
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
//TODO result can be cached in mutable map and cleared when any descendant changes to avoid recursion in deep hierarchies
|
||||
bool isLocked = false;
|
||||
AzToolsFramework::EditorEntityInfoRequestBus::EventResult(isLocked, entityId, &AzToolsFramework::EditorEntityInfoRequestBus::Events::IsJustThisEntityLocked);
|
||||
@@ -1953,7 +1953,7 @@ bool OutlinerListModel::AreAllDescendantsSameLockState(const AZ::EntityId& entit
|
||||
|
||||
bool OutlinerListModel::AreAllDescendantsSameVisibleState(const AZ::EntityId& entityId) const
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
//TODO result can be cached in mutable map and cleared when any descendant changes to avoid recursion in deep hierarchies
|
||||
|
||||
bool isVisible = AzToolsFramework::IsEntitySetToBeVisible(entityId);
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace
|
||||
|
||||
void SortEntityChildren(AZ::EntityId entityId, const EntityIdCompareFunc& comparer, AzToolsFramework::EntityOrderArray* newEntityOrder = nullptr)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
AzToolsFramework::EntityOrderArray entityOrderArray = AzToolsFramework::GetEntityChildOrder(entityId);
|
||||
AZStd::sort(entityOrderArray.begin(), entityOrderArray.end(), comparer);
|
||||
@@ -110,7 +110,7 @@ namespace
|
||||
|
||||
void SortEntityChildrenRecursively(AZ::EntityId entityId, const EntityIdCompareFunc& comparer)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
AzToolsFramework::EntityOrderArray entityOrderArray;
|
||||
SortEntityChildren(entityId, comparer, &entityOrderArray);
|
||||
@@ -303,7 +303,7 @@ void OutlinerWidget::OnSelectionChanged(const QItemSelection& selected, const QI
|
||||
return;
|
||||
}
|
||||
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
AzToolsFramework::EntityIdList newlySelected;
|
||||
ExtractEntityIdsFromSelection(selected, newlySelected);
|
||||
@@ -450,7 +450,7 @@ void OutlinerWidget::UpdateSelection()
|
||||
{
|
||||
if (m_selectionChangeQueued)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
m_selectionChangeInProgress = true;
|
||||
|
||||
@@ -458,7 +458,7 @@ void OutlinerWidget::UpdateSelection()
|
||||
{
|
||||
// Calling Deselect for a large number of items is very slow,
|
||||
// use a single ClearAndSelect call instead.
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "OutlinerWidget::ModelEntitySelectionChanged:ClearAndSelect");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "OutlinerWidget::ModelEntitySelectionChanged:ClearAndSelect");
|
||||
|
||||
AzToolsFramework::EntityIdList selectedEntities;
|
||||
AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(selectedEntities, &AzToolsFramework::ToolsApplicationRequests::Bus::Events::GetSelectedEntities);
|
||||
@@ -469,12 +469,12 @@ void OutlinerWidget::UpdateSelection()
|
||||
else
|
||||
{
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "OutlinerWidget::ModelEntitySelectionChanged:Deselect");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "OutlinerWidget::ModelEntitySelectionChanged:Deselect");
|
||||
m_gui->m_objectTree->selectionModel()->select(
|
||||
BuildSelectionFromEntities(m_entitiesToDeselect), QItemSelectionModel::Deselect);
|
||||
}
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::AzToolsFramework, "OutlinerWidget::ModelEntitySelectionChanged:Select");
|
||||
AZ_PROFILE_SCOPE(AzToolsFramework, "OutlinerWidget::ModelEntitySelectionChanged:Select");
|
||||
m_gui->m_objectTree->selectionModel()->select(
|
||||
BuildSelectionFromEntities(m_entitiesToSelect), QItemSelectionModel::Select);
|
||||
}
|
||||
@@ -497,7 +497,7 @@ void OutlinerWidget::UpdateSelection()
|
||||
template <class EntityIdCollection>
|
||||
QItemSelection OutlinerWidget::BuildSelectionFromEntities(const EntityIdCollection& entityIds)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
QItemSelection selection;
|
||||
|
||||
for (const auto& entityId : entityIds)
|
||||
@@ -517,7 +517,7 @@ QItemSelection OutlinerWidget::BuildSelectionFromEntities(const EntityIdCollecti
|
||||
|
||||
void OutlinerWidget::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
bool isDocumentOpen = false;
|
||||
EBUS_EVENT_RESULT(isDocumentOpen, AzToolsFramework::EditorRequests::Bus, IsLevelDocumentOpen);
|
||||
@@ -1272,7 +1272,7 @@ void OutlinerWidget::ExtractEntityIdsFromSelection(const QItemSelection& selecti
|
||||
|
||||
void OutlinerWidget::OnSearchTextChanged(const QString& activeTextFilter)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
AZStd::string filterString = activeTextFilter.toUtf8().data();
|
||||
|
||||
m_listModel->SearchStringChanged(filterString);
|
||||
@@ -1388,7 +1388,7 @@ void OutlinerWidget::QueueContentUpdateSort(const AZ::EntityId& entityId)
|
||||
|
||||
void OutlinerWidget::SortContent()
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
|
||||
m_sortContentQueued = false;
|
||||
|
||||
@@ -1424,7 +1424,7 @@ void OutlinerWidget::OnSortModeChanged(EntityOutliner::DisplaySortMode sortMode)
|
||||
|
||||
if (sortMode != EntityOutliner::DisplaySortMode::Manually)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::AzToolsFramework);
|
||||
AZ_PROFILE_FUNCTION(AzToolsFramework);
|
||||
auto comparer = AZStd::bind(&CompareEntitiesForSorting, AZStd::placeholders::_1, AZStd::placeholders::_2, sortMode);
|
||||
SortEntityChildrenRecursively(AZ::EntityId(), comparer);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ AssetImporterDocument::AssetImporterDocument()
|
||||
|
||||
bool AssetImporterDocument::LoadScene(const AZStd::string& sceneFullPath)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
namespace SceneEvents = AZ::SceneAPI::Events;
|
||||
SceneEvents::SceneSerializationBus::BroadcastResult(m_scene, &SceneEvents::SceneSerializationBus::Events::LoadScene, sceneFullPath, AZ::Uuid::CreateNull());
|
||||
return !!m_scene;
|
||||
|
||||
@@ -45,7 +45,7 @@ AZ::SceneAPI::UI::ManifestWidget* ImporterRootDisplay::GetManifestWidget()
|
||||
|
||||
void ImporterRootDisplay::SetSceneDisplay(const QString& headerText, const AZStd::shared_ptr<AZ::SceneAPI::Containers::Scene>& scene)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
if (!scene)
|
||||
{
|
||||
AZ_Assert(scene, "No scene provided to display.");
|
||||
@@ -62,7 +62,7 @@ void ImporterRootDisplay::SetSceneDisplay(const QString& headerText, const AZStd
|
||||
|
||||
void ImporterRootDisplay::HandleSceneWasReset(const AZStd::shared_ptr<AZ::SceneAPI::Containers::Scene>& scene)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
// Don't accept updates while the widget is being filled in.
|
||||
BusDisconnect();
|
||||
m_manifestWidget->BuildFromScene(scene);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Debug/Profiler.h>
|
||||
#include <AzCore/IO/SystemFile.h>
|
||||
#include <AzCore/std/algorithm.h>
|
||||
#include <AzCore/std/string/conversions.h>
|
||||
@@ -37,7 +38,7 @@ namespace AZ
|
||||
AZStd::shared_ptr<SceneAPI::Containers::Scene> SceneSerializationHandler::LoadScene(
|
||||
const AZStd::string& filePath, Uuid sceneSourceGuid)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
namespace Utilities = AZ::SceneAPI::Utilities;
|
||||
using AZ::SceneAPI::Events::AssetImportRequest;
|
||||
|
||||
|
||||
@@ -969,7 +969,7 @@ void QtViewport::MakeConstructionPlane(int axis)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
Vec3 QtViewport::MapViewToCP(const QPoint& point, int axis)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
if (axis == AXIS_TERRAIN)
|
||||
{
|
||||
@@ -1336,7 +1336,7 @@ bool QtViewport::GetAdvancedSelectModeFlag()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool QtViewport::MouseCallback(EMouseEvent event, const QPoint& point, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons)
|
||||
{
|
||||
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::Editor);
|
||||
AZ_PROFILE_FUNCTION(Editor);
|
||||
|
||||
// Ignore any mouse events in game mode.
|
||||
if (GetIEditor()->IsInGameMode())
|
||||
|
||||
Reference in New Issue
Block a user