Merge branch 'development' into cmake/SPEC-2513_w4244

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/CryEditDoc.cpp
#	Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp
#	Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp
#	Gems/PhysXDebug/Code/Source/SystemComponent.cpp
This commit is contained in:
Esteban Papp
2021-08-19 08:53:41 -07:00
370 changed files with 3276 additions and 4248 deletions
@@ -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())
{
@@ -646,16 +646,27 @@ void SandboxIntegrationManager::PopulateEditorGlobalContextMenu(QMenu* menu, con
QAction* action = nullptr;
action = menu->addAction(QObject::tr("Create entity"));
QObject::connect(action, &QAction::triggered, action, [this] { ContextMenu_NewEntity(); });
if (selected.size() == 1)
// when nothing is selected, entity is created at root level
if (selected.size() == 0)
{
action = menu->addAction(QObject::tr("Create child entity"));
QObject::connect(action, &QAction::triggered, action, [selected]
{
EBUS_EVENT(AzToolsFramework::EditorRequests::Bus, CreateNewEntityAsChild, selected.front());
});
action = menu->addAction(QObject::tr("Create entity"));
QObject::connect(
action, &QAction::triggered, action,
[this]
{
ContextMenu_NewEntity();
});
}
// when a single entity is selected, entity is created as its child
else if (selected.size() == 1)
{
action = menu->addAction(QObject::tr("Create entity"));
QObject::connect(
action, &QAction::triggered, action,
[selected]
{
EBUS_EVENT(AzToolsFramework::EditorRequests::Bus, CreateNewEntityAsChild, selected.front());
});
}
bool prefabSystemEnabled = false;
@@ -847,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);
@@ -949,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
@@ -1072,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())
@@ -1084,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;
@@ -1206,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(
@@ -1839,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)