Merge branch 'stabilization/2110' of https://github.com/aws-lumberyard/o3de into Prism/AdditionalProgressFixes
This commit is contained in:
@@ -1362,16 +1362,6 @@ void CCryEditApp::CompileCriticalAssets() const
|
||||
assetsInQueueNotifcation.BusDisconnect();
|
||||
CCryEditApp::OutputStartupMessage(QString("Asset Processor is now ready."));
|
||||
|
||||
// VERY early on, as soon as we can, request that the asset system make sure the following assets take priority over others,
|
||||
// so that by the time we ask for them there is a greater likelihood that they're already good to go.
|
||||
// these can be loaded later but are still important:
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "/texturemsg/");
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/materials");
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/geomcaches");
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/objects");
|
||||
|
||||
// some are specifically extra important and will cause issues if missing completely:
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::CompileAssetSync, "engineassets/objects/default.cgf");
|
||||
}
|
||||
|
||||
bool CCryEditApp::ConnectToAssetProcessor() const
|
||||
|
||||
@@ -60,7 +60,6 @@ struct IFileUtil
|
||||
EFILE_TYPE_GEOMETRY,
|
||||
EFILE_TYPE_TEXTURE,
|
||||
EFILE_TYPE_SOUND,
|
||||
EFILE_TYPE_GEOMCACHE,
|
||||
EFILE_TYPE_LAST,
|
||||
};
|
||||
|
||||
|
||||
@@ -956,11 +956,7 @@ void CEntityObject::Serialize(CObjectArchive& ar)
|
||||
QString attachmentType;
|
||||
xmlNode->getAttr("AttachmentType", attachmentType);
|
||||
|
||||
if (attachmentType == "GeomCacheNode")
|
||||
{
|
||||
m_attachmentType = eAT_GeomCacheNode;
|
||||
}
|
||||
else if (attachmentType == "CharacterBone")
|
||||
if (attachmentType == "CharacterBone")
|
||||
{
|
||||
m_attachmentType = eAT_CharacterBone;
|
||||
}
|
||||
@@ -987,11 +983,7 @@ void CEntityObject::Serialize(CObjectArchive& ar)
|
||||
{
|
||||
if (m_attachmentType != eAT_Pivot)
|
||||
{
|
||||
if (m_attachmentType == eAT_GeomCacheNode)
|
||||
{
|
||||
xmlNode->setAttr("AttachmentType", "GeomCacheNode");
|
||||
}
|
||||
else if (m_attachmentType == eAT_CharacterBone)
|
||||
if (m_attachmentType == eAT_CharacterBone)
|
||||
{
|
||||
xmlNode->setAttr("AttachmentType", "CharacterBone");
|
||||
}
|
||||
@@ -1091,11 +1083,7 @@ XmlNodeRef CEntityObject::Export([[maybe_unused]] const QString& levelPath, XmlN
|
||||
objNode->setAttr("ParentId", parentEntity->GetEntityId());
|
||||
if (m_attachmentType != eAT_Pivot)
|
||||
{
|
||||
if (m_attachmentType == eAT_GeomCacheNode)
|
||||
{
|
||||
objNode->setAttr("AttachmentType", "GeomCacheNode");
|
||||
}
|
||||
else if (m_attachmentType == eAT_CharacterBone)
|
||||
if (m_attachmentType == eAT_CharacterBone)
|
||||
{
|
||||
objNode->setAttr("AttachmentType", "CharacterBone");
|
||||
}
|
||||
|
||||
@@ -131,7 +131,6 @@ public:
|
||||
enum EAttachmentType
|
||||
{
|
||||
eAT_Pivot,
|
||||
eAT_GeomCacheNode,
|
||||
eAT_CharacterBone,
|
||||
};
|
||||
|
||||
|
||||
@@ -608,7 +608,7 @@ bool CObjectManager::AddObject(CBaseObject* obj)
|
||||
if (CEntityObject* entityObj = qobject_cast<CEntityObject*>(obj))
|
||||
{
|
||||
CEntityObject::EAttachmentType attachType = entityObj->GetAttachType();
|
||||
if (attachType == CEntityObject::EAttachmentType::eAT_GeomCacheNode || attachType == CEntityObject::EAttachmentType::eAT_CharacterBone)
|
||||
if (attachType == CEntityObject::EAttachmentType::eAT_CharacterBone)
|
||||
{
|
||||
m_animatedAttachedEntities.insert(entityObj);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <Atom/RPI.Public/Scene.h>
|
||||
#include <Atom/RPI.Public/View.h>
|
||||
#include <Atom/RPI.Reflect/System/RenderPipelineDescriptor.h>
|
||||
#include <PostProcess/PostProcessFeatureProcessor.h>
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <AzCore/Math/MatrixUtils.h>
|
||||
#include <AzCore/Name/Name.h>
|
||||
@@ -47,18 +48,42 @@ namespace TrackView
|
||||
AZ::Name viewName = AZ::Name("MainCamera");
|
||||
m_view = AZ::RPI::View::CreateView(viewName, AZ::RPI::View::UsageCamera);
|
||||
m_renderPipeline->SetDefaultView(m_view);
|
||||
m_targetView = scene.GetDefaultRenderPipeline()->GetDefaultView();
|
||||
if (AZ::Render::PostProcessFeatureProcessor* fp = scene.GetFeatureProcessor<AZ::Render::PostProcessFeatureProcessor>())
|
||||
{
|
||||
// This will be set again to mimic the active camera in UpdateView
|
||||
fp->SetViewAlias(m_view, m_targetView);
|
||||
}
|
||||
}
|
||||
|
||||
void AtomOutputFrameCapture::DestroyPipeline(AZ::RPI::Scene& scene)
|
||||
{
|
||||
if (AZ::Render::PostProcessFeatureProcessor* fp = scene.GetFeatureProcessor<AZ::Render::PostProcessFeatureProcessor>())
|
||||
{
|
||||
// Remove view alias introduced in CreatePipeline and UpdateView
|
||||
fp->RemoveViewAlias(m_view);
|
||||
}
|
||||
scene.RemoveRenderPipeline(m_renderPipeline->GetId());
|
||||
m_passHierarchy.clear();
|
||||
m_renderPipeline.reset();
|
||||
m_view.reset();
|
||||
m_targetView.reset();
|
||||
}
|
||||
|
||||
void AtomOutputFrameCapture::UpdateView(const AZ::Matrix3x4& cameraTransform, const AZ::Matrix4x4& cameraProjection)
|
||||
void AtomOutputFrameCapture::UpdateView(const AZ::Matrix3x4& cameraTransform, const AZ::Matrix4x4& cameraProjection, const AZ::RPI::ViewPtr targetView)
|
||||
{
|
||||
if (targetView && targetView != m_targetView)
|
||||
{
|
||||
if (AZ::RPI::Scene* scene = SceneFromGameEntityContext())
|
||||
{
|
||||
if (AZ::Render::PostProcessFeatureProcessor* fp = scene->GetFeatureProcessor<AZ::Render::PostProcessFeatureProcessor>())
|
||||
{
|
||||
fp->SetViewAlias(m_view, targetView);
|
||||
m_targetView = targetView;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_view->SetCameraTransform(cameraTransform);
|
||||
m_view->SetViewToClipMatrix(cameraProjection);
|
||||
}
|
||||
|
||||
@@ -39,11 +39,12 @@ namespace TrackView
|
||||
CaptureFinishedCallback captureFinishedCallback);
|
||||
|
||||
//! Update the internal view that is associated with the created pipeline.
|
||||
void UpdateView(const AZ::Matrix3x4& cameraTransform, const AZ::Matrix4x4& cameraProjection);
|
||||
void UpdateView(const AZ::Matrix3x4& cameraTransform, const AZ::Matrix4x4& cameraProjection, const AZ::RPI::ViewPtr targetView = nullptr);
|
||||
|
||||
private:
|
||||
AZ::RPI::RenderPipelinePtr m_renderPipeline; //!< The internal render pipeline.
|
||||
AZ::RPI::ViewPtr m_view; //!< The view associated with the render pipeline.
|
||||
AZ::RPI::ViewPtr m_targetView; //!< The view that this render pipeline will mimic.
|
||||
AZStd::vector<AZStd::string> m_passHierarchy; //!< Pass hierarchy (includes pipelineName and CopyToSwapChain).
|
||||
CaptureFinishedCallback m_captureFinishedCallback; //!< Stored callback called from OnCaptureFinished.
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <AzCore/Component/ComponentApplication.h>
|
||||
#include <AzFramework/Windowing/WindowBus.h>
|
||||
#include <Atom/RPI.Public/ViewProviderBus.h>
|
||||
|
||||
// Qt
|
||||
#include <QAction>
|
||||
@@ -91,9 +92,12 @@ namespace
|
||||
static void UpdateAtomOutputFrameCaptureView(TrackView::AtomOutputFrameCapture& atomOutputFrameCapture, const int width, const int height)
|
||||
{
|
||||
const AZ::EntityId activeCameraEntityId = TrackView::ActiveCameraEntityId();
|
||||
AZ::RPI::ViewPtr view = nullptr;
|
||||
AZ::RPI::ViewProviderBus::EventResult(view, activeCameraEntityId, &AZ::RPI::ViewProvider::GetView);
|
||||
atomOutputFrameCapture.UpdateView(
|
||||
TrackView::TransformFromEntityId(activeCameraEntityId),
|
||||
TrackView::ProjectionFromCameraEntityId(activeCameraEntityId, static_cast<float>(width), static_cast<float>(height)));
|
||||
TrackView::ProjectionFromCameraEntityId(activeCameraEntityId, aznumeric_cast<float>(width), aznumeric_cast<float>(height)),
|
||||
view);
|
||||
}
|
||||
|
||||
CSequenceBatchRenderDialog::CSequenceBatchRenderDialog(float fps, QWidget* pParent /* = nullptr */)
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
#include <Shellapi.h>
|
||||
#endif
|
||||
|
||||
bool CFileUtil::s_singleFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true, true };
|
||||
bool CFileUtil::s_multiFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true, true };
|
||||
bool CFileUtil::s_singleFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true };
|
||||
bool CFileUtil::s_multiFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true };
|
||||
|
||||
CAutoRestorePrimaryCDRoot::~CAutoRestorePrimaryCDRoot()
|
||||
{
|
||||
|
||||
@@ -50,7 +50,12 @@ namespace AZ
|
||||
|
||||
if (!s_instance)
|
||||
{
|
||||
s_instance = Environment::FindVariable<NameDictionary>(NameDictionaryInstanceName);
|
||||
// Because the NameDictionary allocates memory using the AZ::Allocator and it is created
|
||||
// in the executable memory space, it's ownership cannot be transferred to other module memory spaces
|
||||
// Otherwise this could cause the the NameDictionary to be destroyed in static de-init
|
||||
// after the AZ::Allocators have been destroyed
|
||||
// Therefore we supply the isTransferOwnership value of false using CreateVariableEx
|
||||
s_instance = AZ::Environment::CreateVariableEx<NameDictionary>(NameDictionaryInstanceName, true, false);
|
||||
}
|
||||
|
||||
return s_instance.IsConstructed();
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h>
|
||||
#include <AzFramework/XcbConnectionManager.h>
|
||||
#include <AzFramework/XcbEventHandler.h>
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option")
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
AZ_CVAR(
|
||||
bool, ed_useNewAssetBrowserTableView, false, nullptr, AZ::ConsoleFunctorFlags::Null,
|
||||
bool, ed_useNewAssetBrowserTableView, true, nullptr, AZ::ConsoleFunctorFlags::Null,
|
||||
"Use the new AssetBrowser TableView for searching assets.");
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
|
||||
@@ -175,20 +175,14 @@ namespace AzToolsFramework::Prefab
|
||||
m_focusedInstance = focusedInstance;
|
||||
m_focusedTemplateId = focusedInstance->get().GetTemplateId();
|
||||
|
||||
AZ::EntityId containerEntityId;
|
||||
|
||||
if (focusedInstance->get().GetParentInstance() != AZStd::nullopt)
|
||||
{
|
||||
containerEntityId = focusedInstance->get().GetContainerEntityId();
|
||||
}
|
||||
else
|
||||
{
|
||||
containerEntityId = AZ::EntityId();
|
||||
}
|
||||
|
||||
// Focus on the descendants of the container entity in the Editor, if the interface is initialized.
|
||||
if (m_focusModeInterface)
|
||||
{
|
||||
const AZ::EntityId containerEntityId =
|
||||
(focusedInstance->get().GetParentInstance() != AZStd::nullopt)
|
||||
? focusedInstance->get().GetContainerEntityId()
|
||||
: AZ::EntityId();
|
||||
|
||||
m_focusModeInterface->SetFocusRoot(containerEntityId);
|
||||
}
|
||||
|
||||
|
||||
+57
-15
@@ -45,6 +45,7 @@ AZ_POP_DISABLE_WARNING
|
||||
#include <AzToolsFramework/AssetBrowser/EBusFindAssetTypeByName.h>
|
||||
#include <AzToolsFramework/ComponentMode/ComponentModeDelegate.h>
|
||||
#include <AzToolsFramework/Entity/EditorEntityHelpers.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabFocusPublicInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabPublicInterface.h>
|
||||
#include <AzToolsFramework/Slice/SliceDataFlagsCommand.h>
|
||||
#include <AzToolsFramework/Slice/SliceMetadataEntityContextBus.h>
|
||||
@@ -606,6 +607,7 @@ namespace AzToolsFramework
|
||||
|
||||
AzToolsFramework::ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusConnect(
|
||||
AzToolsFramework::GetEntityContextId());
|
||||
ViewportEditorModeNotificationsBus::Handler::BusConnect(GetEntityContextId());
|
||||
}
|
||||
|
||||
EntityPropertyEditor::~EntityPropertyEditor()
|
||||
@@ -618,7 +620,8 @@ namespace AzToolsFramework
|
||||
AZ::EntitySystemBus::Handler::BusDisconnect();
|
||||
EditorEntityContextNotificationBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusDisconnect();
|
||||
|
||||
ViewportEditorModeNotificationsBus::Handler::BusDisconnect();
|
||||
|
||||
for (auto& entityId : m_overrideSelectedEntityIds)
|
||||
{
|
||||
DisconnectFromEntityBuses(entityId);
|
||||
@@ -892,25 +895,51 @@ namespace AzToolsFramework
|
||||
{
|
||||
if (!m_prefabsAreEnabled)
|
||||
{
|
||||
return m_isLevelEntityEditor ? InspectorLayout::LEVEL : InspectorLayout::ENTITY;
|
||||
return m_isLevelEntityEditor ? InspectorLayout::Level : InspectorLayout::Entity;
|
||||
}
|
||||
|
||||
// Prefabs layout logic
|
||||
|
||||
// If this is the container entity for the root instance, treat it like a level entity.
|
||||
AZ::EntityId levelContainerEntityId = m_prefabPublicInterface->GetLevelInstanceContainerEntityId();
|
||||
if (AZStd::find(m_selectedEntityIds.begin(), m_selectedEntityIds.end(), levelContainerEntityId) != m_selectedEntityIds.end())
|
||||
{
|
||||
if (m_selectedEntityIds.size() > 1)
|
||||
{
|
||||
return InspectorLayout::INVALID;
|
||||
return InspectorLayout::Invalid;
|
||||
}
|
||||
else
|
||||
{
|
||||
return InspectorLayout::LEVEL;
|
||||
return InspectorLayout::Level;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return InspectorLayout::ENTITY;
|
||||
// If this is the container entity for the currently focused prefab, utilize a separate layout.
|
||||
if (auto prefabFocusPublicInterface = AZ::Interface<AzToolsFramework::Prefab::PrefabFocusPublicInterface>::Get())
|
||||
{
|
||||
AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull();
|
||||
EditorEntityContextRequestBus::BroadcastResult(
|
||||
editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId);
|
||||
|
||||
AZ::EntityId focusedPrefabContainerEntityId =
|
||||
prefabFocusPublicInterface->GetFocusedPrefabContainerEntityId(editorEntityContextId);
|
||||
if (AZStd::find(m_selectedEntityIds.begin(), m_selectedEntityIds.end(), focusedPrefabContainerEntityId) !=
|
||||
m_selectedEntityIds.end())
|
||||
{
|
||||
if (m_selectedEntityIds.size() > 1)
|
||||
{
|
||||
return InspectorLayout::Invalid;
|
||||
}
|
||||
else
|
||||
{
|
||||
return InspectorLayout::ContainerEntityOfFocusedPrefab;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return InspectorLayout::Entity;
|
||||
}
|
||||
|
||||
void EntityPropertyEditor::UpdateEntityDisplay()
|
||||
@@ -919,7 +948,7 @@ namespace AzToolsFramework
|
||||
|
||||
InspectorLayout layout = GetCurrentInspectorLayout();
|
||||
|
||||
if (layout == InspectorLayout::LEVEL)
|
||||
if (!m_prefabsAreEnabled && layout == InspectorLayout::Level)
|
||||
{
|
||||
AZStd::string levelName;
|
||||
AzToolsFramework::EditorRequestBus::BroadcastResult(levelName, &AzToolsFramework::EditorRequests::GetLevelName);
|
||||
@@ -961,14 +990,19 @@ namespace AzToolsFramework
|
||||
|
||||
InspectorLayout layout = GetCurrentInspectorLayout();
|
||||
|
||||
if (layout == InspectorLayout::LEVEL)
|
||||
if (layout == InspectorLayout::Level)
|
||||
{
|
||||
// The Level Inspector should only have a list of selectable components after the
|
||||
// level entity itself is valid (i.e. "selected").
|
||||
return selection.empty() ? SelectionEntityTypeInfo::None : SelectionEntityTypeInfo::LevelEntity;
|
||||
}
|
||||
|
||||
if (layout == InspectorLayout::INVALID)
|
||||
if (layout == InspectorLayout::ContainerEntityOfFocusedPrefab)
|
||||
{
|
||||
return selection.empty() ? SelectionEntityTypeInfo::None : SelectionEntityTypeInfo::ContainerEntityOfFocusedPrefab;
|
||||
}
|
||||
|
||||
if (layout == InspectorLayout::Invalid)
|
||||
{
|
||||
return SelectionEntityTypeInfo::Mixed;
|
||||
}
|
||||
@@ -1138,7 +1172,8 @@ namespace AzToolsFramework
|
||||
}
|
||||
}
|
||||
|
||||
bool isLevelLayout = GetCurrentInspectorLayout() == InspectorLayout::LEVEL;
|
||||
bool isLevelLayout = GetCurrentInspectorLayout() == InspectorLayout::Level;
|
||||
bool isContainerOfFocusedPrefabLayout = GetCurrentInspectorLayout() == InspectorLayout::ContainerEntityOfFocusedPrefab;
|
||||
|
||||
m_gui->m_entityDetailsLabel->setText(entityDetailsLabelText);
|
||||
m_gui->m_entityDetailsLabel->setVisible(entityDetailsVisible);
|
||||
@@ -1146,10 +1181,14 @@ namespace AzToolsFramework
|
||||
m_gui->m_entityNameLabel->setVisible(hasEntitiesDisplayed);
|
||||
m_gui->m_entityIcon->setVisible(hasEntitiesDisplayed);
|
||||
m_gui->m_pinButton->setVisible(m_overrideSelectedEntityIds.empty() && hasEntitiesDisplayed && !m_isSystemEntityEditor);
|
||||
m_gui->m_statusLabel->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
m_gui->m_statusComboBox->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
m_gui->m_entityIdLabel->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
m_gui->m_entityIdText->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
m_gui->m_statusLabel->setVisible(
|
||||
hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
m_gui->m_statusComboBox->setVisible(
|
||||
hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
m_gui->m_entityIdLabel->setVisible(
|
||||
hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
m_gui->m_entityIdText->setVisible(
|
||||
hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
|
||||
bool displayComponentSearchBox = hasEntitiesDisplayed;
|
||||
if (hasEntitiesDisplayed)
|
||||
@@ -1157,7 +1196,9 @@ namespace AzToolsFramework
|
||||
// Build up components to display
|
||||
SharedComponentArray sharedComponentArray;
|
||||
BuildSharedComponentArray(sharedComponentArray,
|
||||
!(selectionEntityTypeInfo == SelectionEntityTypeInfo::OnlyStandardEntities || selectionEntityTypeInfo == SelectionEntityTypeInfo::OnlyPrefabEntities));
|
||||
!(selectionEntityTypeInfo == SelectionEntityTypeInfo::OnlyStandardEntities ||
|
||||
selectionEntityTypeInfo == SelectionEntityTypeInfo::OnlyPrefabEntities) ||
|
||||
selectionEntityTypeInfo == SelectionEntityTypeInfo::ContainerEntityOfFocusedPrefab);
|
||||
|
||||
if (sharedComponentArray.size() == 0)
|
||||
{
|
||||
@@ -1173,7 +1214,8 @@ namespace AzToolsFramework
|
||||
UpdateEntityDisplay();
|
||||
}
|
||||
|
||||
m_gui->m_darkBox->setVisible(displayComponentSearchBox && !m_isSystemEntityEditor && !isLevelLayout);
|
||||
m_gui->m_darkBox->setVisible(
|
||||
displayComponentSearchBox && !m_isSystemEntityEditor && !isLevelLayout && !isContainerOfFocusedPrefabLayout);
|
||||
m_gui->m_entitySearchBox->setVisible(displayComponentSearchBox);
|
||||
|
||||
bool displayAddComponentMenu = CanAddComponentsToSelection(selectionEntityTypeInfo);
|
||||
|
||||
+7
-5
@@ -354,7 +354,8 @@ namespace AzToolsFramework
|
||||
OnlyLayerEntities,
|
||||
OnlyPrefabEntities,
|
||||
Mixed,
|
||||
LevelEntity
|
||||
LevelEntity,
|
||||
ContainerEntityOfFocusedPrefab
|
||||
};
|
||||
/**
|
||||
* Returns what kinds of entities are in the current selection. This is used because mixed selection
|
||||
@@ -364,7 +365,7 @@ namespace AzToolsFramework
|
||||
SelectionEntityTypeInfo GetSelectionEntityTypeInfo(const EntityIdList& selection) const;
|
||||
|
||||
/**
|
||||
* Returns true if a selection matching the passed in selection informatation allows components to be added.
|
||||
* Returns true if a selection matching the passed in selection information allows components to be added.
|
||||
*/
|
||||
bool CanAddComponentsToSelection(const SelectionEntityTypeInfo& selectionEntityTypeInfo) const;
|
||||
|
||||
@@ -581,9 +582,10 @@ namespace AzToolsFramework
|
||||
|
||||
enum class InspectorLayout
|
||||
{
|
||||
ENTITY = 0, // All selected entities are regular entities
|
||||
LEVEL, // The selected entity is the level prefab container entity
|
||||
INVALID // Other entities are selected alongside the level prefab container entity
|
||||
Entity = 0, // All selected entities are regular entities.
|
||||
Level, // The selected entity is the prefab container entity for the level prefab, or the slice level entity.
|
||||
ContainerEntityOfFocusedPrefab, // The selected entity is the prefab container entity for the focused prefab.
|
||||
Invalid // Other entities are selected alongside the level prefab container entity.
|
||||
};
|
||||
|
||||
InspectorLayout GetCurrentInspectorLayout() const;
|
||||
|
||||
+15
-35
@@ -28,6 +28,7 @@
|
||||
#include <AzToolsFramework/Manipulators/TranslationManipulators.h>
|
||||
#include <AzToolsFramework/Maths/TransformUtils.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabFocusInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabFocusPublicInterface.h>
|
||||
#include <AzToolsFramework/ToolsComponents/EditorLockComponentBus.h>
|
||||
#include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h>
|
||||
#include <AzToolsFramework/ToolsComponents/TransformComponent.h>
|
||||
@@ -1177,8 +1178,10 @@ namespace AzToolsFramework
|
||||
continue;
|
||||
}
|
||||
|
||||
const AZ::Aabb bound = CalculateEditorEntitySelectionBounds(entityId, viewportInfo);
|
||||
debugDisplay.DrawSolidBox(bound.GetMin(), bound.GetMax());
|
||||
if (const AZ::Aabb bound = CalculateEditorEntitySelectionBounds(entityId, viewportInfo); bound.IsValid())
|
||||
{
|
||||
debugDisplay.DrawSolidBox(bound.GetMin(), bound.GetMax());
|
||||
}
|
||||
}
|
||||
|
||||
debugDisplay.DepthTestOn();
|
||||
@@ -1334,39 +1337,6 @@ namespace AzToolsFramework
|
||||
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
|
||||
m_entityIdManipulators.m_manipulators = AZStd::move(translationManipulators);
|
||||
}
|
||||
@@ -3604,6 +3574,16 @@ namespace AzToolsFramework
|
||||
m_selectedEntityIds.clear();
|
||||
m_selectedEntityIds.reserve(selectedEntityIds.size());
|
||||
AZStd::copy(selectedEntityIds.begin(), selectedEntityIds.end(), AZStd::inserter(m_selectedEntityIds, m_selectedEntityIds.end()));
|
||||
|
||||
// Do not create manipulators for the container entity of the focused prefab.
|
||||
if (auto prefabFocusPublicInterface = AZ::Interface<AzToolsFramework::Prefab::PrefabFocusPublicInterface>::Get())
|
||||
{
|
||||
AzFramework::EntityContextId editorEntityContextId = GetEntityContextId();
|
||||
if (AZ::EntityId focusRoot = prefabFocusPublicInterface->GetFocusedPrefabContainerEntityId(editorEntityContextId); focusRoot.IsValid())
|
||||
{
|
||||
m_selectedEntityIds.erase(focusRoot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EditorTransformComponentSelection::OnTransformChanged(
|
||||
|
||||
@@ -369,7 +369,6 @@ namespace O3DELauncher
|
||||
}
|
||||
}
|
||||
|
||||
void CompileCriticalAssets();
|
||||
void CreateRemoteFileIO();
|
||||
|
||||
bool ConnectToAssetProcessor()
|
||||
@@ -397,29 +396,11 @@ namespace O3DELauncher
|
||||
{
|
||||
AZ_TracePrintf("Launcher", "Connected to Asset Processor\n");
|
||||
CreateRemoteFileIO();
|
||||
CompileCriticalAssets();
|
||||
}
|
||||
|
||||
return connectedToAssetProcessor;
|
||||
}
|
||||
|
||||
//! Compiles the critical assets that are within the Engine directory of Open 3D Engine
|
||||
//! This code should be in a centralized location, but doesn't belong in AzFramework
|
||||
//! since it is specific to how Open 3D Engine projects has assets setup
|
||||
void CompileCriticalAssets()
|
||||
{
|
||||
// VERY early on, as soon as we can, request that the asset system make sure the following assets take priority over others,
|
||||
// so that by the time we ask for them there is a greater likelihood that they're already good to go.
|
||||
// these can be loaded later but are still important:
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "/texturemsg/");
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/materials");
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/geomcaches");
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetBySearchTerm, "engineassets/objects");
|
||||
|
||||
// some are specifically extra important and will cause issues if missing completely:
|
||||
AzFramework::AssetSystemRequestBus::Broadcast(&AzFramework::AssetSystem::AssetSystemRequests::CompileAssetSync, "engineassets/objects/default.cgf");
|
||||
}
|
||||
|
||||
//! Remote FileIO to use as a Virtual File System
|
||||
//! Communication of FileIOBase operations occur through an AssetProcessor connection
|
||||
void CreateRemoteFileIO()
|
||||
|
||||
@@ -61,8 +61,12 @@ namespace AssetBundler
|
||||
{
|
||||
AZStd::string absolutePath = filePath.toUtf8().data();
|
||||
if (AZ::IO::FileIOBase::GetInstance()->Exists(absolutePath.c_str()))
|
||||
{
|
||||
AZStd::string projectName = pathToProjectNameMap.at(absolutePath);
|
||||
{
|
||||
AZStd::string projectName;
|
||||
if (pathToProjectNameMap.contains(absolutePath))
|
||||
{
|
||||
projectName = pathToProjectNameMap.at(absolutePath);
|
||||
}
|
||||
|
||||
// If a project name is already specified, then the associated file is a default file
|
||||
LoadFile(absolutePath, projectName, !projectName.empty());
|
||||
|
||||
@@ -699,7 +699,6 @@ namespace AssetBuilderSDK
|
||||
|
||||
// XML files may contain generic data (avoid this in new builders - use a custom extension!)
|
||||
static const char* xmlExtensions = ".xml";
|
||||
static const char* geomCacheExtensions = ".cax";
|
||||
static const char* skeletonExtensions = ".chr";
|
||||
|
||||
static AZ::Data::AssetType unknownAssetType = AZ::Data::AssetType::CreateNull();
|
||||
@@ -710,7 +709,6 @@ namespace AssetBuilderSDK
|
||||
static AZ::Data::AssetType textureMipsAssetType("{3918728C-D3CA-4D9E-813E-A5ED20C6821E}");
|
||||
static AZ::Data::AssetType skinnedMeshLodsAssetType("{58E5824F-C27B-46FD-AD48-865BA41B7A51}");
|
||||
static AZ::Data::AssetType staticMeshLodsAssetType("{9AAE4926-CB6A-4C60-9948-A1A22F51DB23}");
|
||||
static AZ::Data::AssetType geomCacheAssetType("{EBC96071-E960-41B6-B3E3-328F515AE5DA}");
|
||||
static AZ::Data::AssetType skeletonAssetType("{60161B46-21F0-4396-A4F0-F2CCF0664CDE}");
|
||||
static AZ::Data::AssetType entityIconAssetType("{3436C30E-E2C5-4C3B-A7B9-66C94A28701B}");
|
||||
|
||||
@@ -822,11 +820,6 @@ namespace AssetBuilderSDK
|
||||
return skinnedMeshAssetType;
|
||||
}
|
||||
|
||||
if (AzFramework::StringFunc::Find(geomCacheExtensions, extension.c_str()) != AZStd::string::npos)
|
||||
{
|
||||
return geomCacheAssetType;
|
||||
}
|
||||
|
||||
if (AzFramework::StringFunc::Find(skeletonExtensions, extension.c_str()) != AZStd::string::npos)
|
||||
{
|
||||
return skeletonAssetType;
|
||||
|
||||
@@ -243,7 +243,7 @@ void AssetProcessorManagerTest::SetUp()
|
||||
m_mockApplicationManager->BusConnect();
|
||||
|
||||
m_assetProcessorManager.reset(new AssetProcessorManager_Test(m_config.get()));
|
||||
m_assertAbsorber.Clear();
|
||||
m_errorAbsorber->Clear();
|
||||
|
||||
m_isIdling = false;
|
||||
|
||||
@@ -334,9 +334,9 @@ TEST_F(AssetProcessorManagerTest, UnitTestForGettingJobInfoBySourceUUIDSuccess)
|
||||
EXPECT_STRCASEEQ(relFileName.toUtf8().data(), response.m_jobList[0].m_sourceFile.c_str());
|
||||
EXPECT_STRCASEEQ(tempPath.filePath("subfolder1").toUtf8().data(), response.m_jobList[0].m_watchFolder.c_str());
|
||||
|
||||
ASSERT_EQ(m_assertAbsorber.m_numWarningsAbsorbed, 0);
|
||||
ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 0);
|
||||
ASSERT_EQ(m_assertAbsorber.m_numAssertsAbsorbed, 0);
|
||||
ASSERT_EQ(m_errorAbsorber->m_numWarningsAbsorbed, 0);
|
||||
ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 0);
|
||||
ASSERT_EQ(m_errorAbsorber->m_numAssertsAbsorbed, 0);
|
||||
}
|
||||
|
||||
TEST_F(AssetProcessorManagerTest, WarningsAndErrorsReported_SuccessfullySavedToDatabase)
|
||||
@@ -388,9 +388,9 @@ TEST_F(AssetProcessorManagerTest, WarningsAndErrorsReported_SuccessfullySavedToD
|
||||
ASSERT_EQ(response.m_jobList[0].m_warningCount, 11);
|
||||
ASSERT_EQ(response.m_jobList[0].m_errorCount, 22);
|
||||
|
||||
ASSERT_EQ(m_assertAbsorber.m_numWarningsAbsorbed, 0);
|
||||
ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 0);
|
||||
ASSERT_EQ(m_assertAbsorber.m_numAssertsAbsorbed, 0);
|
||||
ASSERT_EQ(m_errorAbsorber->m_numWarningsAbsorbed, 0);
|
||||
ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 0);
|
||||
ASSERT_EQ(m_errorAbsorber->m_numAssertsAbsorbed, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1312,8 +1312,8 @@ void PathDependencyTest::SetUp()
|
||||
|
||||
void PathDependencyTest::TearDown()
|
||||
{
|
||||
ASSERT_EQ(m_assertAbsorber.m_numAssertsAbsorbed, 0);
|
||||
ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 0);
|
||||
ASSERT_EQ(m_errorAbsorber->m_numAssertsAbsorbed, 0);
|
||||
ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 0);
|
||||
|
||||
AssetProcessorManagerTest::TearDown();
|
||||
}
|
||||
@@ -1617,7 +1617,7 @@ TEST_F(PathDependencyTest, AssetProcessed_Impl_SelfReferrentialProductDependency
|
||||
mainFile.m_products.push_back(productAssetId);
|
||||
|
||||
// tell the APM that the asset has been processed and allow it to bubble through its event queue:
|
||||
m_assertAbsorber.Clear();
|
||||
m_errorAbsorber->Clear();
|
||||
m_assetProcessorManager->AssetProcessed(jobDetails.m_jobEntry, processJobResponse);
|
||||
ASSERT_TRUE(BlockUntilIdle(5000));
|
||||
|
||||
@@ -1627,8 +1627,8 @@ TEST_F(PathDependencyTest, AssetProcessed_Impl_SelfReferrentialProductDependency
|
||||
ASSERT_TRUE(dependencyContainer.empty());
|
||||
|
||||
// We are testing 2 different dependencies, so we should get 2 warnings
|
||||
ASSERT_EQ(m_assertAbsorber.m_numWarningsAbsorbed, 2);
|
||||
m_assertAbsorber.Clear();
|
||||
ASSERT_EQ(m_errorAbsorber->m_numWarningsAbsorbed, 2);
|
||||
m_errorAbsorber->Clear();
|
||||
}
|
||||
|
||||
// This test shows the process of deferring resolution of a path dependency works.
|
||||
@@ -1945,8 +1945,8 @@ TEST_F(PathDependencyTest, WildcardDependencies_ExcludePathsExisting_ResolveCorr
|
||||
);
|
||||
|
||||
// Test asset PrimaryFile1 has 4 conflict dependencies
|
||||
ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 4);
|
||||
m_assertAbsorber.Clear();
|
||||
ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 4);
|
||||
m_errorAbsorber->Clear();
|
||||
}
|
||||
|
||||
TEST_F(PathDependencyTest, WildcardDependencies_Deferred_ResolveCorrectly)
|
||||
@@ -2093,8 +2093,8 @@ TEST_F(PathDependencyTest, WildcardDependencies_ExcludedPathDeferred_ResolveCorr
|
||||
// Test asset PrimaryFile1 has 4 conflict dependencies
|
||||
// After test assets dep2 and dep3 are processed,
|
||||
// another 2 errors will be raised because of the confliction
|
||||
ASSERT_EQ(m_assertAbsorber.m_numErrorsAbsorbed, 6);
|
||||
m_assertAbsorber.Clear();
|
||||
ASSERT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 6);
|
||||
m_errorAbsorber->Clear();
|
||||
}
|
||||
|
||||
void PathDependencyTest::RunWildcardTest(bool useCorrectDatabaseSeparator, AssetBuilderSDK::ProductPathDependencyType pathDependencyType, bool buildDependenciesFirst)
|
||||
|
||||
@@ -58,7 +58,6 @@ protected:
|
||||
AZStd::unique_ptr<AssetProcessorManager_Test> m_assetProcessorManager;
|
||||
AZStd::unique_ptr<AssetProcessor::MockApplicationManager> m_mockApplicationManager;
|
||||
AZStd::unique_ptr<AssetProcessor::PlatformConfiguration> m_config;
|
||||
UnitTestUtils::AssertAbsorber m_assertAbsorber; // absorb asserts/warnings/errors so that the unit test output is not cluttered
|
||||
QString m_gameName;
|
||||
QDir m_normalizedCacheRootDir;
|
||||
AZStd::atomic_bool m_isIdling;
|
||||
|
||||
Reference in New Issue
Block a user