Merge branch 'stabilization/2110' into Prism/DeleteUpdateGemsUI

monroegm-disable-blank-issue-2
nggieber 4 years ago
commit 3d21a9f4bd

@ -145,7 +145,7 @@
<Class name="float" field="ProjectorNearPlane" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}" value="0.0000000" specializationTypeId="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/> <Class name="float" field="ProjectorNearPlane" type="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}" value="0.0000000" specializationTypeId="{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="ProjectorTexture" type="{68E92460-5C0C-4031-9620-6F1A08763243}" version="1" specializationTypeId="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="ProjectorTexture" type="{68E92460-5C0C-4031-9620-6F1A08763243}" version="1" specializationTypeId="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}" version="1" specializationTypeId="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}" version="1" specializationTypeId="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}" value="engineassets/textures/defaults/spot_default.dds" specializationTypeId="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}" value="" specializationTypeId="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::MaterialAsset&gt;" field="ProjectorMaterial" type="{B7B8ECC7-FF89-4A76-A50E-4C6CA2B6E6B4}" version="1" specializationTypeId="{B7B8ECC7-FF89-4A76-A50E-4C6CA2B6E6B4}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::MaterialAsset&gt;" field="ProjectorMaterial" type="{B7B8ECC7-FF89-4A76-A50E-4C6CA2B6E6B4}" version="1" specializationTypeId="{B7B8ECC7-FF89-4A76-A50E-4C6CA2B6E6B4}">

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cf441215a769562f88aa20711aee68dadcbf02597d1e2270547055e8e6aec6a3
size 77

@ -1,178 +0,0 @@
----------------------------------------------------------------------------------------------------
--
-- Copyright (c) Contributors to the Open 3D Engine Project.
-- For complete copyright and license terms please see the LICENSE at the root of this distribution.
--
-- SPDX-License-Identifier: Apache-2.0 OR MIT
--
--
--
----------------------------------------------------------------------------------------------------
Script.ReloadScript("scripts/Utils/EntityUtils.lua")
GeomCache =
{
Properties = {
geomcacheFile = "EngineAssets/GeomCaches/defaultGeomCache.cax",
bPlaying = 0,
fStartTime = 0,
bLooping = 0,
objectStandIn = "",
materialStandInMaterial = "",
objectFirstFrameStandIn = "",
materialFirstFrameStandInMaterial = "",
objectLastFrameStandIn = "",
materialLastFrameStandInMaterial = "",
fStandInDistance = 0,
fStreamInDistance = 0,
Physics = {
bPhysicalize = 0,
}
},
Editor={
Icon = "animobject.bmp",
IconOnTop = 1,
},
bPlaying = 0,
currentTime = 0,
precacheTime = 0,
bPrecachedOutputTriggered = false,
}
function GeomCache:OnLoad(table)
self.currentTime = table.currentTime;
end
function GeomCache:OnSave(table)
table.currentTime = self.currentTime;
end
function GeomCache:OnSpawn()
self.currentTime = self.Properties.fStartTime;
self:SetFromProperties();
end
function GeomCache:OnReset()
self.currentTime = self.Properties.fStartTime;
self.bPrecachedOutputTriggered = true;
self:SetFromProperties();
end
function GeomCache:SetFromProperties()
local Properties = self.Properties;
if (Properties.geomcacheFile == "") then
do return end;
end
self:LoadGeomCache(0, Properties.geomcacheFile);
self.bPlaying = Properties.bPlaying;
if (self.bPlaying == 0) then
self.currentTime = Properties.fStartTime;
end
self:SetGeomCachePlaybackTime(self.currentTime);
self:SetGeomCacheParams(Properties.bLooping, Properties.objectStandIn, Properties.materialStandInMaterial, Properties.objectFirstFrameStandIn,
Properties.materialFirstFrameStandInMaterial, Properties.objectLastFrameStandIn, Properties.materialLastFrameStandInMaterial,
Properties.fStandInDistance, Properties.fStreamInDistance);
self:SetGeomCacheStreaming(false, 0);
if (Properties.Physics.bPhysicalize == 1) then
local tempPhysParams = EntityCommon.TempPhysParams;
self:Physicalize(0, PE_ARTICULATED, tempPhysParams);
end
self:Activate(1);
end
function GeomCache:PhysicalizeThis()
local Physics = self.Properties.Physics;
EntityCommon.PhysicalizeRigid(self, 0, Physics, false);
end
function GeomCache:OnUpdate(dt)
if (self.bPlaying == 1) then
self:SetGeomCachePlaybackTime(self.currentTime);
end
if (self:IsGeomCacheStreaming() and not self.bPrecachedOutputTriggered) then
local precachedTime = self:GetGeomCachePrecachedTime();
if (precachedTime >= self.precacheTime) then
self:ActivateOutput("Precached", true);
self.bPrecachedOutputTriggered = true;
end
end
if (self.bPlaying == 1) then
self.currentTime = self.currentTime + dt;
end
end
function GeomCache:OnPropertyChange()
self:SetFromProperties();
end
function GeomCache:Event_Start(sender, val)
self.bPlaying = 1;
end
function GeomCache:Event_Stop(sender, value)
self.bPlaying = 0;
end
function GeomCache:Event_SetTime(sender, value)
self.currentTime = value;
end
function GeomCache:Event_StartStreaming(sender, value)
self.bPrecachedOutputTriggered = false;
self:SetGeomCacheStreaming(true, self.currentTime);
end
function GeomCache:Event_StopStreaming(sender, value)
self:SetGeomCacheStreaming(false, 0);
end
function GeomCache:Event_PrecacheTime(sender, value)
self.precacheTime = value;
end
function GeomCache:Event_Hide(sender, value)
self:Hide(1);
end
function GeomCache:Event_Unhide(sender, value)
self:Hide(0);
end
function GeomCache:Event_StopDrawing(sender, value)
self:SetGeomCacheDrawing(false);
end
function GeomCache:Event_StartDrawing(sender, value)
self:SetGeomCacheDrawing(true);
end
GeomCache.FlowEvents =
{
Inputs =
{
Start = { GeomCache.Event_Start, "any" },
Stop = { GeomCache.Event_Stop, "any" },
SetTime = { GeomCache.Event_SetTime, "float" },
StartStreaming = { GeomCache.Event_StartStreaming, "any" },
StopStreaming = { GeomCache.Event_StopStreaming, "any" },
PrecacheTime = { GeomCache.Event_PrecacheTime, "float" },
Hide = { GeomCache.Event_Hide, "any" },
Unhide = { GeomCache.Event_Unhide, "any" },
StopDrawing = { GeomCache.Event_StopDrawing, "any" },
StartDrawing = { GeomCache.Event_StartDrawing, "any" },
},
Outputs =
{
Precached = "bool",
},
}

@ -1362,16 +1362,6 @@ void CCryEditApp::CompileCriticalAssets() const
assetsInQueueNotifcation.BusDisconnect(); assetsInQueueNotifcation.BusDisconnect();
CCryEditApp::OutputStartupMessage(QString("Asset Processor is now ready.")); 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 bool CCryEditApp::ConnectToAssetProcessor() const

@ -60,7 +60,6 @@ struct IFileUtil
EFILE_TYPE_GEOMETRY, EFILE_TYPE_GEOMETRY,
EFILE_TYPE_TEXTURE, EFILE_TYPE_TEXTURE,
EFILE_TYPE_SOUND, EFILE_TYPE_SOUND,
EFILE_TYPE_GEOMCACHE,
EFILE_TYPE_LAST, EFILE_TYPE_LAST,
}; };

@ -956,11 +956,7 @@ void CEntityObject::Serialize(CObjectArchive& ar)
QString attachmentType; QString attachmentType;
xmlNode->getAttr("AttachmentType", attachmentType); xmlNode->getAttr("AttachmentType", attachmentType);
if (attachmentType == "GeomCacheNode") if (attachmentType == "CharacterBone")
{
m_attachmentType = eAT_GeomCacheNode;
}
else if (attachmentType == "CharacterBone")
{ {
m_attachmentType = eAT_CharacterBone; m_attachmentType = eAT_CharacterBone;
} }
@ -987,11 +983,7 @@ void CEntityObject::Serialize(CObjectArchive& ar)
{ {
if (m_attachmentType != eAT_Pivot) if (m_attachmentType != eAT_Pivot)
{ {
if (m_attachmentType == eAT_GeomCacheNode) if (m_attachmentType == eAT_CharacterBone)
{
xmlNode->setAttr("AttachmentType", "GeomCacheNode");
}
else if (m_attachmentType == eAT_CharacterBone)
{ {
xmlNode->setAttr("AttachmentType", "CharacterBone"); xmlNode->setAttr("AttachmentType", "CharacterBone");
} }
@ -1091,11 +1083,7 @@ XmlNodeRef CEntityObject::Export([[maybe_unused]] const QString& levelPath, XmlN
objNode->setAttr("ParentId", parentEntity->GetEntityId()); objNode->setAttr("ParentId", parentEntity->GetEntityId());
if (m_attachmentType != eAT_Pivot) if (m_attachmentType != eAT_Pivot)
{ {
if (m_attachmentType == eAT_GeomCacheNode) if (m_attachmentType == eAT_CharacterBone)
{
objNode->setAttr("AttachmentType", "GeomCacheNode");
}
else if (m_attachmentType == eAT_CharacterBone)
{ {
objNode->setAttr("AttachmentType", "CharacterBone"); objNode->setAttr("AttachmentType", "CharacterBone");
} }

@ -131,7 +131,6 @@ public:
enum EAttachmentType enum EAttachmentType
{ {
eAT_Pivot, eAT_Pivot,
eAT_GeomCacheNode,
eAT_CharacterBone, eAT_CharacterBone,
}; };

@ -608,7 +608,7 @@ bool CObjectManager::AddObject(CBaseObject* obj)
if (CEntityObject* entityObj = qobject_cast<CEntityObject*>(obj)) if (CEntityObject* entityObj = qobject_cast<CEntityObject*>(obj))
{ {
CEntityObject::EAttachmentType attachType = entityObj->GetAttachType(); 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); m_animatedAttachedEntities.insert(entityObj);
} }

@ -13,6 +13,7 @@
#include <Atom/RPI.Public/Scene.h> #include <Atom/RPI.Public/Scene.h>
#include <Atom/RPI.Public/View.h> #include <Atom/RPI.Public/View.h>
#include <Atom/RPI.Reflect/System/RenderPipelineDescriptor.h> #include <Atom/RPI.Reflect/System/RenderPipelineDescriptor.h>
#include <PostProcess/PostProcessFeatureProcessor.h>
#include <AzCore/Component/TransformBus.h> #include <AzCore/Component/TransformBus.h>
#include <AzCore/Math/MatrixUtils.h> #include <AzCore/Math/MatrixUtils.h>
#include <AzCore/Name/Name.h> #include <AzCore/Name/Name.h>
@ -47,18 +48,42 @@ namespace TrackView
AZ::Name viewName = AZ::Name("MainCamera"); AZ::Name viewName = AZ::Name("MainCamera");
m_view = AZ::RPI::View::CreateView(viewName, AZ::RPI::View::UsageCamera); m_view = AZ::RPI::View::CreateView(viewName, AZ::RPI::View::UsageCamera);
m_renderPipeline->SetDefaultView(m_view); 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) 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()); scene.RemoveRenderPipeline(m_renderPipeline->GetId());
m_passHierarchy.clear(); m_passHierarchy.clear();
m_renderPipeline.reset(); m_renderPipeline.reset();
m_view.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->SetCameraTransform(cameraTransform);
m_view->SetViewToClipMatrix(cameraProjection); m_view->SetViewToClipMatrix(cameraProjection);
} }

@ -39,11 +39,12 @@ namespace TrackView
CaptureFinishedCallback captureFinishedCallback); CaptureFinishedCallback captureFinishedCallback);
//! Update the internal view that is associated with the created pipeline. //! 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: private:
AZ::RPI::RenderPipelinePtr m_renderPipeline; //!< The internal render pipeline. 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_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). AZStd::vector<AZStd::string> m_passHierarchy; //!< Pass hierarchy (includes pipelineName and CopyToSwapChain).
CaptureFinishedCallback m_captureFinishedCallback; //!< Stored callback called from OnCaptureFinished. CaptureFinishedCallback m_captureFinishedCallback; //!< Stored callback called from OnCaptureFinished.

@ -16,6 +16,7 @@
#include <AzCore/Component/ComponentApplication.h> #include <AzCore/Component/ComponentApplication.h>
#include <AzFramework/Windowing/WindowBus.h> #include <AzFramework/Windowing/WindowBus.h>
#include <Atom/RPI.Public/ViewProviderBus.h>
// Qt // Qt
#include <QAction> #include <QAction>
@ -91,9 +92,12 @@ namespace
static void UpdateAtomOutputFrameCaptureView(TrackView::AtomOutputFrameCapture& atomOutputFrameCapture, const int width, const int height) static void UpdateAtomOutputFrameCaptureView(TrackView::AtomOutputFrameCapture& atomOutputFrameCapture, const int width, const int height)
{ {
const AZ::EntityId activeCameraEntityId = TrackView::ActiveCameraEntityId(); const AZ::EntityId activeCameraEntityId = TrackView::ActiveCameraEntityId();
AZ::RPI::ViewPtr view = nullptr;
AZ::RPI::ViewProviderBus::EventResult(view, activeCameraEntityId, &AZ::RPI::ViewProvider::GetView);
atomOutputFrameCapture.UpdateView( atomOutputFrameCapture.UpdateView(
TrackView::TransformFromEntityId(activeCameraEntityId), 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 */) CSequenceBatchRenderDialog::CSequenceBatchRenderDialog(float fps, QWidget* pParent /* = nullptr */)

@ -54,8 +54,8 @@
#include <Shellapi.h> #include <Shellapi.h>
#endif #endif
bool CFileUtil::s_singleFileDlgPref[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, true }; bool CFileUtil::s_multiFileDlgPref[IFileUtil::EFILE_TYPE_LAST] = { true, true, true, true };
CAutoRestorePrimaryCDRoot::~CAutoRestorePrimaryCDRoot() CAutoRestorePrimaryCDRoot::~CAutoRestorePrimaryCDRoot()
{ {

@ -100,7 +100,7 @@ namespace AZ
void Set(float x, float y, float z); void Set(float x, float y, float z);
//! Sets components from an array of 3 floats in xyz order. //! Sets components from an array of 3 floats in xyz order.
void Set(float values[]); void Set(const float values[]);
//! Indexed access using operator(), just for convenience. //! Indexed access using operator(), just for convenience.
float operator()(int32_t index) const; float operator()(int32_t index) const;

@ -186,7 +186,7 @@ namespace AZ
} }
AZ_MATH_INLINE void Vector3::Set(float values[]) AZ_MATH_INLINE void Vector3::Set(const float values[])
{ {
m_value = Simd::Vec3::LoadImmediate(values[0], values[1], values[2]); m_value = Simd::Vec3::LoadImmediate(values[0], values[1], values[2]);
} }

@ -50,7 +50,12 @@ namespace AZ
if (!s_instance) 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(); return s_instance.IsConstructed();

@ -175,20 +175,14 @@ namespace AzToolsFramework::Prefab
m_focusedInstance = focusedInstance; m_focusedInstance = focusedInstance;
m_focusedTemplateId = focusedInstance->get().GetTemplateId(); 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. // Focus on the descendants of the container entity in the Editor, if the interface is initialized.
if (m_focusModeInterface) if (m_focusModeInterface)
{ {
const AZ::EntityId containerEntityId =
(focusedInstance->get().GetParentInstance() != AZStd::nullopt)
? focusedInstance->get().GetContainerEntityId()
: AZ::EntityId();
m_focusModeInterface->SetFocusRoot(containerEntityId); m_focusModeInterface->SetFocusRoot(containerEntityId);
} }

@ -45,6 +45,7 @@ AZ_POP_DISABLE_WARNING
#include <AzToolsFramework/AssetBrowser/EBusFindAssetTypeByName.h> #include <AzToolsFramework/AssetBrowser/EBusFindAssetTypeByName.h>
#include <AzToolsFramework/ComponentMode/ComponentModeDelegate.h> #include <AzToolsFramework/ComponentMode/ComponentModeDelegate.h>
#include <AzToolsFramework/Entity/EditorEntityHelpers.h> #include <AzToolsFramework/Entity/EditorEntityHelpers.h>
#include <AzToolsFramework/Prefab/PrefabFocusPublicInterface.h>
#include <AzToolsFramework/Prefab/PrefabPublicInterface.h> #include <AzToolsFramework/Prefab/PrefabPublicInterface.h>
#include <AzToolsFramework/Slice/SliceDataFlagsCommand.h> #include <AzToolsFramework/Slice/SliceDataFlagsCommand.h>
#include <AzToolsFramework/Slice/SliceMetadataEntityContextBus.h> #include <AzToolsFramework/Slice/SliceMetadataEntityContextBus.h>
@ -894,25 +895,51 @@ namespace AzToolsFramework
{ {
if (!m_prefabsAreEnabled) 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(); AZ::EntityId levelContainerEntityId = m_prefabPublicInterface->GetLevelInstanceContainerEntityId();
if (AZStd::find(m_selectedEntityIds.begin(), m_selectedEntityIds.end(), levelContainerEntityId) != m_selectedEntityIds.end()) if (AZStd::find(m_selectedEntityIds.begin(), m_selectedEntityIds.end(), levelContainerEntityId) != m_selectedEntityIds.end())
{ {
if (m_selectedEntityIds.size() > 1) if (m_selectedEntityIds.size() > 1)
{ {
return InspectorLayout::INVALID; return InspectorLayout::Invalid;
} }
else else
{ {
return InspectorLayout::LEVEL; return InspectorLayout::Level;
} }
} }
else 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() void EntityPropertyEditor::UpdateEntityDisplay()
@ -921,7 +948,7 @@ namespace AzToolsFramework
InspectorLayout layout = GetCurrentInspectorLayout(); InspectorLayout layout = GetCurrentInspectorLayout();
if (layout == InspectorLayout::LEVEL) if (!m_prefabsAreEnabled && layout == InspectorLayout::Level)
{ {
AZStd::string levelName; AZStd::string levelName;
AzToolsFramework::EditorRequestBus::BroadcastResult(levelName, &AzToolsFramework::EditorRequests::GetLevelName); AzToolsFramework::EditorRequestBus::BroadcastResult(levelName, &AzToolsFramework::EditorRequests::GetLevelName);
@ -963,14 +990,19 @@ namespace AzToolsFramework
InspectorLayout layout = GetCurrentInspectorLayout(); InspectorLayout layout = GetCurrentInspectorLayout();
if (layout == InspectorLayout::LEVEL) if (layout == InspectorLayout::Level)
{ {
// The Level Inspector should only have a list of selectable components after the // The Level Inspector should only have a list of selectable components after the
// level entity itself is valid (i.e. "selected"). // level entity itself is valid (i.e. "selected").
return selection.empty() ? SelectionEntityTypeInfo::None : SelectionEntityTypeInfo::LevelEntity; 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; return SelectionEntityTypeInfo::Mixed;
} }
@ -1140,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->setText(entityDetailsLabelText);
m_gui->m_entityDetailsLabel->setVisible(entityDetailsVisible); m_gui->m_entityDetailsLabel->setVisible(entityDetailsVisible);
@ -1148,10 +1181,14 @@ namespace AzToolsFramework
m_gui->m_entityNameLabel->setVisible(hasEntitiesDisplayed); m_gui->m_entityNameLabel->setVisible(hasEntitiesDisplayed);
m_gui->m_entityIcon->setVisible(hasEntitiesDisplayed); m_gui->m_entityIcon->setVisible(hasEntitiesDisplayed);
m_gui->m_pinButton->setVisible(m_overrideSelectedEntityIds.empty() && hasEntitiesDisplayed && !m_isSystemEntityEditor); m_gui->m_pinButton->setVisible(m_overrideSelectedEntityIds.empty() && hasEntitiesDisplayed && !m_isSystemEntityEditor);
m_gui->m_statusLabel->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout); m_gui->m_statusLabel->setVisible(
m_gui->m_statusComboBox->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout); hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout);
m_gui->m_entityIdLabel->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout); m_gui->m_statusComboBox->setVisible(
m_gui->m_entityIdText->setVisible(hasEntitiesDisplayed && !m_isSystemEntityEditor && !isLevelLayout); 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; bool displayComponentSearchBox = hasEntitiesDisplayed;
if (hasEntitiesDisplayed) if (hasEntitiesDisplayed)
@ -1159,7 +1196,9 @@ namespace AzToolsFramework
// Build up components to display // Build up components to display
SharedComponentArray sharedComponentArray; SharedComponentArray sharedComponentArray;
BuildSharedComponentArray(sharedComponentArray, BuildSharedComponentArray(sharedComponentArray,
!(selectionEntityTypeInfo == SelectionEntityTypeInfo::OnlyStandardEntities || selectionEntityTypeInfo == SelectionEntityTypeInfo::OnlyPrefabEntities)); !(selectionEntityTypeInfo == SelectionEntityTypeInfo::OnlyStandardEntities ||
selectionEntityTypeInfo == SelectionEntityTypeInfo::OnlyPrefabEntities) ||
selectionEntityTypeInfo == SelectionEntityTypeInfo::ContainerEntityOfFocusedPrefab);
if (sharedComponentArray.size() == 0) if (sharedComponentArray.size() == 0)
{ {
@ -1175,7 +1214,8 @@ namespace AzToolsFramework
UpdateEntityDisplay(); 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); m_gui->m_entitySearchBox->setVisible(displayComponentSearchBox);
bool displayAddComponentMenu = CanAddComponentsToSelection(selectionEntityTypeInfo); bool displayAddComponentMenu = CanAddComponentsToSelection(selectionEntityTypeInfo);

@ -354,7 +354,8 @@ namespace AzToolsFramework
OnlyLayerEntities, OnlyLayerEntities,
OnlyPrefabEntities, OnlyPrefabEntities,
Mixed, Mixed,
LevelEntity LevelEntity,
ContainerEntityOfFocusedPrefab
}; };
/** /**
* Returns what kinds of entities are in the current selection. This is used because mixed selection * 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; 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; bool CanAddComponentsToSelection(const SelectionEntityTypeInfo& selectionEntityTypeInfo) const;
@ -581,9 +582,10 @@ namespace AzToolsFramework
enum class InspectorLayout enum class InspectorLayout
{ {
ENTITY = 0, // All selected entities are regular entities Entity = 0, // All selected entities are regular entities.
LEVEL, // The selected entity is the level prefab container entity Level, // The selected entity is the prefab container entity for the level prefab, or the slice level entity.
INVALID // Other entities are selected alongside the level prefab container 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; InspectorLayout GetCurrentInspectorLayout() const;

@ -28,6 +28,7 @@
#include <AzToolsFramework/Manipulators/TranslationManipulators.h> #include <AzToolsFramework/Manipulators/TranslationManipulators.h>
#include <AzToolsFramework/Maths/TransformUtils.h> #include <AzToolsFramework/Maths/TransformUtils.h>
#include <AzToolsFramework/Prefab/PrefabFocusInterface.h> #include <AzToolsFramework/Prefab/PrefabFocusInterface.h>
#include <AzToolsFramework/Prefab/PrefabFocusPublicInterface.h>
#include <AzToolsFramework/ToolsComponents/EditorLockComponentBus.h> #include <AzToolsFramework/ToolsComponents/EditorLockComponentBus.h>
#include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h> #include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h>
#include <AzToolsFramework/ToolsComponents/TransformComponent.h> #include <AzToolsFramework/ToolsComponents/TransformComponent.h>
@ -1177,8 +1178,10 @@ namespace AzToolsFramework
continue; continue;
} }
const AZ::Aabb bound = CalculateEditorEntitySelectionBounds(entityId, viewportInfo); if (const AZ::Aabb bound = CalculateEditorEntitySelectionBounds(entityId, viewportInfo); bound.IsValid())
debugDisplay.DrawSolidBox(bound.GetMin(), bound.GetMax()); {
debugDisplay.DrawSolidBox(bound.GetMin(), bound.GetMax());
}
} }
debugDisplay.DepthTestOn(); debugDisplay.DepthTestOn();
@ -1334,39 +1337,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);
} }
@ -3604,6 +3574,16 @@ namespace AzToolsFramework
m_selectedEntityIds.clear(); m_selectedEntityIds.clear();
m_selectedEntityIds.reserve(selectedEntityIds.size()); m_selectedEntityIds.reserve(selectedEntityIds.size());
AZStd::copy(selectedEntityIds.begin(), selectedEntityIds.end(), AZStd::inserter(m_selectedEntityIds, m_selectedEntityIds.end())); 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( void EditorTransformComponentSelection::OnTransformChanged(

@ -369,7 +369,6 @@ namespace O3DELauncher
} }
} }
void CompileCriticalAssets();
void CreateRemoteFileIO(); void CreateRemoteFileIO();
bool ConnectToAssetProcessor() bool ConnectToAssetProcessor()
@ -397,29 +396,11 @@ namespace O3DELauncher
{ {
AZ_TracePrintf("Launcher", "Connected to Asset Processor\n"); AZ_TracePrintf("Launcher", "Connected to Asset Processor\n");
CreateRemoteFileIO(); CreateRemoteFileIO();
CompileCriticalAssets();
} }
return connectedToAssetProcessor; 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 //! Remote FileIO to use as a Virtual File System
//! Communication of FileIOBase operations occur through an AssetProcessor connection //! Communication of FileIOBase operations occur through an AssetProcessor connection
void CreateRemoteFileIO() void CreateRemoteFileIO()

@ -61,8 +61,12 @@ namespace AssetBundler
{ {
AZStd::string absolutePath = filePath.toUtf8().data(); AZStd::string absolutePath = filePath.toUtf8().data();
if (AZ::IO::FileIOBase::GetInstance()->Exists(absolutePath.c_str())) 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 // If a project name is already specified, then the associated file is a default file
LoadFile(absolutePath, projectName, !projectName.empty()); 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!) // XML files may contain generic data (avoid this in new builders - use a custom extension!)
static const char* xmlExtensions = ".xml"; static const char* xmlExtensions = ".xml";
static const char* geomCacheExtensions = ".cax";
static const char* skeletonExtensions = ".chr"; static const char* skeletonExtensions = ".chr";
static AZ::Data::AssetType unknownAssetType = AZ::Data::AssetType::CreateNull(); 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 textureMipsAssetType("{3918728C-D3CA-4D9E-813E-A5ED20C6821E}");
static AZ::Data::AssetType skinnedMeshLodsAssetType("{58E5824F-C27B-46FD-AD48-865BA41B7A51}"); static AZ::Data::AssetType skinnedMeshLodsAssetType("{58E5824F-C27B-46FD-AD48-865BA41B7A51}");
static AZ::Data::AssetType staticMeshLodsAssetType("{9AAE4926-CB6A-4C60-9948-A1A22F51DB23}"); 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 skeletonAssetType("{60161B46-21F0-4396-A4F0-F2CCF0664CDE}");
static AZ::Data::AssetType entityIconAssetType("{3436C30E-E2C5-4C3B-A7B9-66C94A28701B}"); static AZ::Data::AssetType entityIconAssetType("{3436C30E-E2C5-4C3B-A7B9-66C94A28701B}");
@ -822,11 +820,6 @@ namespace AssetBuilderSDK
return skinnedMeshAssetType; 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) if (AzFramework::StringFunc::Find(skeletonExtensions, extension.c_str()) != AZStd::string::npos)
{ {
return skeletonAssetType; return skeletonAssetType;

@ -41,5 +41,6 @@
<file>Download.svg</file> <file>Download.svg</file>
<file>in_progress.gif</file> <file>in_progress.gif</file>
<file>gem.svg</file> <file>gem.svg</file>
<file>checkmark.svg</file>
</qresource> </qresource>
</RCC> </RCC>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="15px" height="14px" viewBox="0 0 15 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Icons / Hub / Download Copy 5</title>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Screen-1-Copy-80" transform="translate(-425.000000, -251.000000)">
<g id="Icons-/-Hub-/-Download-Copy-5" transform="translate(424.573941, 250.098705)">
<rect id="Icon-Background" x="0" y="0" width="16" height="16"></rect>
<path d="M8,1.33333333 C11.6818983,1.33333333 14.6666667,4.31810167 14.6666667,8 C14.6666667,11.6818983 11.6818983,14.6666667 8,14.6666667 C4.31810167,14.6666667 1.33333333,11.6818983 1.33333333,8 C1.33333333,4.31810167 4.31810167,1.33333333 8,1.33333333 Z M12.0947571,4 L5.96649831,10.1282588 L3.60947571,7.77123617 L2.66666667,8.71404521 L5.96649831,12.0138769 L13.0375661,4.94280904 L12.0947571,4 Z" id="Combined-Shape" fill="#58BC61"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -18,7 +18,6 @@ namespace O3DE::ProjectManager
{ {
DownloadController::DownloadController(QWidget* parent) DownloadController::DownloadController(QWidget* parent)
: QObject() : QObject()
, m_lastProgress(0)
, m_parent(parent) , m_parent(parent)
{ {
m_worker = new DownloadWorker(); m_worker = new DownloadWorker();
@ -69,10 +68,9 @@ namespace O3DE::ProjectManager
} }
} }
void DownloadController::UpdateUIProgress(int progress) void DownloadController::UpdateUIProgress(int bytesDownloaded, int totalBytes)
{ {
m_lastProgress = progress; emit GemDownloadProgress(m_gemNames.front(), bytesDownloaded, totalBytes);
emit GemDownloadProgress(m_gemNames.front(), progress);
} }
void DownloadController::HandleResults(const QString& result) void DownloadController::HandleResults(const QString& result)
@ -88,6 +86,7 @@ namespace O3DE::ProjectManager
QString gemName = m_gemNames.front(); QString gemName = m_gemNames.front();
m_gemNames.erase(m_gemNames.begin()); m_gemNames.erase(m_gemNames.begin());
emit Done(gemName, succeeded); emit Done(gemName, succeeded);
emit GemDownloadRemoved(gemName);
if (!m_gemNames.empty()) if (!m_gemNames.empty())
{ {

@ -53,7 +53,7 @@ namespace O3DE::ProjectManager
} }
} }
public slots: public slots:
void UpdateUIProgress(int progress); void UpdateUIProgress(int bytesDownloaded, int totalBytes);
void HandleResults(const QString& result); void HandleResults(const QString& result);
signals: signals:
@ -61,14 +61,12 @@ namespace O3DE::ProjectManager
void Done(const QString& gemName, bool success = true); void Done(const QString& gemName, bool success = true);
void GemDownloadAdded(const QString& gemName); void GemDownloadAdded(const QString& gemName);
void GemDownloadRemoved(const QString& gemName); void GemDownloadRemoved(const QString& gemName);
void GemDownloadProgress(const QString& gemName, int percentage); void GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes);
private: private:
DownloadWorker* m_worker; DownloadWorker* m_worker;
QThread m_workerThread; QThread m_workerThread;
QWidget* m_parent; QWidget* m_parent;
AZStd::vector<QString> m_gemNames; AZStd::vector<QString> m_gemNames;
int m_lastProgress;
}; };
} // namespace O3DE::ProjectManager } // namespace O3DE::ProjectManager

@ -20,10 +20,9 @@ namespace O3DE::ProjectManager
void DownloadWorker::StartDownload() void DownloadWorker::StartDownload()
{ {
auto gemDownloadProgress = [=](int downloadProgress) auto gemDownloadProgress = [=](int bytesDownloaded, int totalBytes)
{ {
m_downloadProgress = downloadProgress; emit UpdateProgress(bytesDownloaded, totalBytes);
emit UpdateProgress(downloadProgress);
}; };
AZ::Outcome<void, AZStd::string> gemInfoResult = AZ::Outcome<void, AZStd::string> gemInfoResult =
PythonBindingsInterface::Get()->DownloadGem(m_gemName, gemDownloadProgress, /*force*/true); PythonBindingsInterface::Get()->DownloadGem(m_gemName, gemDownloadProgress, /*force*/true);

@ -31,12 +31,11 @@ namespace O3DE::ProjectManager
void SetGemToDownload(const QString& gemName, bool downloadNow = true); void SetGemToDownload(const QString& gemName, bool downloadNow = true);
signals: signals:
void UpdateProgress(int progress); void UpdateProgress(int bytesDownloaded, int totalBytes);
void Done(QString result = ""); void Done(QString result = "");
private: private:
QString m_gemName; QString m_gemName;
int m_downloadProgress;
}; };
} // namespace O3DE::ProjectManager } // namespace O3DE::ProjectManager

@ -15,6 +15,8 @@
#include <QProgressBar> #include <QProgressBar>
#include <TagWidget.h> #include <TagWidget.h>
#include <QMenu> #include <QMenu>
#include <QLocale>
#include <QMovie>
namespace O3DE::ProjectManager namespace O3DE::ProjectManager
{ {
@ -224,7 +226,6 @@ namespace O3DE::ProjectManager
connect(m_downloadController, &DownloadController::GemDownloadAdded, this, &CartOverlayWidget::GemDownloadAdded); connect(m_downloadController, &DownloadController::GemDownloadAdded, this, &CartOverlayWidget::GemDownloadAdded);
connect(m_downloadController, &DownloadController::GemDownloadRemoved, this, &CartOverlayWidget::GemDownloadRemoved); connect(m_downloadController, &DownloadController::GemDownloadRemoved, this, &CartOverlayWidget::GemDownloadRemoved);
connect(m_downloadController, &DownloadController::GemDownloadProgress, this, &CartOverlayWidget::GemDownloadProgress); connect(m_downloadController, &DownloadController::GemDownloadProgress, this, &CartOverlayWidget::GemDownloadProgress);
connect(m_downloadController, &DownloadController::Done, this, &CartOverlayWidget::GemDownloadComplete);
} }
void CartOverlayWidget::GemDownloadAdded(const QString& gemName) void CartOverlayWidget::GemDownloadAdded(const QString& gemName)
@ -288,29 +289,41 @@ namespace O3DE::ProjectManager
} }
} }
void CartOverlayWidget::GemDownloadProgress(const QString& gemName, int percentage) void CartOverlayWidget::GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes)
{ {
QWidget* gemToUpdate = m_downloadingListWidget->findChild<QWidget*>(gemName); QWidget* gemToUpdate = m_downloadingListWidget->findChild<QWidget*>(gemName);
if (gemToUpdate) if (gemToUpdate)
{ {
QLabel* progressLabel = gemToUpdate->findChild<QLabel*>("DownloadProgressLabel"); QLabel* progressLabel = gemToUpdate->findChild<QLabel*>("DownloadProgressLabel");
if (progressLabel) QProgressBar* progressBar = gemToUpdate->findChild<QProgressBar*>("DownloadProgressBar");
// totalBytes can be 0 if the server does not return a content-length for the object
if (totalBytes != 0)
{ {
progressLabel->setText(QString("%1%").arg(percentage)); int downloadPercentage = static_cast<int>((bytesDownloaded / static_cast<float>(totalBytes)) * 100);
if (progressLabel)
{
progressLabel->setText(QString("%1%").arg(downloadPercentage));
}
if (progressBar)
{
progressBar->setValue(downloadPercentage);
}
} }
QProgressBar* progressBar = gemToUpdate->findChild<QProgressBar*>("DownloadProgressBar"); else
if (progressBar)
{ {
progressBar->setValue(percentage); if (progressLabel)
{
progressLabel->setText(QLocale::system().formattedDataSize(bytesDownloaded));
}
if (progressBar)
{
progressBar->setRange(0, 0);
}
} }
} }
} }
void CartOverlayWidget::GemDownloadComplete(const QString& gemName, bool /*success*/)
{
GemDownloadRemoved(gemName); // update the list to remove the gem that has finished
}
QVector<Tag> CartOverlayWidget::GetTagsFromModelIndices(const QVector<QModelIndex>& gems) const QVector<Tag> CartOverlayWidget::GetTagsFromModelIndices(const QVector<QModelIndex>& gems) const
{ {
QVector<Tag> tags; QVector<Tag> tags;
@ -389,7 +402,7 @@ namespace O3DE::ProjectManager
{ {
const QVector<QModelIndex> toBeAdded = m_gemModel->GatherGemsToBeAdded(/*includeDependencies=*/true); const QVector<QModelIndex> toBeAdded = m_gemModel->GatherGemsToBeAdded(/*includeDependencies=*/true);
const QVector<QModelIndex> toBeRemoved = m_gemModel->GatherGemsToBeRemoved(/*includeDependencies=*/true); const QVector<QModelIndex> toBeRemoved = m_gemModel->GatherGemsToBeRemoved(/*includeDependencies=*/true);
if (toBeAdded.isEmpty() && toBeRemoved.isEmpty()) if (toBeAdded.isEmpty() && toBeRemoved.isEmpty() && m_downloadController->IsDownloadQueueEmpty())
{ {
return; return;
} }
@ -430,6 +443,7 @@ namespace O3DE::ProjectManager
GemCatalogHeaderWidget::GemCatalogHeaderWidget(GemModel* gemModel, GemSortFilterProxyModel* filterProxyModel, DownloadController* downloadController, QWidget* parent) GemCatalogHeaderWidget::GemCatalogHeaderWidget(GemModel* gemModel, GemSortFilterProxyModel* filterProxyModel, DownloadController* downloadController, QWidget* parent)
: QFrame(parent) : QFrame(parent)
, m_downloadController(downloadController)
{ {
QHBoxLayout* hLayout = new QHBoxLayout(); QHBoxLayout* hLayout = new QHBoxLayout();
hLayout->setAlignment(Qt::AlignLeft); hLayout->setAlignment(Qt::AlignLeft);
@ -456,8 +470,25 @@ namespace O3DE::ProjectManager
hLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding)); hLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding));
hLayout->addSpacerItem(new QSpacerItem(75, 0, QSizePolicy::Fixed)); hLayout->addSpacerItem(new QSpacerItem(75, 0, QSizePolicy::Fixed));
CartButton* cartButton = new CartButton(gemModel, downloadController); // spinner
hLayout->addWidget(cartButton); m_downloadSpinnerMovie = new QMovie(":/in_progress.gif");
m_downloadSpinner = new QLabel(this);
m_downloadSpinner->setScaledContents(true);
m_downloadSpinner->setMaximumSize(16, 16);
m_downloadSpinner->setMovie(m_downloadSpinnerMovie);
hLayout->addWidget(m_downloadSpinner);
hLayout->addSpacing(8);
// downloading label
m_downloadLabel = new QLabel(tr("Downloading"));
hLayout->addWidget(m_downloadLabel);
m_downloadSpinner->hide();
m_downloadLabel->hide();
hLayout->addSpacing(16);
m_cartButton = new CartButton(gemModel, downloadController);
hLayout->addWidget(m_cartButton);
hLayout->addSpacing(16); hLayout->addSpacing(16);
// Separating line // Separating line
@ -480,6 +511,27 @@ namespace O3DE::ProjectManager
gemMenuButton->setIcon(QIcon(":/menu.svg")); gemMenuButton->setIcon(QIcon(":/menu.svg"));
gemMenuButton->setIconSize(QSize(36, 24)); gemMenuButton->setIconSize(QSize(36, 24));
hLayout->addWidget(gemMenuButton); hLayout->addWidget(gemMenuButton);
connect(m_downloadController, &DownloadController::GemDownloadAdded, this, &GemCatalogHeaderWidget::GemDownloadAdded);
connect(m_downloadController, &DownloadController::GemDownloadRemoved, this, &GemCatalogHeaderWidget::GemDownloadRemoved);
}
void GemCatalogHeaderWidget::GemDownloadAdded(const QString& /*gemName*/)
{
m_downloadSpinner->show();
m_downloadLabel->show();
m_downloadSpinnerMovie->start();
m_cartButton->ShowOverlay();
}
void GemCatalogHeaderWidget::GemDownloadRemoved(const QString& /*gemName*/)
{
if (m_downloadController->IsDownloadQueueEmpty())
{
m_downloadSpinner->hide();
m_downloadLabel->hide();
m_downloadSpinnerMovie->stop();
}
} }
void GemCatalogHeaderWidget::ReinitForProject() void GemCatalogHeaderWidget::ReinitForProject()

@ -24,6 +24,7 @@ QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
QT_FORWARD_DECLARE_CLASS(QHBoxLayout) QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
QT_FORWARD_DECLARE_CLASS(QHideEvent) QT_FORWARD_DECLARE_CLASS(QHideEvent)
QT_FORWARD_DECLARE_CLASS(QMoveEvent) QT_FORWARD_DECLARE_CLASS(QMoveEvent)
QT_FORWARD_DECLARE_CLASS(QMovie)
namespace O3DE::ProjectManager namespace O3DE::ProjectManager
{ {
@ -39,8 +40,7 @@ namespace O3DE::ProjectManager
public slots: public slots:
void GemDownloadAdded(const QString& gemName); void GemDownloadAdded(const QString& gemName);
void GemDownloadRemoved(const QString& gemName); void GemDownloadRemoved(const QString& gemName);
void GemDownloadProgress(const QString& gemName, int percentage); void GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes);
void GemDownloadComplete(const QString& gemName, bool success);
private: private:
QVector<Tag> GetTagsFromModelIndices(const QVector<QModelIndex>& gems) const; QVector<Tag> GetTagsFromModelIndices(const QVector<QModelIndex>& gems) const;
@ -96,6 +96,10 @@ namespace O3DE::ProjectManager
void ReinitForProject(); void ReinitForProject();
public slots:
void GemDownloadAdded(const QString& gemName);
void GemDownloadRemoved(const QString& gemName);
signals: signals:
void AddGem(); void AddGem();
void OpenGemsRepo(); void OpenGemsRepo();
@ -104,5 +108,10 @@ namespace O3DE::ProjectManager
private: private:
AzQtComponents::SearchLineEdit* m_filterLineEdit = nullptr; AzQtComponents::SearchLineEdit* m_filterLineEdit = nullptr;
inline constexpr static int s_height = 60; inline constexpr static int s_height = 60;
DownloadController* m_downloadController = nullptr;
QLabel* m_downloadSpinner = nullptr;
QLabel* m_downloadLabel = nullptr;
QMovie* m_downloadSpinnerMovie = nullptr;
CartButton* m_cartButton = nullptr;
}; };
} // namespace O3DE::ProjectManager } // namespace O3DE::ProjectManager

@ -575,7 +575,7 @@ namespace O3DE::ProjectManager
QModelIndex index = m_gemModel->FindIndexByNameString(gemName); QModelIndex index = m_gemModel->FindIndexByNameString(gemName);
if (index.isValid()) if (index.isValid())
{ {
m_gemModel->setData(index, GemInfo::Downloaded, GemModel::RoleDownloadStatus); m_proxyModel->setData(m_proxyModel->mapFromSource(index), GemInfo::DownloadSuccessful, GemModel::RoleDownloadStatus);
m_gemModel->setData(index, gemInfo.m_path, GemModel::RolePath); m_gemModel->setData(index, gemInfo.m_path, GemModel::RolePath);
m_gemModel->setData(index, gemInfo.m_path, GemModel::RoleDirectoryLink); m_gemModel->setData(index, gemInfo.m_path, GemModel::RoleDirectoryLink);
} }
@ -585,6 +585,14 @@ namespace O3DE::ProjectManager
} }
} }
} }
else
{
QModelIndex index = m_gemModel->FindIndexByNameString(gemName);
if (index.isValid())
{
m_proxyModel->setData(m_proxyModel->mapFromSource(index), GemInfo::DownloadFailed, GemModel::RoleDownloadStatus);
}
}
} }
ProjectManagerScreen GemCatalogScreen::GetScreenEnum() ProjectManagerScreen GemCatalogScreen::GetScreenEnum()

@ -57,6 +57,8 @@ namespace O3DE::ProjectManager
UnknownDownloadStatus = -1, UnknownDownloadStatus = -1,
NotDownloaded, NotDownloaded,
Downloading, Downloading,
DownloadSuccessful,
DownloadFailed,
Downloaded Downloaded
}; };
static QString GetDownloadStatusString(DownloadStatus status); static QString GetDownloadStatusString(DownloadStatus status);

@ -37,6 +37,8 @@ namespace O3DE::ProjectManager
SetStatusIcon(m_notDownloadedPixmap, ":/Download.svg"); SetStatusIcon(m_notDownloadedPixmap, ":/Download.svg");
SetStatusIcon(m_unknownStatusPixmap, ":/X.svg"); SetStatusIcon(m_unknownStatusPixmap, ":/X.svg");
SetStatusIcon(m_downloadSuccessfulPixmap, ":/checkmark.svg");
SetStatusIcon(m_downloadFailedPixmap, ":/Warning.svg");
m_downloadingMovie = new QMovie(":/in_progress.gif"); m_downloadingMovie = new QMovie(":/in_progress.gif");
} }
@ -480,6 +482,14 @@ namespace O3DE::ProjectManager
currentFrame = currentFrame.scaled(s_statusIconSize, s_statusIconSize); currentFrame = currentFrame.scaled(s_statusIconSize, s_statusIconSize);
statusPixmap = &currentFrame; statusPixmap = &currentFrame;
} }
else if (downloadStatus == GemInfo::DownloadStatus::DownloadSuccessful)
{
statusPixmap = &m_downloadSuccessfulPixmap;
}
else if (downloadStatus == GemInfo::DownloadStatus::DownloadFailed)
{
statusPixmap = &m_downloadFailedPixmap;
}
else if (downloadStatus == GemInfo::DownloadStatus::NotDownloaded) else if (downloadStatus == GemInfo::DownloadStatus::NotDownloaded)
{ {
statusPixmap = &m_notDownloadedPixmap; statusPixmap = &m_notDownloadedPixmap;

@ -97,6 +97,8 @@ namespace O3DE::ProjectManager
QPixmap m_unknownStatusPixmap; QPixmap m_unknownStatusPixmap;
QPixmap m_notDownloadedPixmap; QPixmap m_notDownloadedPixmap;
QPixmap m_downloadSuccessfulPixmap;
QPixmap m_downloadFailedPixmap;
QMovie* m_downloadingMovie = nullptr; QMovie* m_downloadingMovie = nullptr;
}; };
} // namespace O3DE::ProjectManager } // namespace O3DE::ProjectManager

@ -1215,7 +1215,8 @@ namespace O3DE::ProjectManager
return AZ::Success(AZStd::move(gemInfos)); return AZ::Success(AZStd::move(gemInfos));
} }
AZ::Outcome<void, AZStd::string> PythonBindings::DownloadGem(const QString& gemName, std::function<void(int)> gemProgressCallback, bool force) AZ::Outcome<void, AZStd::string> PythonBindings::DownloadGem(
const QString& gemName, std::function<void(int, int)> gemProgressCallback, bool force)
{ {
// This process is currently limited to download a single gem at a time. // This process is currently limited to download a single gem at a time.
bool downloadSucceeded = false; bool downloadSucceeded = false;
@ -1230,9 +1231,9 @@ namespace O3DE::ProjectManager
false, // skip auto register false, // skip auto register
force, // force overwrite force, // force overwrite
pybind11::cpp_function( pybind11::cpp_function(
[this, gemProgressCallback](int progress) [this, gemProgressCallback](int bytesDownloaded, int totalBytes)
{ {
gemProgressCallback(progress); gemProgressCallback(bytesDownloaded, totalBytes);
return m_requestCancelDownload; return m_requestCancelDownload;
}) // Callback for download progress and cancelling }) // Callback for download progress and cancelling

@ -66,7 +66,7 @@ namespace O3DE::ProjectManager
bool RemoveGemRepo(const QString& repoUri) override; bool RemoveGemRepo(const QString& repoUri) override;
AZ::Outcome<QVector<GemRepoInfo>, AZStd::string> GetAllGemRepoInfos() override; AZ::Outcome<QVector<GemRepoInfo>, AZStd::string> GetAllGemRepoInfos() override;
AZ::Outcome<QVector<GemInfo>, AZStd::string> GetAllGemRepoGemsInfos() override; AZ::Outcome<QVector<GemInfo>, AZStd::string> GetAllGemRepoGemsInfos() override;
AZ::Outcome<void, AZStd::string> DownloadGem(const QString& gemName, std::function<void(int)> gemProgressCallback, bool force = false) override; AZ::Outcome<void, AZStd::string> DownloadGem(const QString& gemName, std::function<void(int, int)> gemProgressCallback, bool force = false) override;
void CancelDownload() override; void CancelDownload() override;
bool IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) override; bool IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) override;

@ -231,7 +231,7 @@ namespace O3DE::ProjectManager
* @return an outcome with a string error message on failure. * @return an outcome with a string error message on failure.
*/ */
virtual AZ::Outcome<void, AZStd::string> DownloadGem( virtual AZ::Outcome<void, AZStd::string> DownloadGem(
const QString& gemName, std::function<void(int)> gemProgressCallback, bool force = false) = 0; const QString& gemName, std::function<void(int, int)> gemProgressCallback, bool force = false) = 0;
/** /**
* Cancels the current download. * Cancels the current download.

@ -8,6 +8,7 @@
set(FILES set(FILES
Include/Public/AWSMetricsBus.h Include/Public/AWSMetricsBus.h
Include/Public/MetricsAttribute.h
Include/Private/AWSMetricsConstant.h Include/Private/AWSMetricsConstant.h
Include/Private/AWSMetricsServiceApi.h Include/Private/AWSMetricsServiceApi.h
Include/Private/AWSMetricsSystemComponent.h Include/Private/AWSMetricsSystemComponent.h
@ -15,7 +16,6 @@ set(FILES
Include/Private/DefaultClientIdProvider.h Include/Private/DefaultClientIdProvider.h
Include/Private/GlobalStatistics.h Include/Private/GlobalStatistics.h
Include/Private/IdentityProvider.h Include/Private/IdentityProvider.h
Include/Private/MetricsAttribute.h
Include/Private/MetricsEvent.h Include/Private/MetricsEvent.h
Include/Private/MetricsEventBuilder.h Include/Private/MetricsEventBuilder.h
Include/Private/MetricsManager.h Include/Private/MetricsManager.h

@ -30,7 +30,7 @@ namespace AZ
class TransformServiceFeatureProcessor; class TransformServiceFeatureProcessor;
class RayTracingFeatureProcessor; class RayTracingFeatureProcessor;
class MeshDataInstance class ModelDataInstance
{ {
friend class MeshFeatureProcessor; friend class MeshFeatureProcessor;
friend class MeshLoader; friend class MeshLoader;
@ -47,7 +47,7 @@ namespace AZ
public: public:
using ModelChangedEvent = MeshFeatureProcessorInterface::ModelChangedEvent; using ModelChangedEvent = MeshFeatureProcessorInterface::ModelChangedEvent;
MeshLoader(const Data::Asset<RPI::ModelAsset>& modelAsset, MeshDataInstance* parent); MeshLoader(const Data::Asset<RPI::ModelAsset>& modelAsset, ModelDataInstance* parent);
~MeshLoader(); ~MeshLoader();
ModelChangedEvent& GetModelChangedEvent(); ModelChangedEvent& GetModelChangedEvent();
@ -68,7 +68,7 @@ namespace AZ
} }; } };
MeshFeatureProcessorInterface::ModelChangedEvent m_modelChangedEvent; MeshFeatureProcessorInterface::ModelChangedEvent m_modelChangedEvent;
Data::Asset<RPI::ModelAsset> m_modelAsset; Data::Asset<RPI::ModelAsset> m_modelAsset;
MeshDataInstance* m_parent = nullptr; ModelDataInstance* m_parent = nullptr;
}; };
void DeInit(); void DeInit();
@ -99,7 +99,8 @@ namespace AZ
//! A reference to the original model asset in case it got cloned before creating the model instance. //! A reference to the original model asset in case it got cloned before creating the model instance.
Data::Asset<RPI::ModelAsset> m_originalModelAsset; Data::Asset<RPI::ModelAsset> m_originalModelAsset;
Data::Instance<RPI::ShaderResourceGroup> m_shaderResourceGroup; //! List of object SRGs used by meshes in this model
AZStd::vector<Data::Instance<RPI::ShaderResourceGroup>> m_objectSrgList;
AZStd::unique_ptr<MeshLoader> m_meshLoader; AZStd::unique_ptr<MeshLoader> m_meshLoader;
RPI::Scene* m_scene = nullptr; RPI::Scene* m_scene = nullptr;
RHI::DrawItemSortKey m_sortKey; RHI::DrawItemSortKey m_sortKey;
@ -152,7 +153,7 @@ namespace AZ
Data::Instance<RPI::Model> GetModel(const MeshHandle& meshHandle) const override; Data::Instance<RPI::Model> GetModel(const MeshHandle& meshHandle) const override;
Data::Asset<RPI::ModelAsset> GetModelAsset(const MeshHandle& meshHandle) const override; Data::Asset<RPI::ModelAsset> GetModelAsset(const MeshHandle& meshHandle) const override;
Data::Instance<RPI::ShaderResourceGroup> GetObjectSrg(const MeshHandle& meshHandle) const override; const AZStd::vector<Data::Instance<RPI::ShaderResourceGroup>>& GetObjectSrgs(const MeshHandle& meshHandle) const override;
void QueueObjectSrgForCompile(const MeshHandle& meshHandle) const override; void QueueObjectSrgForCompile(const MeshHandle& meshHandle) const override;
void SetMaterialAssignmentMap(const MeshHandle& meshHandle, const Data::Instance<RPI::Material>& material) override; void SetMaterialAssignmentMap(const MeshHandle& meshHandle, const Data::Instance<RPI::Material>& material) override;
void SetMaterialAssignmentMap(const MeshHandle& meshHandle, const MaterialAssignmentMap& materials) override; void SetMaterialAssignmentMap(const MeshHandle& meshHandle, const MaterialAssignmentMap& materials) override;
@ -195,7 +196,7 @@ namespace AZ
void OnRenderPipelineRemoved(RPI::RenderPipeline* pipeline) override; void OnRenderPipelineRemoved(RPI::RenderPipeline* pipeline) override;
AZStd::concurrency_checker m_meshDataChecker; AZStd::concurrency_checker m_meshDataChecker;
StableDynamicArray<MeshDataInstance> m_meshData; StableDynamicArray<ModelDataInstance> m_modelData;
TransformServiceFeatureProcessor* m_transformService; TransformServiceFeatureProcessor* m_transformService;
RayTracingFeatureProcessor* m_rayTracingFeatureProcessor = nullptr; RayTracingFeatureProcessor* m_rayTracingFeatureProcessor = nullptr;
AZ::RPI::ShaderSystemInterface::GlobalShaderOptionUpdatedEvent::Handler m_handleGlobalShaderOptionUpdate; AZ::RPI::ShaderSystemInterface::GlobalShaderOptionUpdatedEvent::Handler m_handleGlobalShaderOptionUpdate;

@ -20,7 +20,7 @@ namespace AZ
{ {
namespace Render namespace Render
{ {
class MeshDataInstance; class ModelDataInstance;
//! Settings to apply to a mesh handle when acquiring it for the first time //! Settings to apply to a mesh handle when acquiring it for the first time
struct MeshHandleDescriptor struct MeshHandleDescriptor
@ -40,7 +40,7 @@ namespace AZ
public: public:
AZ_RTTI(AZ::Render::MeshFeatureProcessorInterface, "{975D7F0C-2E7E-4819-94D0-D3C4E2024721}", FeatureProcessor); AZ_RTTI(AZ::Render::MeshFeatureProcessorInterface, "{975D7F0C-2E7E-4819-94D0-D3C4E2024721}", FeatureProcessor);
using MeshHandle = StableDynamicArrayHandle<MeshDataInstance>; using MeshHandle = StableDynamicArrayHandle<ModelDataInstance>;
using ModelChangedEvent = Event<const Data::Instance<RPI::Model>>; using ModelChangedEvent = Event<const Data::Instance<RPI::Model>>;
//! Acquires a model with an optional collection of material assignments. //! Acquires a model with an optional collection of material assignments.
@ -61,12 +61,15 @@ namespace AZ
virtual Data::Instance<RPI::Model> GetModel(const MeshHandle& meshHandle) const = 0; virtual Data::Instance<RPI::Model> GetModel(const MeshHandle& meshHandle) const = 0;
//! Gets the underlying RPI::ModelAsset for a meshHandle. //! Gets the underlying RPI::ModelAsset for a meshHandle.
virtual Data::Asset<RPI::ModelAsset> GetModelAsset(const MeshHandle& meshHandle) const = 0; virtual Data::Asset<RPI::ModelAsset> GetModelAsset(const MeshHandle& meshHandle) const = 0;
//! Gets the ObjectSrg for a meshHandle.
//! Updating the ObjectSrg should be followed by a call to QueueObjectSrgForCompile, //! Gets the ObjectSrgs for a meshHandle.
//! instead of compiling the srg directly. This way, if the srg has already been queued for compile, //! Updating the ObjectSrgs should be followed by a call to QueueObjectSrgForCompile,
//! it will not be queued twice in the same frame. The ObjectSrg should not be updated during //! instead of compiling the srgs directly. This way, if the srgs have already been queued for compile,
//! they will not be queued twice in the same frame. The ObjectSrgs should not be updated during
//! Simulate, or it will create a race between updating the data and the call to Compile //! Simulate, or it will create a race between updating the data and the call to Compile
virtual Data::Instance<RPI::ShaderResourceGroup> GetObjectSrg(const MeshHandle& meshHandle) const = 0; //! Cases where there may be multiple ObjectSrgs: if a model has multiple submeshes and those submeshes use different
//! materials with different object SRGs.
virtual const AZStd::vector<Data::Instance<RPI::ShaderResourceGroup>>& GetObjectSrgs(const MeshHandle& meshHandle) const = 0;
//! Queues the object srg for compile. //! Queues the object srg for compile.
virtual void QueueObjectSrgForCompile(const MeshHandle& meshHandle) const = 0; virtual void QueueObjectSrgForCompile(const MeshHandle& meshHandle) const = 0;
//! Sets the MaterialAssignmentMap for a meshHandle, using just a single material for the DefaultMaterialAssignmentId. //! Sets the MaterialAssignmentMap for a meshHandle, using just a single material for the DefaultMaterialAssignmentId.

@ -19,7 +19,7 @@ namespace UnitTest
MOCK_METHOD1(CloneMesh, MeshHandle(const MeshHandle&)); MOCK_METHOD1(CloneMesh, MeshHandle(const MeshHandle&));
MOCK_CONST_METHOD1(GetModel, AZStd::intrusive_ptr<AZ::RPI::Model>(const MeshHandle&)); MOCK_CONST_METHOD1(GetModel, AZStd::intrusive_ptr<AZ::RPI::Model>(const MeshHandle&));
MOCK_CONST_METHOD1(GetModelAsset, AZ::Data::Asset<AZ::RPI::ModelAsset>(const MeshHandle&)); MOCK_CONST_METHOD1(GetModelAsset, AZ::Data::Asset<AZ::RPI::ModelAsset>(const MeshHandle&));
MOCK_CONST_METHOD1(GetObjectSrg, AZStd::intrusive_ptr<AZ::RPI::ShaderResourceGroup>(const MeshHandle&)); MOCK_CONST_METHOD1(GetObjectSrgs, const AZStd::vector<AZStd::intrusive_ptr<AZ::RPI::ShaderResourceGroup>>&(const MeshHandle&));
MOCK_CONST_METHOD1(QueueObjectSrgForCompile, void(const MeshHandle&)); MOCK_CONST_METHOD1(QueueObjectSrgForCompile, void(const MeshHandle&));
MOCK_CONST_METHOD1(GetMaterialAssignmentMap, const AZ::Render::MaterialAssignmentMap&(const MeshHandle&)); MOCK_CONST_METHOD1(GetMaterialAssignmentMap, const AZ::Render::MaterialAssignmentMap&(const MeshHandle&));
MOCK_METHOD2(ConnectModelChangeEventHandler, void(const MeshHandle&, ModelChangedEvent::Handler&)); MOCK_METHOD2(ConnectModelChangeEventHandler, void(const MeshHandle&, ModelChangedEvent::Handler&));

@ -1056,7 +1056,7 @@ namespace AZ
// if the shadow is rendering in an EnvironmentCubeMapPass it also needs to be a ReflectiveCubeMap view, // if the shadow is rendering in an EnvironmentCubeMapPass it also needs to be a ReflectiveCubeMap view,
// to filter out shadows from objects that are excluded from the cubemap // to filter out shadows from objects that are excluded from the cubemap
RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassClass<RPI::EnvironmentCubeMapPass>(); RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassClass<RPI::EnvironmentCubeMapPass>();
passFilter.SetOwenrScene(GetParentScene()); // only handles passes for this scene passFilter.SetOwnerScene(GetParentScene()); // only handles passes for this scene
RPI::PassSystemInterface::Get()->ForEachPass(passFilter, [&usageFlags]([[maybe_unused]] RPI::Pass* pass) -> RPI::PassFilterExecutionFlow RPI::PassSystemInterface::Get()->ForEachPass(passFilter, [&usageFlags]([[maybe_unused]] RPI::Pass* pass) -> RPI::PassFilterExecutionFlow
{ {
usageFlags |= RPI::View::UsageReflectiveCubeMap; usageFlags |= RPI::View::UsageReflectiveCubeMap;

@ -67,7 +67,7 @@ namespace AZ
m_handleGlobalShaderOptionUpdate.Disconnect(); m_handleGlobalShaderOptionUpdate.Disconnect();
DisableSceneNotification(); DisableSceneNotification();
AZ_Warning("MeshFeatureProcessor", m_meshData.size() == 0, AZ_Warning("MeshFeatureProcessor", m_modelData.size() == 0,
"Deactivaing the MeshFeatureProcessor, but there are still outstanding mesh handles.\n" "Deactivaing the MeshFeatureProcessor, but there are still outstanding mesh handles.\n"
); );
m_transformService = nullptr; m_transformService = nullptr;
@ -81,7 +81,7 @@ namespace AZ
AZStd::concurrency_check_scope scopeCheck(m_meshDataChecker); AZStd::concurrency_check_scope scopeCheck(m_meshDataChecker);
const auto iteratorRanges = m_meshData.GetParallelRanges(); const auto iteratorRanges = m_modelData.GetParallelRanges();
AZ::JobCompletion jobCompletion; AZ::JobCompletion jobCompletion;
for (const auto& iteratorRange : iteratorRanges) for (const auto& iteratorRange : iteratorRanges)
{ {
@ -125,11 +125,11 @@ namespace AZ
m_forceRebuildDrawPackets = false; m_forceRebuildDrawPackets = false;
// CullingSystem::RegisterOrUpdateCullable() is not threadsafe, so need to do those updates in a single thread // CullingSystem::RegisterOrUpdateCullable() is not threadsafe, so need to do those updates in a single thread
for (MeshDataInstance& meshDataInstance : m_meshData) for (ModelDataInstance& modelDataInstance : m_modelData)
{ {
if (meshDataInstance.m_model && meshDataInstance.m_cullBoundsNeedsUpdate) if (modelDataInstance.m_model && modelDataInstance.m_cullBoundsNeedsUpdate)
{ {
meshDataInstance.UpdateCullBounds(m_transformService); modelDataInstance.UpdateCullBounds(m_transformService);
} }
} }
} }
@ -151,14 +151,14 @@ namespace AZ
AZ_PROFILE_SCOPE(AzRender, "MeshFeatureProcessor: AcquireMesh"); AZ_PROFILE_SCOPE(AzRender, "MeshFeatureProcessor: AcquireMesh");
// don't need to check the concurrency during emplace() because the StableDynamicArray won't move the other elements during insertion // don't need to check the concurrency during emplace() because the StableDynamicArray won't move the other elements during insertion
MeshHandle meshDataHandle = m_meshData.emplace(); MeshHandle meshDataHandle = m_modelData.emplace();
meshDataHandle->m_descriptor = descriptor; meshDataHandle->m_descriptor = descriptor;
meshDataHandle->m_scene = GetParentScene(); meshDataHandle->m_scene = GetParentScene();
meshDataHandle->m_materialAssignments = materials; meshDataHandle->m_materialAssignments = materials;
meshDataHandle->m_objectId = m_transformService->ReserveObjectId(); meshDataHandle->m_objectId = m_transformService->ReserveObjectId();
meshDataHandle->m_originalModelAsset = descriptor.m_modelAsset; meshDataHandle->m_originalModelAsset = descriptor.m_modelAsset;
meshDataHandle->m_meshLoader = AZStd::make_unique<MeshDataInstance::MeshLoader>(descriptor.m_modelAsset, &*meshDataHandle); meshDataHandle->m_meshLoader = AZStd::make_unique<ModelDataInstance::MeshLoader>(descriptor.m_modelAsset, &*meshDataHandle);
return meshDataHandle; return meshDataHandle;
} }
@ -183,7 +183,7 @@ namespace AZ
m_transformService->ReleaseObjectId(meshHandle->m_objectId); m_transformService->ReleaseObjectId(meshHandle->m_objectId);
AZStd::concurrency_check_scope scopeCheck(m_meshDataChecker); AZStd::concurrency_check_scope scopeCheck(m_meshDataChecker);
m_meshData.erase(meshHandle); m_modelData.erase(meshHandle);
return true; return true;
} }
@ -215,9 +215,10 @@ namespace AZ
return {}; return {};
} }
Data::Instance<RPI::ShaderResourceGroup> MeshFeatureProcessor::GetObjectSrg(const MeshHandle& meshHandle) const const AZStd::vector<Data::Instance<RPI::ShaderResourceGroup>>& MeshFeatureProcessor::GetObjectSrgs(const MeshHandle& meshHandle) const
{ {
return meshHandle.IsValid() ? meshHandle->m_shaderResourceGroup : nullptr; static AZStd::vector<Data::Instance<RPI::ShaderResourceGroup>> staticEmptyList;
return meshHandle.IsValid() ? meshHandle->m_objectSrgList : staticEmptyList;
} }
void MeshFeatureProcessor::QueueObjectSrgForCompile(const MeshHandle& meshHandle) const void MeshFeatureProcessor::QueueObjectSrgForCompile(const MeshHandle& meshHandle) const
@ -274,9 +275,9 @@ namespace AZ
{ {
if (meshHandle.IsValid()) if (meshHandle.IsValid())
{ {
MeshDataInstance& meshData = *meshHandle; ModelDataInstance& modelData = *meshHandle;
meshData.m_cullBoundsNeedsUpdate = true; modelData.m_cullBoundsNeedsUpdate = true;
meshData.m_objectSrgNeedsUpdate = true; modelData.m_objectSrgNeedsUpdate = true;
m_transformService->SetTransformForId(meshHandle->m_objectId, transform, nonUniformScale); m_transformService->SetTransformForId(meshHandle->m_objectId, transform, nonUniformScale);
@ -292,10 +293,10 @@ namespace AZ
{ {
if (meshHandle.IsValid()) if (meshHandle.IsValid())
{ {
MeshDataInstance& meshData = *meshHandle; ModelDataInstance& modelData = *meshHandle;
meshData.m_aabb = localAabb; modelData.m_aabb = localAabb;
meshData.m_cullBoundsNeedsUpdate = true; modelData.m_cullBoundsNeedsUpdate = true;
meshData.m_objectSrgNeedsUpdate = true; modelData.m_objectSrgNeedsUpdate = true;
} }
}; };
@ -465,7 +466,7 @@ namespace AZ
void MeshFeatureProcessor::UpdateMeshReflectionProbes() void MeshFeatureProcessor::UpdateMeshReflectionProbes()
{ {
// we need to rebuild the Srg for any meshes that are using the forward pass IBL specular option // we need to rebuild the Srg for any meshes that are using the forward pass IBL specular option
for (auto& meshInstance : m_meshData) for (auto& meshInstance : m_modelData)
{ {
if (meshInstance.m_descriptor.m_useForwardPassIblSpecular) if (meshInstance.m_descriptor.m_useForwardPassIblSpecular)
{ {
@ -474,14 +475,14 @@ namespace AZ
} }
} }
// MeshDataInstance::MeshLoader... // ModelDataInstance::MeshLoader...
MeshDataInstance::MeshLoader::MeshLoader(const Data::Asset<RPI::ModelAsset>& modelAsset, MeshDataInstance* parent) ModelDataInstance::MeshLoader::MeshLoader(const Data::Asset<RPI::ModelAsset>& modelAsset, ModelDataInstance* parent)
: m_modelAsset(modelAsset) : m_modelAsset(modelAsset)
, m_parent(parent) , m_parent(parent)
{ {
if (!m_modelAsset.GetId().IsValid()) if (!m_modelAsset.GetId().IsValid())
{ {
AZ_Error("MeshDataInstance::MeshLoader", false, "Invalid model asset Id."); AZ_Error("ModelDataInstance::MeshLoader", false, "Invalid model asset Id.");
return; return;
} }
@ -494,19 +495,19 @@ namespace AZ
AzFramework::AssetCatalogEventBus::Handler::BusConnect(); AzFramework::AssetCatalogEventBus::Handler::BusConnect();
} }
MeshDataInstance::MeshLoader::~MeshLoader() ModelDataInstance::MeshLoader::~MeshLoader()
{ {
AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); AzFramework::AssetCatalogEventBus::Handler::BusDisconnect();
Data::AssetBus::Handler::BusDisconnect(); Data::AssetBus::Handler::BusDisconnect();
} }
MeshFeatureProcessorInterface::ModelChangedEvent& MeshDataInstance::MeshLoader::GetModelChangedEvent() MeshFeatureProcessorInterface::ModelChangedEvent& ModelDataInstance::MeshLoader::GetModelChangedEvent()
{ {
return m_modelChangedEvent; return m_modelChangedEvent;
} }
//! AssetBus::Handler overrides... //! AssetBus::Handler overrides...
void MeshDataInstance::MeshLoader::OnAssetReady(Data::Asset<Data::AssetData> asset) void ModelDataInstance::MeshLoader::OnAssetReady(Data::Asset<Data::AssetData> asset)
{ {
Data::Asset<RPI::ModelAsset> modelAsset = asset; Data::Asset<RPI::ModelAsset> modelAsset = asset;
@ -527,7 +528,7 @@ namespace AZ
} }
else else
{ {
AZ_Error("MeshDataInstance", false, "Cannot clone model for '%s'. Cloth simulation results won't be individual per entity.", modelAsset->GetName().GetCStr()); AZ_Error("ModelDataInstance", false, "Cannot clone model for '%s'. Cloth simulation results won't be individual per entity.", modelAsset->GetName().GetCStr());
model = RPI::Model::FindOrCreate(modelAsset); model = RPI::Model::FindOrCreate(modelAsset);
} }
} }
@ -547,29 +548,29 @@ namespace AZ
{ {
//when running with null renderer, the RPI::Model::FindOrCreate(...) is expected to return nullptr, so suppress this error. //when running with null renderer, the RPI::Model::FindOrCreate(...) is expected to return nullptr, so suppress this error.
AZ_Error( AZ_Error(
"MeshDataInstance::OnAssetReady", RHI::IsNullRenderer(), "Failed to create model instance for '%s'", "ModelDataInstance::OnAssetReady", RHI::IsNullRenderer(), "Failed to create model instance for '%s'",
asset.GetHint().c_str()); asset.GetHint().c_str());
} }
} }
void MeshDataInstance::MeshLoader::OnModelReloaded(Data::Asset<Data::AssetData> asset) void ModelDataInstance::MeshLoader::OnModelReloaded(Data::Asset<Data::AssetData> asset)
{ {
OnAssetReady(asset); OnAssetReady(asset);
} }
void MeshDataInstance::MeshLoader::OnAssetError(Data::Asset<Data::AssetData> asset) void ModelDataInstance::MeshLoader::OnAssetError(Data::Asset<Data::AssetData> asset)
{ {
// Note: m_modelAsset and asset represents same asset, but only m_modelAsset contains the file path in its hint from serialization // Note: m_modelAsset and asset represents same asset, but only m_modelAsset contains the file path in its hint from serialization
AZ_Error( AZ_Error(
"MeshDataInstance::MeshLoader", false, "Failed to load asset %s. It may be missing, or not be finished processing", "ModelDataInstance::MeshLoader", false, "Failed to load asset %s. It may be missing, or not be finished processing",
m_modelAsset.GetHint().c_str()); m_modelAsset.GetHint().c_str());
AzFramework::AssetSystemRequestBus::Broadcast( AzFramework::AssetSystemRequestBus::Broadcast(
&AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetByUuid, m_modelAsset.GetId().m_guid); &AzFramework::AssetSystem::AssetSystemRequests::EscalateAssetByUuid, m_modelAsset.GetId().m_guid);
} }
void MeshDataInstance::MeshLoader::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) void ModelDataInstance::MeshLoader::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId)
{ {
if (assetId == m_modelAsset.GetId()) if (assetId == m_modelAsset.GetId())
{ {
@ -584,7 +585,7 @@ namespace AZ
} }
} }
void MeshDataInstance::MeshLoader::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId) void ModelDataInstance::MeshLoader::OnCatalogAssetAdded(const AZ::Data::AssetId& assetId)
{ {
if (assetId == m_modelAsset.GetId()) if (assetId == m_modelAsset.GetId())
{ {
@ -599,9 +600,9 @@ namespace AZ
} }
} }
// MeshDataInstance... // ModelDataInstance...
void MeshDataInstance::DeInit() void ModelDataInstance::DeInit()
{ {
m_scene->GetCullingScene()->UnregisterCullable(m_cullable); m_scene->GetCullingScene()->UnregisterCullable(m_cullable);
@ -609,11 +610,11 @@ namespace AZ
m_drawPacketListsByLod.clear(); m_drawPacketListsByLod.clear();
m_materialAssignments.clear(); m_materialAssignments.clear();
m_shaderResourceGroup = {}; m_objectSrgList = {};
m_model = {}; m_model = {};
} }
void MeshDataInstance::Init(Data::Instance<RPI::Model> model) void ModelDataInstance::Init(Data::Instance<RPI::Model> model)
{ {
m_model = model; m_model = model;
const size_t modelLodCount = m_model->GetLodCount(); const size_t modelLodCount = m_model->GetLodCount();
@ -623,11 +624,11 @@ namespace AZ
BuildDrawPacketList(modelLodIndex); BuildDrawPacketList(modelLodIndex);
} }
if (m_shaderResourceGroup) for(auto& objectSrg : m_objectSrgList)
{ {
// Set object Id once since it never changes // Set object Id once since it never changes
RHI::ShaderInputNameIndex objectIdIndex = "m_objectId"; RHI::ShaderInputNameIndex objectIdIndex = "m_objectId";
m_shaderResourceGroup->SetConstant(objectIdIndex, m_objectId.GetIndex()); objectSrg->SetConstant(objectIdIndex, m_objectId.GetIndex());
objectIdIndex.AssertValid(); objectIdIndex.AssertValid();
} }
@ -643,12 +644,12 @@ namespace AZ
m_objectSrgNeedsUpdate = true; m_objectSrgNeedsUpdate = true;
} }
void MeshDataInstance::BuildDrawPacketList(size_t modelLodIndex) void ModelDataInstance::BuildDrawPacketList(size_t modelLodIndex)
{ {
RPI::ModelLod& modelLod = *m_model->GetLods()[modelLodIndex]; RPI::ModelLod& modelLod = *m_model->GetLods()[modelLodIndex];
const size_t meshCount = modelLod.GetMeshes().size(); const size_t meshCount = modelLod.GetMeshes().size();
MeshDataInstance::DrawPacketList& drawPacketListOut = m_drawPacketListsByLod[modelLodIndex]; ModelDataInstance::DrawPacketList& drawPacketListOut = m_drawPacketListsByLod[modelLodIndex];
drawPacketListOut.clear(); drawPacketListOut.clear();
drawPacketListOut.reserve(meshCount); drawPacketListOut.reserve(meshCount);
@ -682,27 +683,32 @@ namespace AZ
continue; continue;
} }
if (m_shaderResourceGroup && m_shaderResourceGroup->GetLayout()->GetHash() != objectSrgLayout->GetHash()) Data::Instance<RPI::ShaderResourceGroup> meshObjectSrg;
// See if the object SRG for this mesh is already in our list of object SRGs
for (auto& objectSrgIter : m_objectSrgList)
{ {
AZ_Warning("MeshFeatureProcessor", false, "All materials on a model must use the same per-object ShaderResourceGroup. Skipping."); if (objectSrgIter->GetLayout()->GetHash() == objectSrgLayout->GetHash())
continue; {
meshObjectSrg = objectSrgIter;
}
} }
// The first time we find the per-surface SRG asset we create an instance and store it // If the object SRG for this mesh was not already in the list, create it and add it to the list
// in shaderResourceGroupInOut. All of the Model's draw packets will use this same instance. if (!meshObjectSrg)
if (!m_shaderResourceGroup)
{ {
auto& shaderAsset = material->GetAsset()->GetMaterialTypeAsset()->GetShaderAssetForObjectSrg(); auto& shaderAsset = material->GetAsset()->GetMaterialTypeAsset()->GetShaderAssetForObjectSrg();
m_shaderResourceGroup = RPI::ShaderResourceGroup::Create(shaderAsset, objectSrgLayout->GetName()); meshObjectSrg = RPI::ShaderResourceGroup::Create(shaderAsset, objectSrgLayout->GetName());
if (!m_shaderResourceGroup) if (!meshObjectSrg)
{ {
AZ_Warning("MeshFeatureProcessor", false, "Failed to create a new shader resource group, skipping."); AZ_Warning("MeshFeatureProcessor", false, "Failed to create a new shader resource group, skipping.");
continue; continue;
} }
m_objectSrgList.push_back(meshObjectSrg);
} }
// setup the mesh draw packet // setup the mesh draw packet
RPI::MeshDrawPacket drawPacket(modelLod, meshIndex, material, m_shaderResourceGroup, materialAssignment.m_matModUvOverrides); RPI::MeshDrawPacket drawPacket(modelLod, meshIndex, material, meshObjectSrg, materialAssignment.m_matModUvOverrides);
// set the shader option to select forward pass IBL specular if necessary // set the shader option to select forward pass IBL specular if necessary
if (!drawPacket.SetShaderOption(AZ::Name("o_meshUseForwardPassIBLSpecular"), AZ::RPI::ShaderOptionValue{ m_descriptor.m_useForwardPassIblSpecular })) if (!drawPacket.SetShaderOption(AZ::Name("o_meshUseForwardPassIBLSpecular"), AZ::RPI::ShaderOptionValue{ m_descriptor.m_useForwardPassIblSpecular }))
@ -726,7 +732,7 @@ namespace AZ
} }
} }
void MeshDataInstance::SetRayTracingData() void ModelDataInstance::SetRayTracingData()
{ {
if (!m_model) if (!m_model)
{ {
@ -993,7 +999,7 @@ namespace AZ
rayTracingFeatureProcessor->SetMesh(m_objectId, m_model->GetModelAsset()->GetId(), subMeshes); rayTracingFeatureProcessor->SetMesh(m_objectId, m_model->GetModelAsset()->GetId(), subMeshes);
} }
void MeshDataInstance::RemoveRayTracingData() void ModelDataInstance::RemoveRayTracingData()
{ {
// remove from ray tracing // remove from ray tracing
RayTracingFeatureProcessor* rayTracingFeatureProcessor = m_scene->GetFeatureProcessor<RayTracingFeatureProcessor>(); RayTracingFeatureProcessor* rayTracingFeatureProcessor = m_scene->GetFeatureProcessor<RayTracingFeatureProcessor>();
@ -1003,7 +1009,7 @@ namespace AZ
} }
} }
void MeshDataInstance::SetSortKey(RHI::DrawItemSortKey sortKey) void ModelDataInstance::SetSortKey(RHI::DrawItemSortKey sortKey)
{ {
m_sortKey = sortKey; m_sortKey = sortKey;
for (auto& drawPacketList : m_drawPacketListsByLod) for (auto& drawPacketList : m_drawPacketListsByLod)
@ -1015,24 +1021,24 @@ namespace AZ
} }
} }
RHI::DrawItemSortKey MeshDataInstance::GetSortKey() const RHI::DrawItemSortKey ModelDataInstance::GetSortKey() const
{ {
return m_sortKey; return m_sortKey;
} }
void MeshDataInstance::SetMeshLodConfiguration(RPI::Cullable::LodConfiguration meshLodConfig) void ModelDataInstance::SetMeshLodConfiguration(RPI::Cullable::LodConfiguration meshLodConfig)
{ {
m_cullable.m_lodData.m_lodConfiguration = meshLodConfig; m_cullable.m_lodData.m_lodConfiguration = meshLodConfig;
} }
RPI::Cullable::LodConfiguration MeshDataInstance::GetMeshLodConfiguration() const RPI::Cullable::LodConfiguration ModelDataInstance::GetMeshLodConfiguration() const
{ {
return m_cullable.m_lodData.m_lodConfiguration; return m_cullable.m_lodData.m_lodConfiguration;
} }
void MeshDataInstance::UpdateDrawPackets(bool forceUpdate /*= false*/) void ModelDataInstance::UpdateDrawPackets(bool forceUpdate /*= false*/)
{ {
AZ_PROFILE_SCOPE(AzRender, "MeshDataInstance:: UpdateDrawPackets"); AZ_PROFILE_SCOPE(AzRender, "ModelDataInstance:: UpdateDrawPackets");
for (auto& drawPacketList : m_drawPacketListsByLod) for (auto& drawPacketList : m_drawPacketListsByLod)
{ {
for (auto& drawPacket : drawPacketList) for (auto& drawPacket : drawPacketList)
@ -1045,9 +1051,9 @@ namespace AZ
} }
} }
void MeshDataInstance::BuildCullable() void ModelDataInstance::BuildCullable()
{ {
AZ_PROFILE_SCOPE(AzRender, "MeshDataInstance: BuildCullable"); AZ_PROFILE_SCOPE(AzRender, "ModelDataInstance: BuildCullable");
AZ_Assert(m_cullableNeedsRebuild, "This function only needs to be called if the cullable to be rebuilt"); AZ_Assert(m_cullableNeedsRebuild, "This function only needs to be called if the cullable to be rebuilt");
AZ_Assert(m_model, "The model has not finished loading yet"); AZ_Assert(m_model, "The model has not finished loading yet");
@ -1122,9 +1128,9 @@ namespace AZ
m_cullBoundsNeedsUpdate = true; m_cullBoundsNeedsUpdate = true;
} }
void MeshDataInstance::UpdateCullBounds(const TransformServiceFeatureProcessor* transformService) void ModelDataInstance::UpdateCullBounds(const TransformServiceFeatureProcessor* transformService)
{ {
AZ_PROFILE_SCOPE(AzRender, "MeshDataInstance: UpdateCullBounds"); AZ_PROFILE_SCOPE(AzRender, "ModelDataInstance: UpdateCullBounds");
AZ_Assert(m_cullBoundsNeedsUpdate, "This function only needs to be called if the culling bounds need to be rebuilt"); AZ_Assert(m_cullBoundsNeedsUpdate, "This function only needs to be called if the culling bounds need to be rebuilt");
AZ_Assert(m_model, "The model has not finished loading yet"); AZ_Assert(m_model, "The model has not finished loading yet");
@ -1148,74 +1154,74 @@ namespace AZ
m_cullBoundsNeedsUpdate = false; m_cullBoundsNeedsUpdate = false;
} }
void MeshDataInstance::UpdateObjectSrg() void ModelDataInstance::UpdateObjectSrg()
{ {
if (!m_shaderResourceGroup) for (auto& objectSrg : m_objectSrgList)
{ {
return; ReflectionProbeFeatureProcessor* reflectionProbeFeatureProcessor = m_scene->GetFeatureProcessor<ReflectionProbeFeatureProcessor>();
}
ReflectionProbeFeatureProcessor* reflectionProbeFeatureProcessor = m_scene->GetFeatureProcessor<ReflectionProbeFeatureProcessor>();
if (reflectionProbeFeatureProcessor && (m_descriptor.m_useForwardPassIblSpecular || m_hasForwardPassIblSpecularMaterial)) if (reflectionProbeFeatureProcessor && (m_descriptor.m_useForwardPassIblSpecular || m_hasForwardPassIblSpecularMaterial))
{ {
// retrieve probe constant indices // retrieve probe constant indices
AZ::RHI::ShaderInputConstantIndex modelToWorldConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_modelToWorld")); AZ::RHI::ShaderInputConstantIndex modelToWorldConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_modelToWorld"));
AZ_Error("MeshDataInstance", modelToWorldConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); AZ_Error("ModelDataInstance", modelToWorldConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index");
AZ::RHI::ShaderInputConstantIndex modelToWorldInverseConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_modelToWorldInverse")); AZ::RHI::ShaderInputConstantIndex modelToWorldInverseConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_modelToWorldInverse"));
AZ_Error("MeshDataInstance", modelToWorldInverseConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); AZ_Error("ModelDataInstance", modelToWorldInverseConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index");
AZ::RHI::ShaderInputConstantIndex outerObbHalfLengthsConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_outerObbHalfLengths")); AZ::RHI::ShaderInputConstantIndex outerObbHalfLengthsConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_outerObbHalfLengths"));
AZ_Error("MeshDataInstance", outerObbHalfLengthsConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); AZ_Error("ModelDataInstance", outerObbHalfLengthsConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index");
AZ::RHI::ShaderInputConstantIndex innerObbHalfLengthsConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_innerObbHalfLengths")); AZ::RHI::ShaderInputConstantIndex innerObbHalfLengthsConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_innerObbHalfLengths"));
AZ_Error("MeshDataInstance", innerObbHalfLengthsConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); AZ_Error("ModelDataInstance", innerObbHalfLengthsConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index");
AZ::RHI::ShaderInputConstantIndex useReflectionProbeConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_useReflectionProbe")); AZ::RHI::ShaderInputConstantIndex useReflectionProbeConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_useReflectionProbe"));
AZ_Error("MeshDataInstance", useReflectionProbeConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); AZ_Error("ModelDataInstance", useReflectionProbeConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index");
AZ::RHI::ShaderInputConstantIndex useParallaxCorrectionConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_useParallaxCorrection")); AZ::RHI::ShaderInputConstantIndex useParallaxCorrectionConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_useParallaxCorrection"));
AZ_Error("MeshDataInstance", useParallaxCorrectionConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); AZ_Error("ModelDataInstance", useParallaxCorrectionConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index");
AZ::RHI::ShaderInputConstantIndex exposureConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_exposure")); AZ::RHI::ShaderInputConstantIndex exposureConstantIndex = objectSrg->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_exposure"));
AZ_Error("MeshDataInstance", exposureConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index"); AZ_Error("ModelDataInstance", exposureConstantIndex.IsValid(), "Failed to find ReflectionProbe constant index");
// retrieve probe cubemap index // retrieve probe cubemap index
Name reflectionCubeMapImageName = Name("m_reflectionProbeCubeMap"); Name reflectionCubeMapImageName = Name("m_reflectionProbeCubeMap");
RHI::ShaderInputImageIndex reflectionCubeMapImageIndex = m_shaderResourceGroup->FindShaderInputImageIndex(reflectionCubeMapImageName); RHI::ShaderInputImageIndex reflectionCubeMapImageIndex = objectSrg->FindShaderInputImageIndex(reflectionCubeMapImageName);
AZ_Error("MeshDataInstance", reflectionCubeMapImageIndex.IsValid(), "Failed to find shader image index [%s]", reflectionCubeMapImageName.GetCStr()); AZ_Error("ModelDataInstance", reflectionCubeMapImageIndex.IsValid(), "Failed to find shader image index [%s]", reflectionCubeMapImageName.GetCStr());
// retrieve the list of probes that contain the centerpoint of the mesh // retrieve the list of probes that contain the centerpoint of the mesh
TransformServiceFeatureProcessor* transformServiceFeatureProcessor = m_scene->GetFeatureProcessor<TransformServiceFeatureProcessor>(); TransformServiceFeatureProcessor* transformServiceFeatureProcessor = m_scene->GetFeatureProcessor<TransformServiceFeatureProcessor>();
Transform transform = transformServiceFeatureProcessor->GetTransformForId(m_objectId); Transform transform = transformServiceFeatureProcessor->GetTransformForId(m_objectId);
ReflectionProbeFeatureProcessor::ReflectionProbeVector reflectionProbes; ReflectionProbeFeatureProcessor::ReflectionProbeVector reflectionProbes;
reflectionProbeFeatureProcessor->FindReflectionProbes(transform.GetTranslation(), reflectionProbes); reflectionProbeFeatureProcessor->FindReflectionProbes(transform.GetTranslation(), reflectionProbes);
if (!reflectionProbes.empty() && reflectionProbes[0]) if (!reflectionProbes.empty() && reflectionProbes[0])
{ {
m_shaderResourceGroup->SetConstant(modelToWorldConstantIndex, reflectionProbes[0]->GetTransform()); objectSrg->SetConstant(modelToWorldConstantIndex, reflectionProbes[0]->GetTransform());
m_shaderResourceGroup->SetConstant(modelToWorldInverseConstantIndex, Matrix3x4::CreateFromTransform(reflectionProbes[0]->GetTransform()).GetInverseFull()); objectSrg->SetConstant(modelToWorldInverseConstantIndex, Matrix3x4::CreateFromTransform(reflectionProbes[0]->GetTransform()).GetInverseFull());
m_shaderResourceGroup->SetConstant(outerObbHalfLengthsConstantIndex, reflectionProbes[0]->GetOuterObbWs().GetHalfLengths()); objectSrg->SetConstant(outerObbHalfLengthsConstantIndex, reflectionProbes[0]->GetOuterObbWs().GetHalfLengths());
m_shaderResourceGroup->SetConstant(innerObbHalfLengthsConstantIndex, reflectionProbes[0]->GetInnerObbWs().GetHalfLengths()); objectSrg->SetConstant(innerObbHalfLengthsConstantIndex, reflectionProbes[0]->GetInnerObbWs().GetHalfLengths());
m_shaderResourceGroup->SetConstant(useReflectionProbeConstantIndex, true); objectSrg->SetConstant(useReflectionProbeConstantIndex, true);
m_shaderResourceGroup->SetConstant(useParallaxCorrectionConstantIndex, reflectionProbes[0]->GetUseParallaxCorrection()); objectSrg->SetConstant(useParallaxCorrectionConstantIndex, reflectionProbes[0]->GetUseParallaxCorrection());
m_shaderResourceGroup->SetConstant(exposureConstantIndex, reflectionProbes[0]->GetRenderExposure()); objectSrg->SetConstant(exposureConstantIndex, reflectionProbes[0]->GetRenderExposure());
m_shaderResourceGroup->SetImage(reflectionCubeMapImageIndex, reflectionProbes[0]->GetCubeMapImage()); objectSrg->SetImage(reflectionCubeMapImageIndex, reflectionProbes[0]->GetCubeMapImage());
} }
else else
{ {
m_shaderResourceGroup->SetConstant(useReflectionProbeConstantIndex, false); objectSrg->SetConstant(useReflectionProbeConstantIndex, false);
}
} }
objectSrg->Compile();
} }
m_shaderResourceGroup->Compile(); // Set m_objectSrgNeedsUpdate to false if there are object SRGs in the list
m_objectSrgNeedsUpdate = false; m_objectSrgNeedsUpdate = m_objectSrgNeedsUpdate && (m_objectSrgList.size() == 0);
} }
bool MeshDataInstance::MaterialRequiresForwardPassIblSpecular(Data::Instance<RPI::Material> material) const bool ModelDataInstance::MaterialRequiresForwardPassIblSpecular(Data::Instance<RPI::Material> material) const
{ {
// look for a shader that has the o_materialUseForwardPassIBLSpecular option set // look for a shader that has the o_materialUseForwardPassIBLSpecular option set
// Note: this should be changed to have the material automatically set the forwardPassIBLSpecular // Note: this should be changed to have the material automatically set the forwardPassIBLSpecular
@ -1241,7 +1247,7 @@ namespace AZ
return false; return false;
} }
void MeshDataInstance::SetVisible(bool isVisible) void ModelDataInstance::SetVisible(bool isVisible)
{ {
m_visible = isVisible; m_visible = isVisible;
m_cullable.m_isHidden = !isVisible; m_cullable.m_isHidden = !isVisible;

@ -37,6 +37,11 @@ namespace AZ
m_currentTime = AZStd::chrono::system_clock::now(); m_currentTime = AZStd::chrono::system_clock::now();
} }
void PostProcessFeatureProcessor::Deactivate()
{
m_viewAliasMap.clear();
}
void PostProcessFeatureProcessor::UpdateTime() void PostProcessFeatureProcessor::UpdateTime()
{ {
AZStd::chrono::system_clock::time_point now = AZStd::chrono::system_clock::now(); AZStd::chrono::system_clock::time_point now = AZStd::chrono::system_clock::now();
@ -45,6 +50,16 @@ namespace AZ
m_deltaTime = deltaTime.count(); m_deltaTime = deltaTime.count();
} }
void PostProcessFeatureProcessor::SetViewAlias(const AZ::RPI::ViewPtr sourceView, const AZ::RPI::ViewPtr targetView)
{
m_viewAliasMap[sourceView.get()] = targetView.get();
}
void PostProcessFeatureProcessor::RemoveViewAlias(const AZ::RPI::ViewPtr sourceView)
{
m_viewAliasMap.erase(sourceView.get());
}
void PostProcessFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet) void PostProcessFeatureProcessor::Simulate(const FeatureProcessor::SimulatePacket& packet)
{ {
AZ_PROFILE_SCOPE(RPI, "PostProcessFeatureProcessor: Simulate"); AZ_PROFILE_SCOPE(RPI, "PostProcessFeatureProcessor: Simulate");
@ -200,8 +215,12 @@ namespace AZ
AZ::Render::PostProcessSettings* PostProcessFeatureProcessor::GetLevelSettingsFromView(AZ::RPI::ViewPtr view) AZ::Render::PostProcessSettings* PostProcessFeatureProcessor::GetLevelSettingsFromView(AZ::RPI::ViewPtr view)
{ {
// check for view aliases first
auto viewAliasiterator = m_viewAliasMap.find(view.get());
// Use the view alias if it exists
auto settingsIterator = m_blendedPerViewSettings.find(viewAliasiterator != m_viewAliasMap.end() ? viewAliasiterator->second : view.get());
// If no settings for the view is found, the global settings is returned. // If no settings for the view is found, the global settings is returned.
auto settingsIterator = m_blendedPerViewSettings.find(view.get());
return settingsIterator != m_blendedPerViewSettings.end() return settingsIterator != m_blendedPerViewSettings.end()
? &settingsIterator->second ? &settingsIterator->second
: m_globalAggregateLevelSettings.get(); : m_globalAggregateLevelSettings.get();

@ -34,6 +34,7 @@ namespace AZ
//! FeatureProcessor overrides... //! FeatureProcessor overrides...
void Activate() override; void Activate() override;
void Deactivate() override;
void Simulate(const FeatureProcessor::SimulatePacket& packet) override; void Simulate(const FeatureProcessor::SimulatePacket& packet) override;
//! PostProcessFeatureProcessorInterface... //! PostProcessFeatureProcessorInterface...
@ -43,6 +44,9 @@ namespace AZ
void OnPostProcessSettingsChanged() override; void OnPostProcessSettingsChanged() override;
PostProcessSettings* GetLevelSettingsFromView(AZ::RPI::ViewPtr view); PostProcessSettings* GetLevelSettingsFromView(AZ::RPI::ViewPtr view);
void SetViewAlias(const AZ::RPI::ViewPtr sourceView, const AZ::RPI::ViewPtr targetView);
void RemoveViewAlias(const AZ::RPI::ViewPtr sourceView);
private: private:
PostProcessFeatureProcessor(const PostProcessFeatureProcessor&) = delete; PostProcessFeatureProcessor(const PostProcessFeatureProcessor&) = delete;
@ -83,6 +87,8 @@ namespace AZ
// Each camera/view will have its own PostProcessSettings // Each camera/view will have its own PostProcessSettings
AZStd::unordered_map<AZ::RPI::View*, PostProcessSettings> m_blendedPerViewSettings; AZStd::unordered_map<AZ::RPI::View*, PostProcessSettings> m_blendedPerViewSettings;
// This is used for mimicking a postfx setting of a different view
AZStd::unordered_map<AZ::RPI::View*, AZ::RPI::View*> m_viewAliasMap;
}; };
} // namespace Render } // namespace Render
} // namespace AZ } // namespace AZ

@ -81,7 +81,7 @@ namespace AZ
if (scene) if (scene)
{ {
PostProcessFeatureProcessor* fp = scene->GetFeatureProcessor<PostProcessFeatureProcessor>(); PostProcessFeatureProcessor* fp = scene->GetFeatureProcessor<PostProcessFeatureProcessor>();
AZ::RPI::ViewPtr view = GetView(); AZ::RPI::ViewPtr view = GetRenderPipeline()->GetDefaultView();
if (fp) if (fp)
{ {
PostProcessSettings* postProcessSettings = fp->GetLevelSettingsFromView(view); PostProcessSettings* postProcessSettings = fp->GetLevelSettingsFromView(view);
@ -110,7 +110,7 @@ namespace AZ
PostProcessFeatureProcessor* fp = scene->GetFeatureProcessor<PostProcessFeatureProcessor>(); PostProcessFeatureProcessor* fp = scene->GetFeatureProcessor<PostProcessFeatureProcessor>();
if (fp) if (fp)
{ {
AZ::RPI::ViewPtr view = GetView(); AZ::RPI::ViewPtr view = GetRenderPipeline()->GetDefaultView();
PostProcessSettings* postProcessSettings = fp->GetLevelSettingsFromView(view); PostProcessSettings* postProcessSettings = fp->GetLevelSettingsFromView(view);
if (postProcessSettings) if (postProcessSettings)
{ {

@ -95,13 +95,13 @@ namespace AZ
renderProxy.m_instance->m_model->WaitForUpload(); renderProxy.m_instance->m_model->WaitForUpload();
} }
//Note: we are creating pointers to the meshDataInstance cullpacket and lod packet here, //Note: we are creating pointers to the modelDataInstance cullpacket and lod packet here,
//and holding them until the skinnedMeshDispatchItems are dispatched. There is an assumption that the underlying //and holding them until the skinnedMeshDispatchItems are dispatched. There is an assumption that the underlying
//data will not move during this phase. //data will not move during this phase.
MeshDataInstance& meshDataInstance = **renderProxy.m_meshHandle; ModelDataInstance& modelDataInstance = **renderProxy.m_meshHandle;
m_workgroup.m_cullPackets.push_back(&meshDataInstance.GetCullPacket()); m_workgroup.m_cullPackets.push_back(&modelDataInstance.GetCullPacket());
m_workgroup.m_drawListMask |= meshDataInstance.GetCullPacket().m_drawListMask; m_workgroup.m_drawListMask |= modelDataInstance.GetCullPacket().m_drawListMask;
m_lodPackets.push_back(&meshDataInstance.GetLodPacket()); m_lodPackets.push_back(&modelDataInstance.GetLodPacket());
m_potentiallyVisibleProxies.push_back(&renderProxy); m_potentiallyVisibleProxies.push_back(&renderProxy);
} }
} }
@ -187,8 +187,8 @@ namespace AZ
renderProxy.m_instance->m_model->WaitForUpload(); renderProxy.m_instance->m_model->WaitForUpload();
} }
MeshDataInstance& meshDataInstance = **renderProxy.m_meshHandle; ModelDataInstance& modelDataInstance = **renderProxy.m_meshHandle;
const RPI::Cullable& cullable = meshDataInstance.GetCullable(); const RPI::Cullable& cullable = modelDataInstance.GetCullable();
for (const RPI::ViewPtr& viewPtr : packet.m_views) for (const RPI::ViewPtr& viewPtr : packet.m_views)
{ {

@ -78,8 +78,7 @@ namespace AZ
{ {
// The presentation mode may change when transitioning to or from a vsynced presentation mode // The presentation mode may change when transitioning to or from a vsynced presentation mode
// In this case, the swapchain must be recreated. // In this case, the swapchain must be recreated.
InvalidateNativeSwapChain(); m_pendingRecreation = true;
CreateSwapchain();
} }
} }

@ -56,8 +56,8 @@ namespace AZ
OwnerRenderPipeline = AZ_BIT(5) OwnerRenderPipeline = AZ_BIT(5)
}; };
void SetOwenrScene(const Scene* scene); void SetOwnerScene(const Scene* scene);
void SetOwenrRenderPipeline(const RenderPipeline* renderPipeline); void SetOwnerRenderPipeline(const RenderPipeline* renderPipeline);
void SetPassName(Name passName); void SetPassName(Name passName);
void SetTemplateName(Name passTemplateName); void SetTemplateName(Name passTemplateName);
void SetPassClass(TypeId passClassTypeId); void SetPassClass(TypeId passClassTypeId);

@ -2088,7 +2088,7 @@ namespace AZ
AZ::Vector3 vpos; //note: it seems to be fastest to reuse a local Vector3 rather than constructing new ones each loop iteration AZ::Vector3 vpos; //note: it seems to be fastest to reuse a local Vector3 rather than constructing new ones each loop iteration
for (uint32_t i = 0; i < elementCount; ++i) for (uint32_t i = 0; i < elementCount; ++i)
{ {
vpos.Set(const_cast<float*>(reinterpret_cast<const float*>(&buffer[i]))); vpos.Set(reinterpret_cast<const float*>(&buffer[i]));
aabb.AddPoint(vpos); aabb.AddPoint(vpos);
} }
} }

@ -90,13 +90,13 @@ namespace AZ
return filter; return filter;
} }
void PassFilter::SetOwenrScene(const Scene* scene) void PassFilter::SetOwnerScene(const Scene* scene)
{ {
m_ownerScene = scene; m_ownerScene = scene;
UpdateFilterOptions(); UpdateFilterOptions();
} }
void PassFilter::SetOwenrRenderPipeline(const RenderPipeline* renderPipeline) void PassFilter::SetOwnerRenderPipeline(const RenderPipeline* renderPipeline)
{ {
m_ownerRenderPipeline = renderPipeline; m_ownerRenderPipeline = renderPipeline;
UpdateFilterOptions(); UpdateFilterOptions();

@ -201,23 +201,11 @@ namespace AZ
AZ::Vector3& normal) const AZ::Vector3& normal) const
{ {
const BufferAssetView& indexBufferView = mesh.GetIndexBufferAssetView(); const BufferAssetView& indexBufferView = mesh.GetIndexBufferAssetView();
const AZStd::array_view<ModelLodAsset::Mesh::StreamBufferInfo>& streamBufferList = mesh.GetStreamBufferInfoList(); const BufferAssetView* positionBufferView = mesh.GetSemanticBufferAssetView(m_positionName);
// find position semantic if (positionBufferView && positionBufferView->GetBufferAsset().Get())
const ModelLodAsset::Mesh::StreamBufferInfo* positionBuffer = nullptr;
for (const ModelLodAsset::Mesh::StreamBufferInfo& bufferInfo : streamBufferList)
{ {
if (bufferInfo.m_semantic.m_name == m_positionName) BufferAsset* bufferAssetViewPtr = positionBufferView->GetBufferAsset().Get();
{
positionBuffer = &bufferInfo;
break;
}
}
if (positionBuffer && positionBuffer->m_bufferAssetView.GetBufferAsset().Get())
{
BufferAsset* bufferAssetViewPtr = positionBuffer->m_bufferAssetView.GetBufferAsset().Get();
BufferAsset* indexAssetViewPtr = indexBufferView.GetBufferAsset().Get(); BufferAsset* indexAssetViewPtr = indexBufferView.GetBufferAsset().Get();
if (!bufferAssetViewPtr || !indexAssetViewPtr) if (!bufferAssetViewPtr || !indexAssetViewPtr)
@ -225,7 +213,7 @@ namespace AZ
return false; return false;
} }
RHI::BufferViewDescriptor positionBufferViewDesc = bufferAssetViewPtr->GetBufferViewDescriptor(); RHI::BufferViewDescriptor positionBufferViewDesc = positionBufferView->GetBufferViewDescriptor();
AZStd::array_view<uint8_t> positionRawBuffer = bufferAssetViewPtr->GetBuffer(); AZStd::array_view<uint8_t> positionRawBuffer = bufferAssetViewPtr->GetBuffer();
const uint32_t positionElementSize = positionBufferViewDesc.m_elementSize; const uint32_t positionElementSize = positionBufferViewDesc.m_elementSize;
@ -234,22 +222,28 @@ namespace AZ
// Position is 3 floats // Position is 3 floats
if (positionElementSize != sizeof(float) * 3) if (positionElementSize != sizeof(float) * 3)
{ {
AZ_Warning("ModelAsset", false, "unsupported mesh posiiton format, only full 3 floats per vertex are supported at the moment"); AZ_Warning(
"ModelAsset", false, "unsupported mesh posiiton format, only full 3 floats per vertex are supported at the moment");
return false; return false;
} }
RHI::BufferViewDescriptor indexBufferViewDesc = indexBufferView.GetBufferViewDescriptor();
AZStd::array_view<uint8_t> indexRawBuffer = indexAssetViewPtr->GetBuffer(); AZStd::array_view<uint8_t> indexRawBuffer = indexAssetViewPtr->GetBuffer();
RHI::BufferViewDescriptor indexRawDesc = indexAssetViewPtr->GetBufferViewDescriptor();
bool anyHit = false;
const AZ::Vector3 rayEnd = rayStart + rayDir; const AZ::Vector3 rayEnd = rayStart + rayDir;
AZ::Vector3 a, b, c; AZ::Vector3 a, b, c;
AZ::Vector3 intersectionNormal; AZ::Vector3 intersectionNormal;
bool anyHit = false;
float shortestDistanceNormalized = AZStd::numeric_limits<float>::max(); float shortestDistanceNormalized = AZStd::numeric_limits<float>::max();
const AZ::u32* indexPtr = reinterpret_cast<const AZ::u32*>(indexRawBuffer.data());
for (uint32_t indexIter = 0; indexIter <= indexRawDesc.m_elementCount - 3; indexIter += 3, indexPtr += 3) const AZ::u32* indexPtr = reinterpret_cast<const AZ::u32*>(
indexRawBuffer.data() + (indexBufferViewDesc.m_elementOffset * indexBufferViewDesc.m_elementSize));
const float* positionPtr = reinterpret_cast<const float*>(
positionRawBuffer.data() + (positionBufferViewDesc.m_elementOffset * positionBufferViewDesc.m_elementSize));
constexpr int StepSize = 3; // number of values per vertex (x, y, z)
for (uint32_t indexIter = 0; indexIter < indexBufferViewDesc.m_elementCount; indexIter += StepSize, indexPtr += StepSize)
{ {
AZ::u32 index0 = indexPtr[0]; AZ::u32 index0 = indexPtr[0];
AZ::u32 index1 = indexPtr[1]; AZ::u32 index1 = indexPtr[1];
@ -261,17 +255,17 @@ namespace AZ
return false; return false;
} }
const float* p = reinterpret_cast<const float*>(&positionRawBuffer[index0 * positionElementSize]); // faster than AZ::Vector3 c-tor
a.Set(const_cast<float*>(p)); // faster than AZ::Vector3 c-tor const float* aRef = &positionPtr[index0 * StepSize];
a.Set(aRef);
p = reinterpret_cast<const float*>(&positionRawBuffer[index1 * positionElementSize]); const float* bRef = &positionPtr[index1 * StepSize];
b.Set(const_cast<float*>(p)); b.Set(bRef);
const float* cRef = &positionPtr[index2 * StepSize];
p = reinterpret_cast<const float*>(&positionRawBuffer[index2 * positionElementSize]); c.Set(cRef);
c.Set(const_cast<float*>(p));
float currentDistanceNormalized; float currentDistanceNormalized;
if (AZ::Intersect::IntersectSegmentTriangleCCW(rayStart, rayEnd, a, b, c, intersectionNormal, currentDistanceNormalized)) if (AZ::Intersect::IntersectSegmentTriangleCCW(
rayStart, rayEnd, a, b, c, intersectionNormal, currentDistanceNormalized))
{ {
anyHit = true; anyHit = true;

@ -38,7 +38,7 @@ namespace UnitTest
bufferData.resize(bufferSize); bufferData.resize(bufferSize);
//The actual data doesn't matter //The actual data doesn't matter
const uint8_t bufferDataSize = static_cast<uint8_t>(bufferData.size()); const uint8_t bufferDataSize = aznumeric_cast<uint8_t>(bufferData.size());
for (uint8_t i = 0; i < bufferDataSize; ++i) for (uint8_t i = 0; i < bufferDataSize; ++i)
{ {
bufferData[i] = i; bufferData[i] = i;
@ -248,7 +248,8 @@ namespace UnitTest
return asset; return asset;
} }
AZ::Data::Asset<AZ::RPI::ModelAsset> BuildTestModel(const uint32_t lodCount, const uint32_t sharedMeshCount, const uint32_t separateMeshCount, ExpectedModel& expectedModel) AZ::Data::Asset<AZ::RPI::ModelAsset> BuildTestModel(
const uint32_t lodCount, const uint32_t sharedMeshCount, const uint32_t separateMeshCount, ExpectedModel& expectedModel)
{ {
using namespace AZ; using namespace AZ;
@ -989,6 +990,9 @@ namespace UnitTest
uint32_t{ 0 }, 2, 1, 1, 2, 3, 4, 5, 6, 5, 7, 6, 0, 4, 2, 4, 6, 2, 1, 3, 5, 5, 3, 7, 0, 1, 4, 4, 1, 5, 2, 6, 3, 6, 7, 3, uint32_t{ 0 }, 2, 1, 1, 2, 3, 4, 5, 6, 5, 7, 6, 0, 4, 2, 4, 6, 2, 1, 3, 5, 5, 3, 7, 0, 1, 4, 4, 1, 5, 2, 6, 3, 6, 7, 3,
}; };
static constexpr AZStd::array QuadPositions = { -1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, -1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f };
static constexpr AZStd::array QuadIndices = { uint32_t{ 0 }, 2, 1, 1, 2, 3 };
// This class creates a Model with one LOD, whose mesh contains 2 planes. Plane 1 is in the XY plane at Z=-0.5, and // This class creates a Model with one LOD, whose mesh contains 2 planes. Plane 1 is in the XY plane at Z=-0.5, and
// plane 2 is in the XY plane at Z=0.5. The two planes each have 9 quads which have been triangulated. It only has // plane 2 is in the XY plane at Z=0.5. The two planes each have 9 quads which have been triangulated. It only has
// a position and index buffer. // a position and index buffer.
@ -1031,42 +1035,80 @@ namespace UnitTest
static constexpr inline auto minmaxElement = AZStd::minmax_element(begin(TwoSeparatedPlanesIndices), end(TwoSeparatedPlanesIndices)); static constexpr inline auto minmaxElement = AZStd::minmax_element(begin(TwoSeparatedPlanesIndices), end(TwoSeparatedPlanesIndices));
static_assert(*minmaxElement.second == (TwoSeparatedPlanesPositions.size() / 3) - 1); static_assert(*minmaxElement.second == (TwoSeparatedPlanesPositions.size() / 3) - 1);
template<class x> class TD;
class TestMesh class TestMesh
{ {
public: public:
TestMesh() = default;
TestMesh(const float* positions, size_t positionCount, const uint32_t* indices, size_t indicesCount) TestMesh(const float* positions, size_t positionCount, const uint32_t* indices, size_t indicesCount)
{ {
AZ::RPI::ModelLodAssetCreator lodCreator; AZ::RPI::ModelLodAssetCreator lodCreator;
Begin(lodCreator);
Add(lodCreator, positions, positionCount, /*positionOffset=*/0, indices, indicesCount, /*indexOffset=*/0);
End(lodCreator);
}
// initiate the asset lod creation process (note: End must be called after meshes have been added).
void Begin(AZ::RPI::ModelLodAssetCreator& lodCreator)
{
lodCreator.Begin(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); lodCreator.Begin(AZ::Data::AssetId(AZ::Uuid::CreateRandom()));
}
// add a sub mesh and reuse existing position/index buffer (be very careful with the offsets used)
void Add(
AZ::RPI::ModelLodAssetCreator& lodCreator,
const float* positions,
size_t positionCount,
size_t positionOffset,
AZ::Data::Asset<AZ::RPI::BufferAsset> positionBuffer,
const uint32_t* indices,
size_t indexCount,
size_t indexOffset,
AZ::Data::Asset<AZ::RPI::BufferAsset> indexBuffer)
{
lodCreator.BeginMesh(); lodCreator.BeginMesh();
lodCreator.SetMeshAabb(AZ::Aabb::CreateFromMinMax({-1.0f, -1.0f, -0.5f}, {1.0f, 1.0f, 0.5f})); lodCreator.SetMeshAabb(AZ::Aabb::CreateFromMinMax({ -1.0f, -1.0f, -0.5f }, { 1.0f, 1.0f, 0.5f }));
lodCreator.SetMeshMaterialSlot(AZ::Sfmt::GetInstance().Rand32()); lodCreator.SetMeshMaterialSlot(AZ::Sfmt::GetInstance().Rand32());
{ AZStd::copy(
AZ::Data::Asset<AZ::RPI::BufferAsset> indexBuffer = BuildTestBuffer(static_cast<uint32_t>(indicesCount), sizeof(uint32_t)); indices, indices + indexCount,
AZStd::copy(indices, indices + indicesCount, reinterpret_cast<uint32_t*>(const_cast<uint8_t*>(indexBuffer->GetBuffer().data()))); reinterpret_cast<uint32_t*>(const_cast<uint8_t*>(indexBuffer->GetBuffer().data())) + indexOffset);
lodCreator.SetMeshIndexBuffer({ lodCreator.SetMeshIndexBuffer(
indexBuffer, { indexBuffer,
AZ::RHI::BufferViewDescriptor::CreateStructured(0, static_cast<uint32_t>(indicesCount), sizeof(uint32_t)) AZ::RHI::BufferViewDescriptor::CreateStructured(
}); aznumeric_cast<uint32_t>(indexOffset), aznumeric_cast<uint32_t>(indexCount), sizeof(uint32_t)) });
} AZStd::copy(
positions, positions + positionCount,
reinterpret_cast<float*>(const_cast<uint8_t*>(positionBuffer->GetBuffer().data())) + positionOffset);
lodCreator.AddMeshStreamBuffer(
AZ::RHI::ShaderSemantic(AZ::Name("POSITION")), AZ::Name(),
{ positionBuffer,
AZ::RHI::BufferViewDescriptor::CreateStructured(
aznumeric_cast<uint32_t>(positionOffset / 3), aznumeric_cast<uint32_t>(positionCount / 3), sizeof(float) * 3) });
{
AZ::Data::Asset<AZ::RPI::BufferAsset> positionBuffer = BuildTestBuffer(static_cast<uint32_t>(positionCount / 3), sizeof(float) * 3);
AZStd::copy(positions, positions + positionCount, reinterpret_cast<float*>(const_cast<uint8_t*>(positionBuffer->GetBuffer().data())));
lodCreator.AddMeshStreamBuffer(
AZ::RHI::ShaderSemantic(AZ::Name("POSITION")),
AZ::Name(),
{
positionBuffer,
AZ::RHI::BufferViewDescriptor::CreateStructured(0, static_cast<uint32_t>(positionCount / 3), sizeof(float) * 3)
}
);
}
lodCreator.EndMesh(); lodCreator.EndMesh();
}
// overload of Add - here a new index/position buffer is created for the new data instead of potentially reusing an existing buffer
void Add(
AZ::RPI::ModelLodAssetCreator& lodCreator,
const float* positions,
size_t positionCount,
size_t positionOffset,
const uint32_t* indices,
size_t indexCount,
size_t indexOffset)
{
AZ::Data::Asset<AZ::RPI::BufferAsset> indexBuffer = BuildTestBuffer(aznumeric_cast<uint32_t>(indexCount), sizeof(uint32_t));
AZ::Data::Asset<AZ::RPI::BufferAsset> positionBuffer =
BuildTestBuffer(aznumeric_cast<uint32_t>(positionCount / 3), sizeof(float) * 3);
Add(lodCreator, positions, positionCount, positionOffset, positionBuffer, indices, indexCount, indexOffset, indexBuffer);
}
// complete the asset lod creation process
void End(AZ::RPI::ModelLodAssetCreator& lodCreator)
{
AZ::Data::Asset<AZ::RPI::ModelLodAsset> lodAsset; AZ::Data::Asset<AZ::RPI::ModelLodAsset> lodAsset;
lodCreator.End(lodAsset); lodCreator.End(lodAsset);
@ -1199,7 +1241,7 @@ namespace UnitTest
constexpr float rayLength = 100.0f; constexpr float rayLength = 100.0f;
EXPECT_THAT( EXPECT_THAT(
m_kdTree->RayIntersection( m_kdTree->RayIntersection(
AZ::Vector3::CreateZero(), AZ::Vector3::CreateAxisZ(-rayLength), t, normal), testing::Eq(true)); AZ::Vector3::CreateZero(), AZ::Vector3::CreateAxisZ(-rayLength), t, normal), testing::IsTrue());
EXPECT_THAT(t, testing::FloatEq(0.005f)); EXPECT_THAT(t, testing::FloatEq(0.005f));
} }
@ -1210,7 +1252,7 @@ namespace UnitTest
constexpr float rayLength = 10.0f; constexpr float rayLength = 10.0f;
EXPECT_THAT( EXPECT_THAT(
m_kdTree->RayIntersection(AZ::Vector3::CreateAxisZ(0.75f), AZ::Vector3::CreateAxisZ(-rayLength), t, normal), testing::Eq(true)); m_kdTree->RayIntersection(AZ::Vector3::CreateAxisZ(0.75f), AZ::Vector3::CreateAxisZ(-rayLength), t, normal), testing::IsTrue());
EXPECT_THAT(t, testing::FloatEq(0.025f)); EXPECT_THAT(t, testing::FloatEq(0.025f));
} }
@ -1288,7 +1330,7 @@ namespace UnitTest
EXPECT_THAT( EXPECT_THAT(
m_mesh->GetModel()->LocalRayIntersectionAgainstModel( m_mesh->GetModel()->LocalRayIntersectionAgainstModel(
AZ::Vector3::CreateAxisZ(5.0f), -AZ::Vector3::CreateAxisZ(10.0f), AllowBruteForce, t, normal), AZ::Vector3::CreateAxisZ(5.0f), -AZ::Vector3::CreateAxisZ(10.0f), AllowBruteForce, t, normal),
testing::Eq(true)); testing::IsTrue());
EXPECT_THAT(t, testing::FloatEq(0.4f)); EXPECT_THAT(t, testing::FloatEq(0.4f));
} }
@ -1302,8 +1344,87 @@ namespace UnitTest
EXPECT_THAT( EXPECT_THAT(
m_mesh->GetModel()->LocalRayIntersectionAgainstModel( m_mesh->GetModel()->LocalRayIntersectionAgainstModel(
AZ::Vector3::CreateAxisY(10.0f), -AZ::Vector3::CreateAxisY(9.0f), AllowBruteForce, t, normal), AZ::Vector3::CreateAxisY(10.0f), -AZ::Vector3::CreateAxisY(9.0f), AllowBruteForce, t, normal),
testing::Eq(true)); testing::IsTrue());
EXPECT_THAT(t, testing::FloatEq(1.0f)); EXPECT_THAT(t, testing::FloatEq(1.0f));
EXPECT_THAT(normal, IsClose(AZ::Vector3::CreateAxisY())); EXPECT_THAT(normal, IsClose(AZ::Vector3::CreateAxisY()));
} }
// test to verify that each secondary sub meshes are still intersected with correctly when using brute-force
// ray intersection
class BruteForceMultiModelIntersectsFixture : public ModelTests
{
public:
inline static const float QuadOffsetX = 15.0f;
void SetUp() override
{
ModelTests::SetUp();
m_mesh = AZStd::make_unique<TestMesh>();
AZ::RPI::ModelLodAssetCreator lodCreator;
m_mesh->Begin(lodCreator);
// take default quad positions and offset in X by set amount
AZStd::vector<float> offsetQuadPositions;
offsetQuadPositions.resize(QuadPositions.size());
AZStd::copy(QuadPositions.begin(), QuadPositions.end(), offsetQuadPositions.begin());
for (size_t xVertIndex = 0; xVertIndex < offsetQuadPositions.size(); xVertIndex += 3)
{
offsetQuadPositions[xVertIndex] += QuadOffsetX;
}
// create shared buffer to store cube and quad mesh in the same buffer
const size_t indicesCount = QuadIndices.size() + CubeIndices.size();
const size_t positionCount = QuadPositions.size() + CubePositions.size();
AZ::Data::Asset<AZ::RPI::BufferAsset> indexBuffer = BuildTestBuffer(aznumeric_cast<uint32_t>(indicesCount), sizeof(uint32_t));
AZ::Data::Asset<AZ::RPI::BufferAsset> positionBuffer =
BuildTestBuffer(aznumeric_cast<uint32_t>(positionCount / 3), sizeof(float) * 3);
// add the cube mesh
m_mesh->Add(
lodCreator, CubePositions.data(), CubePositions.size(), 0, positionBuffer, CubeIndices.data(), CubeIndices.size(), 0,
indexBuffer);
// add the quad mesh (offset by the cube position and index data into the same buffer)
m_mesh->Add(
lodCreator, offsetQuadPositions.data(), offsetQuadPositions.size(), /*offset=*/CubePositions.size(), positionBuffer,
QuadIndices.data(), QuadIndices.size(), /*offset=*/CubeIndices.size(), indexBuffer);
m_mesh->End(lodCreator);
}
void TearDown() override
{
m_mesh.reset();
ModelTests::TearDown();
}
AZStd::unique_ptr<TestMesh> m_mesh;
inline static constexpr bool AllowBruteForce = false;
};
TEST_F(BruteForceMultiModelIntersectsFixture, RayIntersectsWithFirstSubMesh)
{
float t = 0.0f;
AZ::Vector3 normal = AZ::Vector3::CreateOne(); // invalid starting normal
// fire a ray at the first sub mesh and ensure a successful hit is returned
EXPECT_THAT(
m_mesh->GetModel()->LocalRayIntersectionAgainstModel(
AZ::Vector3(0.0f, 0.0f, 5.0f), -AZ::Vector3::CreateAxisZ(10.0f), AllowBruteForce, t, normal),
testing::IsTrue());
EXPECT_THAT(t, testing::FloatEq(0.4f));
EXPECT_THAT(normal, IsClose(AZ::Vector3::CreateAxisZ()));
}
TEST_F(BruteForceMultiModelIntersectsFixture, RayIntersectsWithSecondSubMesh)
{
float t = 0.0f;
AZ::Vector3 normal = AZ::Vector3::CreateOne(); // invalid starting normal
// fire a ray at the second sub mesh and ensure a successful hit is returned
EXPECT_THAT(
m_mesh->GetModel()->LocalRayIntersectionAgainstModel(
AZ::Vector3(QuadOffsetX, 0.0f, 5.0f), -AZ::Vector3::CreateAxisZ(10.0f), AllowBruteForce, t, normal),
testing::IsTrue());
EXPECT_THAT(t, testing::FloatEq(0.5f));
EXPECT_THAT(normal, IsClose(AZ::Vector3::CreateAxisZ()));
}
} // namespace UnitTest } // namespace UnitTest

@ -880,12 +880,14 @@ namespace AZ
{ {
if (m_meshHandle) if (m_meshHandle)
{ {
Data::Instance<RPI::ShaderResourceGroup> wrinkleMaskObjectSrg = m_meshFeatureProcessor->GetObjectSrg(*m_meshHandle); const AZStd::vector<Data::Instance<RPI::ShaderResourceGroup>>& wrinkleMaskObjectSrgs = m_meshFeatureProcessor->GetObjectSrgs(*m_meshHandle);
if (wrinkleMaskObjectSrg)
for (auto& wrinkleMaskObjectSrg : wrinkleMaskObjectSrgs)
{ {
RHI::ShaderInputImageIndex wrinkleMasksIndex = wrinkleMaskObjectSrg->FindShaderInputImageIndex(Name{ "m_wrinkle_masks" }); RHI::ShaderInputImageIndex wrinkleMasksIndex = wrinkleMaskObjectSrg->FindShaderInputImageIndex(Name{ "m_wrinkle_masks" });
RHI::ShaderInputConstantIndex wrinkleMaskWeightsIndex = wrinkleMaskObjectSrg->FindShaderInputConstantIndex(Name{ "m_wrinkle_mask_weights" }); RHI::ShaderInputConstantIndex wrinkleMaskWeightsIndex = wrinkleMaskObjectSrg->FindShaderInputConstantIndex(Name{ "m_wrinkle_mask_weights" });
RHI::ShaderInputConstantIndex wrinkleMaskCountIndex = wrinkleMaskObjectSrg->FindShaderInputConstantIndex(Name{ "m_wrinkle_mask_count" }); RHI::ShaderInputConstantIndex wrinkleMaskCountIndex = wrinkleMaskObjectSrg->FindShaderInputConstantIndex(Name{ "m_wrinkle_mask_count" });
if (wrinkleMasksIndex.IsValid() || wrinkleMaskWeightsIndex.IsValid() || wrinkleMaskCountIndex.IsValid()) if (wrinkleMasksIndex.IsValid() || wrinkleMaskWeightsIndex.IsValid() || wrinkleMaskCountIndex.IsValid())
{ {
AZ_Error("AtomActorInstance", wrinkleMasksIndex.IsValid(), "m_wrinkle_masks not found on the ObjectSrg, but m_wrinkle_mask_weights and/or m_wrinkle_mask_count are being used."); AZ_Error("AtomActorInstance", wrinkleMasksIndex.IsValid(), "m_wrinkle_masks not found on the ObjectSrg, but m_wrinkle_mask_weights and/or m_wrinkle_mask_count are being used.");

@ -753,7 +753,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -983,7 +983,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -21,6 +21,7 @@
#include <AzToolsFramework/Commands/EntityStateCommand.h> #include <AzToolsFramework/Commands/EntityStateCommand.h>
#include <AzToolsFramework/Entity/EditorEntityInfoBus.h> #include <AzToolsFramework/Entity/EditorEntityInfoBus.h>
#include <AzToolsFramework/Entity/EditorEntityHelpers.h> #include <AzToolsFramework/Entity/EditorEntityHelpers.h>
#include <AzToolsFramework/Prefab/PrefabFocusPublicInterface.h>
#include <AzToolsFramework/PropertyTreeEditor/PropertyTreeEditor.h> #include <AzToolsFramework/PropertyTreeEditor/PropertyTreeEditor.h>
#include <AzToolsFramework/ToolsComponents/EditorDisabledCompositionBus.h> #include <AzToolsFramework/ToolsComponents/EditorDisabledCompositionBus.h>
#include <AzToolsFramework/ToolsComponents/EditorPendingCompositionBus.h> #include <AzToolsFramework/ToolsComponents/EditorPendingCompositionBus.h>
@ -448,6 +449,9 @@ namespace LandscapeCanvasEditor
AZ::ComponentApplicationBus::BroadcastResult(m_serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); AZ::ComponentApplicationBus::BroadcastResult(m_serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
AZ_Assert(m_serializeContext, "Failed to acquire application serialize context."); AZ_Assert(m_serializeContext, "Failed to acquire application serialize context.");
m_prefabFocusPublicInterface = AZ::Interface<AzToolsFramework::Prefab::PrefabFocusPublicInterface>::Get();
AZ_Assert(m_prefabFocusPublicInterface, "LandscapeCanvas - could not get PrefabFocusPublicInterface on construction.");
const GraphCanvas::EditorId& editorId = GetEditorId(); const GraphCanvas::EditorId& editorId = GetEditorId();
// Register unique color palettes for our connections (data types) // Register unique color palettes for our connections (data types)
@ -459,6 +463,7 @@ namespace LandscapeCanvasEditor
AzToolsFramework::EditorPickModeNotificationBus::Handler::BusConnect(AzToolsFramework::GetEntityContextId()); AzToolsFramework::EditorPickModeNotificationBus::Handler::BusConnect(AzToolsFramework::GetEntityContextId());
AzToolsFramework::EntityCompositionNotificationBus::Handler::BusConnect(); AzToolsFramework::EntityCompositionNotificationBus::Handler::BusConnect();
AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusConnect(); AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusConnect();
AzToolsFramework::Prefab::PrefabFocusNotificationBus::Handler::BusConnect(AzToolsFramework::GetEntityContextId());
AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler::BusConnect(); AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler::BusConnect();
CrySystemEventBus::Handler::BusConnect(); CrySystemEventBus::Handler::BusConnect();
AZ::EntitySystemBus::Handler::BusConnect(); AZ::EntitySystemBus::Handler::BusConnect();
@ -484,6 +489,7 @@ namespace LandscapeCanvasEditor
AZ::EntitySystemBus::Handler::BusDisconnect(); AZ::EntitySystemBus::Handler::BusDisconnect();
CrySystemEventBus::Handler::BusDisconnect(); CrySystemEventBus::Handler::BusDisconnect();
AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler::BusDisconnect(); AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler::BusDisconnect();
AzToolsFramework::Prefab::PrefabFocusNotificationBus::Handler::BusDisconnect();
AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusDisconnect(); AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusDisconnect();
AzToolsFramework::EditorPickModeNotificationBus::Handler::BusDisconnect(); AzToolsFramework::EditorPickModeNotificationBus::Handler::BusDisconnect();
AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect();
@ -2500,6 +2506,24 @@ namespace LandscapeCanvasEditor
} }
} }
void MainWindow::OnPrefabFocusChanged()
{
// Make sure to close any open graphs that aren't currently in prefab focus
// to prevent the user from making modifications outside of the allowed focus scope
AZStd::vector<GraphCanvas::DockWidgetId> dockWidgetsToClose;
for (auto [entityId, dockWidgetId] : m_dockWidgetsByEntity)
{
if (!m_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(entityId))
{
dockWidgetsToClose.push_back(dockWidgetId);
}
}
for (auto dockWidgetId : dockWidgetsToClose)
{
CloseEditor(dockWidgetId);
}
}
void MainWindow::OnPrefabInstancePropagationBegin() void MainWindow::OnPrefabInstancePropagationBegin()
{ {
// Ignore graph updates during prefab propagation because the entities will be // Ignore graph updates during prefab propagation because the entities will be

@ -20,6 +20,7 @@
#include <AzToolsFramework/API/EntityCompositionNotificationBus.h> #include <AzToolsFramework/API/EntityCompositionNotificationBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h> #include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/Entity/EditorEntityContextBus.h> #include <AzToolsFramework/Entity/EditorEntityContextBus.h>
#include <AzToolsFramework/Prefab/PrefabFocusNotificationBus.h>
#include <AzToolsFramework/Prefab/PrefabPublicNotificationBus.h> #include <AzToolsFramework/Prefab/PrefabPublicNotificationBus.h>
#include <AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx> #include <AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx>
#include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h> #include <AzToolsFramework/UI/PropertyEditor/PropertyEditorAPI.h>
@ -31,6 +32,14 @@
#include <LandscapeCanvas/LandscapeCanvasBus.h> #include <LandscapeCanvas/LandscapeCanvasBus.h>
#endif #endif
namespace AzToolsFramework
{
namespace Prefab
{
class PrefabFocusPublicInterface;
}
}
namespace LandscapeCanvasEditor namespace LandscapeCanvasEditor
{ {
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
@ -81,6 +90,7 @@ namespace LandscapeCanvasEditor
, private AzToolsFramework::EntityCompositionNotificationBus::Handler , private AzToolsFramework::EntityCompositionNotificationBus::Handler
, private AzToolsFramework::PropertyEditorEntityChangeNotificationBus::MultiHandler , private AzToolsFramework::PropertyEditorEntityChangeNotificationBus::MultiHandler
, private AzToolsFramework::ToolsApplicationNotificationBus::Handler , private AzToolsFramework::ToolsApplicationNotificationBus::Handler
, private AzToolsFramework::Prefab::PrefabFocusNotificationBus::Handler
, private AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler , private AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler
, private CrySystemEventBus::Handler , private CrySystemEventBus::Handler
{ {
@ -181,6 +191,9 @@ namespace LandscapeCanvasEditor
void EntityParentChanged(AZ::EntityId entityId, AZ::EntityId newParentId, AZ::EntityId oldParentId) override; void EntityParentChanged(AZ::EntityId entityId, AZ::EntityId newParentId, AZ::EntityId oldParentId) override;
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//! PrefabFocusNotificationBus overrides
void OnPrefabFocusChanged() override;
//! PrefabPublicNotificationBus overrides //! PrefabPublicNotificationBus overrides
void OnPrefabInstancePropagationBegin() override; void OnPrefabInstancePropagationBegin() override;
void OnPrefabInstancePropagationEnd() override; void OnPrefabInstancePropagationEnd() override;
@ -248,6 +261,8 @@ namespace LandscapeCanvasEditor
AZ::SerializeContext* m_serializeContext = nullptr; AZ::SerializeContext* m_serializeContext = nullptr;
AzToolsFramework::Prefab::PrefabFocusPublicInterface* m_prefabFocusPublicInterface = nullptr;
bool m_ignoreGraphUpdates = false; bool m_ignoreGraphUpdates = false;
bool m_prefabPropagationInProgress = false; bool m_prefabPropagationInProgress = false;
bool m_inObjectPickMode = false; bool m_inObjectPickMode = false;

@ -1,37 +0,0 @@
<ObjectStream version="3">
<Class name="AZStd::vector" type="{82FC5264-88D0-57CD-9307-FC52E4DAD550}">
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{1AE9C4CB-FF24-594B-BC2F-071268E0D6AB}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="engineassets/geomcaches/defaultgeomcache.cax" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{E9C38BAA-2A29-532E-AA92-4F66F95E8242}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="engineassets/textures/defaults/spot_default.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{0BFF7DC2-B7B0-530E-A70E-A082F7AF6678}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="engineassets/materials/decals/default.mtl" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{1213DEB1-FC2B-566A-86AA-E82D93D8AE2F}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="engineassets/materials/lens_optics.mtl" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
</ObjectStream>

@ -2,8 +2,8 @@
<Class name="AZStd::vector" type="{82FC5264-88D0-57CD-9307-FC52E4DAD550}"> <Class name="AZStd::vector" type="{82FC5264-88D0-57CD-9307-FC52E4DAD550}">
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{99FDCF74-F290-5367-BAE4-05AB38996ED8}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{44E2934E-9CB7-568F-A59C-D72D83E642F0}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="textures/cursor_default.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="textures/cursor_default.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>

@ -855,7 +855,8 @@ bool CSprite::LoadImage(const AZStd::string& nameTex, AZ::Data::Instance<AZ::RPI
image = AZ::RPI::StreamingImage::FindOrCreate(streamingImageAsset); image = AZ::RPI::StreamingImage::FindOrCreate(streamingImageAsset);
if (!image) if (!image)
{ {
AZ_Error("CSprite", false, "Failed to find or create an image instance from image asset '%s'", streamingImageAsset.GetHint().c_str()); AZ_Error("CSprite", false, "Failed to find or create an image instance from image asset '%s', ID %s",
streamingImageAsset.GetHint().c_str(), streamingImageAsset.GetId().ToString<AZStd::string>().c_str());
return false; return false;
} }

@ -569,7 +569,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -591,7 +591,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>
@ -626,7 +626,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonpressed.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonpressed.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>
@ -650,7 +650,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Button_Sliced_Normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Button_Sliced_Normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>
@ -1161,7 +1161,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -1209,7 +1209,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonpressed.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonpressed.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>
@ -1227,7 +1227,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>
@ -1368,7 +1368,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/scroll_box_icon_1.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/scroll_box_icon_1.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -1438,7 +1438,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -1498,7 +1498,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonpressed.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonpressed.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>
@ -1516,7 +1516,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>
@ -1657,7 +1657,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/scroll_box_icon_6.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/scroll_box_icon_6.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -1714,7 +1714,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/scroll_box_icon_7.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/scroll_box_icon_7.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -1771,7 +1771,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/scroll_box_icon_8.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/scroll_box_icon_8.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>

@ -370,7 +370,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -475,7 +475,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -616,7 +616,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -757,7 +757,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -898,7 +898,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -1118,7 +1118,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/button_sliced_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>

@ -215,7 +215,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -240,7 +240,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonpressed.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonpressed.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -265,7 +265,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Button_Sliced_Normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Button_Sliced_Normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -301,7 +301,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/button.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -378,7 +378,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="Textures/Basic/CheckBox_Off.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="Textures/Basic/CheckBox_Off.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -455,7 +455,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="Textures/Basic/CheckBox_On.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="Textures/Basic/CheckBox_On.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -645,7 +645,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -716,7 +716,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -975,7 +975,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1000,7 +1000,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1052,7 +1052,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1129,7 +1129,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Slider_Fill_Sliced.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Slider_Fill_Sliced.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1206,7 +1206,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Slider_Manipulator.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Slider_Manipulator.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1296,7 +1296,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Slider_Track_Sliced.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="Textures/Basic/Slider_Track_Sliced.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1399,7 +1399,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1425,7 +1425,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="Textures/Basic/slider_background_disabled.sprite" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="Textures/Basic/slider_background_disabled.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1475,7 +1475,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/buttonslider.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1658,7 +1658,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/checkered3.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/lyshineexamples/checkered3.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -475,7 +475,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -854,7 +854,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -1910,7 +1910,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -64,7 +64,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -102,7 +102,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>
@ -422,7 +422,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>

@ -174,7 +174,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>

@ -61,7 +61,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="RenderTargetName" value="" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
@ -99,7 +99,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.dds" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{EF8FF807-DDEE-4EB0-B678-4CA3A2C490A4}"/>
</Class> </Class>
</Class> </Class>
</Class> </Class>

@ -63,7 +63,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -118,7 +118,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -11,10 +11,10 @@
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{E993215C-FF5F-5891-8475-D4EDBD560807}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{E993215C-FF5F-5891-8475-D4EDBD560807}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="textures/basic/button_sliced_normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="textures/basic/button_sliced_normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
@ -27,10 +27,10 @@
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{D1276CDC-6211-5A7E-930F-8F0977FB41A6}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{D1276CDC-6211-5A7E-930F-8F0977FB41A6}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/button_normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/button_normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
@ -43,10 +43,10 @@
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{05D7E013-3691-57AE-A712-53476BDD1EE2}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{05D7E013-3691-57AE-A712-53476BDD1EE2}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/button_disabled.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
@ -59,10 +59,10 @@
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{5FF31E55-4AE2-5A4B-BA86-CB7177F01F72}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{5FF31E55-4AE2-5A4B-BA86-CB7177F01F72}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/textinput_normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/textinput_normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
@ -75,10 +75,10 @@
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{561D1ED0-13FC-5CAD-AB7E-ADE4E424028C}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{561D1ED0-13FC-5CAD-AB7E-ADE4E424028C}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/textinput_hover.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/textinput_hover.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
@ -91,26 +91,26 @@
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{28AC420F-5A90-5FC5-93AC-5CBDA82131E3}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{28AC420F-5A90-5FC5-93AC-5CBDA82131E3}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/textinput_disabled.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/textinput_disabled.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{8B33DC4A-9DCD-5934-9B1B-161236FC4FBF}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{8B33DC4A-9DCD-5934-9B1B-161236FC4FBF}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/checkbox_check.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/checkbox_check.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
<Class name="AZ::Uuid" field="guid" value="{07D54B0D-4DAF-54B0-A7D6-790C4D14A490}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/> <Class name="AZ::Uuid" field="guid" value="{07D54B0D-4DAF-54B0-A7D6-790C4D14A490}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="subId" value="1000" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
</Class> </Class>
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/checkbox_box_normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="pathHint" value="ui/textures/prefab/checkbox_box_normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}"> <Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}"> <Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">

@ -443,35 +443,31 @@ namespace {{ Component.attrib['Namespace'] }}
{{ DeclareNetworkPropertyAccessors(Component, 'Autonomous', 'Authority', false)|indent(8) -}} {{ DeclareNetworkPropertyAccessors(Component, 'Autonomous', 'Authority', false)|indent(8) -}}
{{ DeclareNetworkPropertyAccessors(Component, 'Autonomous', 'Authority', true)|indent(8) -}} {{ DeclareNetworkPropertyAccessors(Component, 'Autonomous', 'Authority', true)|indent(8) -}}
{{ DeclareArchetypePropertyGetters(Component)|indent(8) -}} {{ DeclareArchetypePropertyGetters(Component)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Client', 'Authority', false)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Client', 'Authority', true)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Autonomous', 'Authority', false)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Autonomous', 'Authority', false)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Autonomous', 'Authority', true)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Autonomous', 'Authority', true)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Authority', 'Autonomous', false)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Authority', 'Autonomous', false)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Authority', 'Autonomous', true)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Authority', 'Autonomous', true)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Authority', 'Client', false)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Authority', 'Client', false)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Authority', 'Client', true)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Authority', 'Client', true)|indent(8) -}}
//! RPC Handlers: Override handlers in order to implement what happens after receiving an RPC
{{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Server', 'Authority', false)|indent(8) -}} {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Server', 'Authority', false)|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Client', 'Authority', false)|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Autonomous', 'Authority', false)|indent(8) -}} {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Autonomous', 'Authority', false)|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Authority', 'Autonomous', false)|indent(8) -}} {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Authority', 'Autonomous', false)|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcSignals(Component, 'Server', 'Authority')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcSignals(Component, 'Client', 'Authority')|indent(8) -}} //! RPC Event Getters: Subscribe to these events and get notified when an RPC is received
{{ AutoComponentMacros.DeclareRpcSignals(Component, 'Autonomous', 'Authority')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcSignals(Component, 'Authority', 'Autonomous')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Server', 'Authority')|indent(8) -}} {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Server', 'Authority')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Client', 'Authority')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Autonomous', 'Authority')|indent(8) -}} {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Autonomous', 'Authority')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Authority', 'Autonomous')|indent(8) }} {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Authority', 'Autonomous')|indent(8) -}}
{% for Service in Component.iter('ComponentRelation') %} {% for Service in Component.iter('ComponentRelation') %}
{% if (Service.attrib['HasController']|booleanTrue) and (Service.attrib['Constraint'] != 'Incompatible') %} {% if (Service.attrib['HasController']|booleanTrue) and (Service.attrib['Constraint'] != 'Incompatible') %}
{{ Service.attrib['Namespace'] }}::{{ Service.attrib['Name'] }}Controller* Get{{ Service.attrib['Name'] }}Controller(); {{ Service.attrib['Namespace'] }}::{{ Service.attrib['Name'] }}Controller* Get{{ Service.attrib['Name'] }}Controller();
{% endif %} {% endif %}
{% endfor %} {% endfor %}
protected: protected:
{{ AutoComponentMacros.DeclareRpcEvents(Component, 'Server', 'Authority')|indent(8) -}} {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Server', 'Authority')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcEvents(Component, 'Client', 'Authority')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcEvents(Component, 'Autonomous', 'Authority')|indent(8) -}} {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Autonomous', 'Authority')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcEvents(Component, 'Authority', 'Autonomous')|indent(8) }} {{ AutoComponentMacros.DeclareRpcEvents(Component, 'Authority', 'Autonomous')|indent(8) }}
}; };
@ -517,6 +513,8 @@ namespace {{ Component.attrib['Namespace'] }}
{{ DeclareNetworkPropertyGetters(Component, 'Autonomous', 'Authority', false)|indent(8) -}} {{ DeclareNetworkPropertyGetters(Component, 'Autonomous', 'Authority', false)|indent(8) -}}
{{ DeclareArchetypePropertyGetters(Component)|indent(8) -}} {{ DeclareArchetypePropertyGetters(Component)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Server', 'Authority', false)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Server', 'Authority', false)|indent(8) -}}
//! RPC Event Getters: Subscribe to these events and get notified when this component receives an RPC
{{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Authority', 'Client')|indent(8) -}} {{ AutoComponentMacros.DeclareRpcEventGetters(Component, 'Authority', 'Client')|indent(8) -}}
//! MultiplayerComponent interface //! MultiplayerComponent interface
@ -541,9 +539,13 @@ namespace {{ Component.attrib['Namespace'] }}
{{ DeclareNetworkPropertyGetters(Component, 'Authority', 'Client', true)|indent(8) -}} {{ DeclareNetworkPropertyGetters(Component, 'Authority', 'Client', true)|indent(8) -}}
{{ DeclareNetworkPropertyGetters(Component, 'Autonomous', 'Authority', true)|indent(8) -}} {{ DeclareNetworkPropertyGetters(Component, 'Autonomous', 'Authority', true)|indent(8) -}}
{{ DeclareRpcInvocations(Component, 'Server', 'Authority', true)|indent(8) -}} {{ DeclareRpcInvocations(Component, 'Server', 'Authority', true)|indent(8) -}}
//! RPC Handlers: Override handlers in order to implement what happens after receiving an RPC
{{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Authority', 'Client', false)|indent(8) -}} {{ AutoComponentMacros.DeclareRpcHandlers(Component, 'Authority', 'Client', false)|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcSignals(Component, 'Authority', 'Client')|indent(8) -}}
{{ AutoComponentMacros.DeclareRpcEvents(Component, 'Authority', 'Client')|indent(8) }} //! RPC Events: Subscribe to these events and get notified when an RPC is received
{{ AutoComponentMacros.DeclareRpcEvents(Component, 'Authority', 'Client')|indent(8) -}}
{% for Service in Component.iter('ComponentRelation') %} {% for Service in Component.iter('ComponentRelation') %}
{% if Service.attrib['Constraint'] != 'Incompatible' %} {% if Service.attrib['Constraint'] != 'Incompatible' %}
const {{ Service.attrib['Namespace'] }}::{{ Service.attrib['Name'] }}* Get{{ Service.attrib['Name'] }}() const; const {{ Service.attrib['Namespace'] }}::{{ Service.attrib['Name'] }}* Get{{ Service.attrib['Name'] }}() const;

@ -340,27 +340,11 @@ void {{ ClassName }}::{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(par
{% endmacro %} {% endmacro %}
{# {#
#}
{% macro DefineRpcSignal(Component, ClassName, Property, InvokeFrom) %}
{% set paramNames = [] %}
{% set paramTypes = [] %}
{% set paramDefines = [] %}
{{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }}
void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramDefines) }})
{
m_{{ UpperFirst(Property.attrib['Name']) }}Event.Signal({{ ', '.join(paramNames) }});
}
{% endmacro %}
{#
#} #}
{% macro DefineRpcInvocations(Component, ClassName, InvokeFrom, HandleOn, IsProtected) %} {% macro DefineRpcInvocations(Component, ClassName, InvokeFrom, HandleOn, IsProtected) %}
{% call(Property) AutoComponentMacros.ParseRemoteProcedures(Component, InvokeFrom, HandleOn) %} {% call(Property) AutoComponentMacros.ParseRemoteProcedures(Component, InvokeFrom, HandleOn) %}
{% if Property.attrib['IsPublic']|booleanTrue != IsProtected %} {% if Property.attrib['IsPublic']|booleanTrue != IsProtected %}
{{ DefineRpcInvocation(Component, ClassName, Property, InvokeFrom, HandleOn) -}} {{ DefineRpcInvocation(Component, ClassName, Property, InvokeFrom, HandleOn) -}}
{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %}
{{ DefineRpcSignal(Component, ClassName, Property, InvokeFrom) -}}
{% endif %}
{% endif %} {% endif %}
{% endcall %} {% endcall %}
{% endmacro %} {% endmacro %}
@ -374,33 +358,46 @@ void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.jo
{% set paramTypes = [] %} {% set paramTypes = [] %}
{% set paramDefines = [] %} {% set paramDefines = [] %}
{{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }} {{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }}
->Method("{{ UpperFirst(Property.attrib['Name']) }}", [](const {{ ClassName }}* self, {{ ', '.join(paramDefines) }}) { ->Method("{{ UpperFirst(Property.attrib['Name']) }}", []({{ ClassName }}* self, {{ ', '.join(paramDefines) }}) {
self->m_controller->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); {% if (InvokeFrom == 'Server') %}
self->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }});
{% elif (InvokeFrom == 'Authority') or (InvokeFrom == 'Autonomous') %}
if (self->m_controller)
{
self->m_controller->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }});
}
else
{
AZ_Warning("Network RPC", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }} method failed. Entity '%s' (id: %s) {{ ClassName }} is missing the network controller. This remote-procedure can only be invoked from {{InvokeFrom}} network entities, because this entity doesn't have a controller, it must not be a {{InvokeFrom}} entity. Please check your network context before attempting to call {{ UpperFirst(Property.attrib['Name']) }}.", self->GetEntity()->GetName().c_str(), self->GetEntityId().ToString().c_str())
}
{% endif %}
}) })
->Method("{{ UpperFirst(Property.attrib['Name']) }}ByEntityId", [](AZ::EntityId id, {{ ', '.join(paramDefines) }}) { ->Method("{{ UpperFirst(Property.attrib['Name']) }}ByEntityId", [](AZ::EntityId id, {{ ', '.join(paramDefines) }}) {
AZ::Entity* entity = AZ::Interface<AZ::ComponentApplicationRequests>::Get()->FindEntity(id); AZ::Entity* entity = AZ::Interface<AZ::ComponentApplicationRequests>::Get()->FindEntity(id);
if (!entity) if (!entity)
{ {
AZ_Warning("Network Property", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) AZ_Warning("Network RPC", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str())
return; return;
} }
{{ ClassName }}* networkComponent = entity->FindComponent<{{ ClassName }}>(); {{ ClassName }}* networkComponent = entity->FindComponent<{{ ClassName }}>();
if (!networkComponent) if (!networkComponent)
{ {
AZ_Warning("Network Property", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId failed. Entity '%s' (id: %s) is missing {{ ClassName }}, be sure to add {{ ClassName }} to this entity.", entity->GetName().c_str(), id.ToString().c_str()) AZ_Warning("Network RPC", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId failed. Entity '%s' (id: %s) is missing {{ ClassName }}, be sure to add {{ ClassName }} to this entity.", entity->GetName().c_str(), id.ToString().c_str())
return; return;
} }
{% if (InvokeFrom == 'Server') %}
networkComponent->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }});
{% elif (InvokeFrom == 'Authority') or (InvokeFrom == 'Autonomous') %}
{{ ClassName }}Controller* controller = static_cast<{{ ClassName }}Controller*>(networkComponent->GetController()); {{ ClassName }}Controller* controller = static_cast<{{ ClassName }}Controller*>(networkComponent->GetController());
if (!controller) if (!controller)
{ {
AZ_Warning("Network Property", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId method failed. Entity '%s' (id: %s) {{ ClassName }} is missing the network controller. This RemoteProcedure can only be invoked from {{InvokeFrom}} network entities, because this entity doesn't have a controller, it must not be a {{InvokeFrom}} entity. Please check your network context before attempting to call {{ UpperFirst(Property.attrib['Name']) }}.", entity->GetName().c_str(), id.ToString().c_str()) AZ_Warning("Network RPC", false, "{{ ClassName }} {{ UpperFirst(Property.attrib['Name']) }}ByEntityId method failed. Entity '%s' (id: %s) {{ ClassName }} is missing the network controller. This RemoteProcedure can only be invoked from {{InvokeFrom}} network entities, because this entity doesn't have a controller, it must not be a {{InvokeFrom}} entity. Please check your network context before attempting to call {{ UpperFirst(Property.attrib['Name']) }}.", entity->GetName().c_str(), id.ToString().c_str())
return; return;
} }
controller->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); controller->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }});
{% endif %}
}, { { { "Source", "The Source containing the {{ ClassName }}Controller" }{% for paramName in paramNames %}, {"{{ paramName }}"}{% endfor %}}}) }, { { { "Source", "The Source containing the {{ ClassName }}Controller" }{% for paramName in paramNames %}, {"{{ paramName }}"}{% endfor %}}})
->Attribute(AZ::Script::Attributes::ToolTip, "{{Property.attrib['Description']}}") ->Attribute(AZ::Script::Attributes::ToolTip, "{{Property.attrib['Description']}}")
{% endif %} {% endif %}
@ -436,9 +433,13 @@ void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.jo
{% set paramTypes = [] %} {% set paramTypes = [] %}
{% set paramDefines = [] %} {% set paramDefines = [] %}
{{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }} {{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }}
->Method("Get{{ UpperFirst(Property.attrib['Name']) }}Event", [](const {{ ClassName }}* self) -> AZ::Event<{{ ', '.join(paramTypes) }}>& ->Method("Get{{ UpperFirst(Property.attrib['Name']) }}Event", []({{ ClassName }}* self) -> AZ::Event<{{ ', '.join(paramTypes) }}>&
{ {
{% if HandleOn == 'Client' %}
return self->Get{{ UpperFirst(Property.attrib['Name']) }}Event();
{% elif (HandleOn == 'Authority') or (HandleOn == 'Autonomous') %}
return self->m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event(); return self->m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event();
{% endif %}
}) })
->Attribute(AZ::Script::Attributes::AzEventDescription, {{ LowerFirst(Property.attrib['Name']) }}EventDesc) ->Attribute(AZ::Script::Attributes::AzEventDescription, {{ LowerFirst(Property.attrib['Name']) }}EventDesc)
->Method("Get{{ UpperFirst(Property.attrib['Name']) }}EventByEntityId", [](AZ::EntityId id) -> AZ::Event<{{ ', '.join(paramTypes) }}>* ->Method("Get{{ UpperFirst(Property.attrib['Name']) }}EventByEntityId", [](AZ::EntityId id) -> AZ::Event<{{ ', '.join(paramTypes) }}>*
@ -456,7 +457,9 @@ void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.jo
AZ_Warning("Network Property", false, "{{ ClassName }} Get{{ UpperFirst(Property.attrib['Name']) }}EventByEntityId failed. Entity '%s' (id: %s) is missing {{ ClassName }}, be sure to add {{ ClassName }} to this entity.", entity->GetName().c_str(), id.ToString().c_str()) AZ_Warning("Network Property", false, "{{ ClassName }} Get{{ UpperFirst(Property.attrib['Name']) }}EventByEntityId failed. Entity '%s' (id: %s) is missing {{ ClassName }}, be sure to add {{ ClassName }} to this entity.", entity->GetName().c_str(), id.ToString().c_str())
return nullptr; return nullptr;
} }
{% if HandleOn == 'Client' %}
return &networkComponent->Get{{ UpperFirst(Property.attrib['Name']) }}Event();
{% elif (HandleOn == 'Authority') or (HandleOn == 'Autonomous') %}
{{ ClassName }}Controller* controller = static_cast<{{ ClassName }}Controller*>(networkComponent->GetController()); {{ ClassName }}Controller* controller = static_cast<{{ ClassName }}Controller*>(networkComponent->GetController());
if (!controller) if (!controller)
{ {
@ -465,6 +468,7 @@ void {{ ClassName }}::Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.jo
} }
return &controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event(); return &controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event();
{% endif %}
}) })
->Attribute(AZ::Script::Attributes::AzEventDescription, AZStd::move({{ LowerFirst(Property.attrib['Name']) }}EventDesc)) ->Attribute(AZ::Script::Attributes::AzEventDescription, AZStd::move({{ LowerFirst(Property.attrib['Name']) }}EventDesc))
{% endif %} {% endif %}
@ -494,29 +498,31 @@ case {{ UpperFirst(Component.attrib['Name']) }}Internal::RemoteProcedure::{{ Upp
{ {
AZ_Assert(GetNetBindComponent()->GetNetEntityRole() == Multiplayer::NetEntityRole::Authority, "Entity proxy does not have authority"); AZ_Assert(GetNetBindComponent()->GetNetEntityRole() == Multiplayer::NetEntityRole::Authority, "Entity proxy does not have authority");
m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }});
{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} {% if (Property.attrib['GenerateEventBindings']|booleanTrue == true) %}
m_controller->Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(rpcParamList) }}); m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event().Signal({{ ', '.join(rpcParamList) }});
{% endif %} {% endif %}
} }
{% if Property.attrib['IsReliable']|booleanTrue %}
{# if the rpc is not reliable we can simply drop it, also note message reliability type is default reliable in EntityRpcMessage #}
else // Note that this rpc is marked reliable, trigger the appropriate rpc event so it can be forwarded else // Note that this rpc is marked reliable, trigger the appropriate rpc event so it can be forwarded
{ {
{% if Property.attrib['IsReliable']|booleanTrue %}
{# if the rpc is not reliable we can simply drop it, also note message reliability type is default reliable in EntityRpcMessage #}
m_netBindComponent->{{ "GetSend" + InvokeFrom + "To" + HandleOn + "RpcEvent" }}().Signal(message); m_netBindComponent->{{ "GetSend" + InvokeFrom + "To" + HandleOn + "RpcEvent" }}().Signal(message);
{% endif %}
} }
{% endif %}
{% elif HandleOn == 'Autonomous' %} {% elif HandleOn == 'Autonomous' %}
if (m_controller) if (m_controller)
{ {
AZ_Assert(GetNetBindComponent()->GetNetEntityRole() == Multiplayer::NetEntityRole::Autonomous, "Entity proxy does not have autonomy"); AZ_Assert(GetNetBindComponent()->GetNetEntityRole() == Multiplayer::NetEntityRole::Autonomous, "Entity proxy does not have autonomy");
m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }});
{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} {% if Property.attrib['GenerateEventBindings']|booleanTrue == true %}
m_controller->Signal{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(rpcParamList) }}); m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event().Signal({{ ', '.join(rpcParamList) }});
{% endif %} {% endif %}
} }
{% else %} {% elif HandleOn == 'Client' %}
Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }});
{% if Property.attrib['GenerateEventBindings']|booleanTrue == true %}
m_{{ UpperFirst(Property.attrib['Name']) }}Event.Signal({{ ', '.join(rpcParamList) }});
{% endif %}
{% endif %} {% endif %}
} }
else if (paramsSerialized) else if (paramsSerialized)

@ -224,8 +224,22 @@ namespace PhysX {
physx::PxJointLimitCone limitCone(swingLimitY, swingLimitZ); physx::PxJointLimitCone limitCone(swingLimitY, swingLimitZ);
joint->setSwingLimit(limitCone); joint->setSwingLimit(limitCone);
const float twistLower = AZ::DegToRad(AZStd::GetMin(configuration.m_twistLimitLower, configuration.m_twistLimitUpper)); float twistLower = AZ::DegToRad(AZStd::GetMin(configuration.m_twistLimitLower, configuration.m_twistLimitUpper));
const float twistUpper = AZ::DegToRad(AZStd::GetMax(configuration.m_twistLimitLower, configuration.m_twistLimitUpper)); float twistUpper = AZ::DegToRad(AZStd::GetMax(configuration.m_twistLimitLower, configuration.m_twistLimitUpper));
// make sure there is at least a small difference between the lower and upper limits to avoid problems in PhysX
const float minTwistLimitRangeRadians = AZ::DegToRad(JointConstants::MinTwistLimitRangeDegrees);
if (const float twistLimitRange = twistUpper - twistLower;
twistLimitRange < minTwistLimitRangeRadians)
{
if (twistUpper > 0.0f)
{
twistLower -= (minTwistLimitRangeRadians - twistLimitRange);
}
else
{
twistUpper += (minTwistLimitRangeRadians - twistLimitRange);
}
}
physx::PxJointAngularLimitPair twistLimitPair(twistLower, twistUpper); physx::PxJointAngularLimitPair twistLimitPair(twistLower, twistUpper);
joint->setTwistLimit(twistLimitPair); joint->setTwistLimit(twistLimitPair);

@ -18,9 +18,11 @@ namespace PhysX
{ {
namespace JointConstants namespace JointConstants
{ {
// Setting swing limits to very small values can cause extreme stability problems, so clamp above a small // Setting joint limits to very small values can cause extreme stability problems, so clamp above a small
// threshold. // threshold.
static const float MinSwingLimitDegrees = 1.0f; static const float MinSwingLimitDegrees = 1.0f;
// Minimum range between lower and upper twist limits.
static const float MinTwistLimitRangeDegrees = 1.0f;
} // namespace JointConstants } // namespace JointConstants
namespace Utils namespace Utils

@ -24,17 +24,6 @@ namespace Camera
Z_Axis = 2 Z_Axis = 2
}; };
//////////////////////////////////////////////////////////////////////////
/// These are intended to be used as an index and needs to be implicitly
/// convertible to int. See StartingPointCameraUtilities.h for examples
enum VectorComponentType : int
{
X_Component = 0,
Y_Component = 1,
Z_Component = 2,
None = 3,
};
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/// These are intended to be used as an index and needs to be implicitly /// These are intended to be used as an index and needs to be implicitly
/// convertible to int. See StartingPointCameraUtilities.h for examples /// convertible to int. See StartingPointCameraUtilities.h for examples

@ -16,24 +16,16 @@ namespace Camera
{ {
const char* GetNameFromUuid(const AZ::Uuid& uuid); const char* GetNameFromUuid(const AZ::Uuid& uuid);
////////////////////////////////////////////////////////////////////////// //! This methods will 0 out specified vector components and re-normalize it
/// This methods will 0 out a vector component and re-normalize it void MaskComponentFromNormalizedVector(AZ::Vector3& v, bool ignoreX, bool ignoreY, bool ignoreZ);
//////////////////////////////////////////////////////////////////////////
void MaskComponentFromNormalizedVector(AZ::Vector3& v, VectorComponentType vectorComponentType);
////////////////////////////////////////////////////////////////////////// //! This will calculate the requested Euler angle from a given AZ::Quaternion
/// This will calculate the requested Euler angle from a given AZ::Quaternion
//////////////////////////////////////////////////////////////////////////
float GetEulerAngleFromTransform(const AZ::Transform& rotation, EulerAngleType eulerAngleType); float GetEulerAngleFromTransform(const AZ::Transform& rotation, EulerAngleType eulerAngleType);
////////////////////////////////////////////////////////////////////////// //! This will calculate an AZ::Transform based on an Euler angle
/// This will calculate an AZ::Transform based on an Euler angle
//////////////////////////////////////////////////////////////////////////
AZ::Transform CreateRotationFromEulerAngle(EulerAngleType rotationType, float radians); AZ::Transform CreateRotationFromEulerAngle(EulerAngleType rotationType, float radians);
////////////////////////////////////////////////////////////////////////// //! Creates the Quaternion representing the rotation looking down the vector
/// Creates the Quaternion representing the rotation looking down the vector
//////////////////////////////////////////////////////////////////////////
AZ::Quaternion CreateQuaternionFromViewVector(const AZ::Vector3 lookVector); AZ::Quaternion CreateQuaternionFromViewVector(const AZ::Vector3 lookVector);
} //namespace Camera } //namespace Camera

@ -20,10 +20,12 @@ namespace Camera
if (serializeContext) if (serializeContext)
{ {
serializeContext->Class<SlideAlongAxisBasedOnAngle>() serializeContext->Class<SlideAlongAxisBasedOnAngle>()
->Version(1) ->Version(2)
->Field("Axis to slide along", &SlideAlongAxisBasedOnAngle::m_axisToSlideAlong) ->Field("Axis to slide along", &SlideAlongAxisBasedOnAngle::m_axisToSlideAlong)
->Field("Angle Type", &SlideAlongAxisBasedOnAngle::m_angleTypeToChangeFor) ->Field("Angle Type", &SlideAlongAxisBasedOnAngle::m_angleTypeToChangeFor)
->Field("Vector Component To Ignore", &SlideAlongAxisBasedOnAngle::m_vectorComponentToIgnore) ->Field("Ignore X Component", &SlideAlongAxisBasedOnAngle::m_ignoreX)
->Field("Ignore Y Component", &SlideAlongAxisBasedOnAngle::m_ignoreY)
->Field("Ignore Z Component", &SlideAlongAxisBasedOnAngle::m_ignoreZ)
->Field("Max Positive Slide Distance", &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance) ->Field("Max Positive Slide Distance", &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance)
->Field("Max Negative Slide Distance", &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance); ->Field("Max Negative Slide Distance", &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance);
@ -40,15 +42,16 @@ namespace Camera
->EnumAttribute(EulerAngleType::Pitch, "Pitch") ->EnumAttribute(EulerAngleType::Pitch, "Pitch")
->EnumAttribute(EulerAngleType::Roll, "Roll") ->EnumAttribute(EulerAngleType::Roll, "Roll")
->EnumAttribute(EulerAngleType::Yaw, "Yaw") ->EnumAttribute(EulerAngleType::Yaw, "Yaw")
->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_vectorComponentToIgnore, "Vector Component To Ignore", "The Vector Component To Ignore")
->EnumAttribute(VectorComponentType::None, "None")
->EnumAttribute(VectorComponentType::X_Component, "X")
->EnumAttribute(VectorComponentType::Y_Component, "Y")
->EnumAttribute(VectorComponentType::Z_Component, "Z")
->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance, "Max Positive Slide Distance", "The maximum distance to slide in the positive") ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance, "Max Positive Slide Distance", "The maximum distance to slide in the positive")
->Attribute(AZ::Edit::Attributes::Suffix, "m") ->Attribute(AZ::Edit::Attributes::Suffix, "m")
->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance, "Max Negative Slide Distance", "The maximum distance to slide in the negative") ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance, "Max Negative Slide Distance", "The maximum distance to slide in the negative")
->Attribute(AZ::Edit::Attributes::Suffix, "m"); ->Attribute(AZ::Edit::Attributes::Suffix, "m")
->ClassElement(AZ::Edit::ClassElements::Group, "Vector Components To Ignore")
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreX, "X", "When active, the X Component will be ignored.")
->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreY, "Y", "When active, the Y Component will be ignored.")
->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreZ, "Z", "When active, the Z Component will be ignored.")
;
} }
} }
} }
@ -60,7 +63,7 @@ namespace Camera
float slideScale = currentPositionOnRange > 0.0f ? m_maximumPositiveSlideDistance : m_maximumNegativeSlideDistance; float slideScale = currentPositionOnRange > 0.0f ? m_maximumPositiveSlideDistance : m_maximumNegativeSlideDistance;
AZ::Vector3 basis = outLookAtTargetTransform.GetBasis(m_axisToSlideAlong); AZ::Vector3 basis = outLookAtTargetTransform.GetBasis(m_axisToSlideAlong);
MaskComponentFromNormalizedVector(basis, m_vectorComponentToIgnore); MaskComponentFromNormalizedVector(basis, m_ignoreX, m_ignoreY, m_ignoreZ);
outLookAtTargetTransform.SetTranslation(outLookAtTargetTransform.GetTranslation() + basis * currentPositionOnRange * slideScale); outLookAtTargetTransform.SetTranslation(outLookAtTargetTransform.GetTranslation() + basis * currentPositionOnRange * slideScale);
} }

@ -43,8 +43,10 @@ namespace Camera
// Reflected data // Reflected data
RelativeAxisType m_axisToSlideAlong = ForwardBackward; RelativeAxisType m_axisToSlideAlong = ForwardBackward;
EulerAngleType m_angleTypeToChangeFor = Pitch; EulerAngleType m_angleTypeToChangeFor = Pitch;
VectorComponentType m_vectorComponentToIgnore = None;
float m_maximumPositiveSlideDistance = 0.0f; float m_maximumPositiveSlideDistance = 0.0f;
float m_maximumNegativeSlideDistance = 0.0f; float m_maximumNegativeSlideDistance = 0.0f;
bool m_ignoreX = false;
bool m_ignoreY = false;
bool m_ignoreZ = false;
}; };
} // namespace Camera } // namespace Camera

@ -26,38 +26,32 @@ namespace Camera
return ""; return "";
} }
////////////////////////////////////////////////////////////////////////// void MaskComponentFromNormalizedVector(AZ::Vector3& v, bool ignoreX, bool ignoreY, bool ignoreZ)
/// This methods will 0 out a vector component and re-normalize it
//////////////////////////////////////////////////////////////////////////
void MaskComponentFromNormalizedVector(AZ::Vector3& v, VectorComponentType vectorComponentType)
{ {
switch (vectorComponentType)
{ if (ignoreX)
case X_Component:
{ {
v.SetX(0.f); v.SetX(0.f);
break;
} }
case Y_Component:
if (ignoreY)
{ {
v.SetY(0.f); v.SetY(0.f);
break;
} }
case Z_Component:
if (ignoreZ)
{ {
v.SetZ(0.f); v.SetZ(0.f);
break;
} }
default:
AZ_Assert(false, "MaskComponentFromNormalizedVector: VectorComponentType - unexpected value"); if (v.IsZero())
break; {
AZ_Warning("StartingPointCameraUtilities", false, "MaskComponentFromNormalizedVector: trying to normalize zero vector.")
return;
} }
v.Normalize(); v.Normalize();
} }
//////////////////////////////////////////////////////////////////////////
/// This will calculate the requested Euler angle from a given AZ::Quaternion
//////////////////////////////////////////////////////////////////////////
float GetEulerAngleFromTransform(const AZ::Transform& rotation, EulerAngleType eulerAngleType) float GetEulerAngleFromTransform(const AZ::Transform& rotation, EulerAngleType eulerAngleType)
{ {
AZ::Vector3 angles = rotation.GetEulerDegrees(); AZ::Vector3 angles = rotation.GetEulerDegrees();
@ -70,14 +64,11 @@ namespace Camera
case Yaw: case Yaw:
return angles.GetZ(); return angles.GetZ();
default: default:
AZ_Warning("", false, "GetEulerAngleFromRotation: eulerAngleType - value not supported"); AZ_Warning("StartingPointCameraUtilities", false, "GetEulerAngleFromRotation: eulerAngleType - value not supported");
return 0.f; return 0.f;
} }
} }
//////////////////////////////////////////////////////////////////////////
/// This will calculate an AZ::Transform based on an Euler angle
//////////////////////////////////////////////////////////////////////////
AZ::Transform CreateRotationFromEulerAngle(EulerAngleType rotationType, float radians) AZ::Transform CreateRotationFromEulerAngle(EulerAngleType rotationType, float radians)
{ {
switch (rotationType) switch (rotationType)
@ -89,14 +80,11 @@ namespace Camera
case Yaw: case Yaw:
return AZ::Transform::CreateRotationZ(radians); return AZ::Transform::CreateRotationZ(radians);
default: default:
AZ_Warning("", false, "CreateRotationFromEulerAngle: rotationType - value not supported"); AZ_Warning("StartingPointCameraUtilities", false, "CreateRotationFromEulerAngle: rotationType - value not supported");
return AZ::Transform::Identity(); return AZ::Transform::Identity();
} }
} }
//////////////////////////////////////////////////////////////////////////
/// Creates the Quaternion representing the rotation looking down the vector
//////////////////////////////////////////////////////////////////////////
AZ::Quaternion CreateQuaternionFromViewVector(const AZ::Vector3 lookVector) AZ::Quaternion CreateQuaternionFromViewVector(const AZ::Vector3 lookVector)
{ {
float twoDimensionLength = AZ::Vector2(lookVector.GetX(), lookVector.GetY()).GetLength(); float twoDimensionLength = AZ::Vector2(lookVector.GetX(), lookVector.GetY()).GetLength();

@ -19,7 +19,6 @@
#include <Terrain/MockTerrain.h> #include <Terrain/MockTerrain.h>
using ::testing::_; using ::testing::_;
using ::testing::AtLeast;
using ::testing::Mock; using ::testing::Mock;
using ::testing::NiceMock; using ::testing::NiceMock;
using ::testing::Return; using ::testing::Return;
@ -29,8 +28,6 @@ class TerrainHeightGradientListComponentTest : public ::testing::Test
protected: protected:
AZ::ComponentApplication m_app; AZ::ComponentApplication m_app;
AZStd::unique_ptr<AZ::Entity> m_entity;
void SetUp() override void SetUp() override
{ {
AZ::ComponentApplication::Descriptor appDesc; AZ::ComponentApplication::Descriptor appDesc;
@ -46,47 +43,70 @@ protected:
m_app.Destroy(); m_app.Destroy();
} }
void CreateEntity() AZStd::unique_ptr<AZ::Entity> CreateEntity()
{ {
m_entity = AZStd::make_unique<AZ::Entity>(); auto entity = AZStd::make_unique<AZ::Entity>();
ASSERT_TRUE(m_entity); entity->Init();
return entity;
// Create the required box component. }
UnitTest::MockAxisAlignedBoxShapeComponent* boxComponent = m_entity->CreateComponent<UnitTest::MockAxisAlignedBoxShapeComponent>();
m_app.RegisterComponentDescriptor(boxComponent->CreateDescriptor());
Terrain::TerrainHeightGradientListComponent* AddHeightGradientListToEntity(AZ::Entity* entity)
{
// Create the TerrainHeightGradientListComponent with an entity in its configuration. // Create the TerrainHeightGradientListComponent with an entity in its configuration.
Terrain::TerrainHeightGradientListConfig config; Terrain::TerrainHeightGradientListConfig config;
config.m_gradientEntities.push_back(m_entity->GetId()); config.m_gradientEntities.push_back(entity->GetId());
Terrain::TerrainHeightGradientListComponent* heightGradientListComponent = m_entity->CreateComponent<Terrain::TerrainHeightGradientListComponent>(config); auto heightGradientListComponent = entity->CreateComponent<Terrain::TerrainHeightGradientListComponent>(config);
m_app.RegisterComponentDescriptor(heightGradientListComponent->CreateDescriptor()); m_app.RegisterComponentDescriptor(heightGradientListComponent->CreateDescriptor());
return heightGradientListComponent;
}
void AddRequiredComponetsToEntity(AZ::Entity* entity)
{
// Create the required box component.
UnitTest::MockAxisAlignedBoxShapeComponent* boxComponent = entity->CreateComponent<UnitTest::MockAxisAlignedBoxShapeComponent>();
m_app.RegisterComponentDescriptor(boxComponent->CreateDescriptor());
// Create a MockTerrainLayerSpawnerComponent to provide the required TerrainAreaService. // Create a MockTerrainLayerSpawnerComponent to provide the required TerrainAreaService.
UnitTest::MockTerrainLayerSpawnerComponent* layerSpawner = m_entity->CreateComponent<UnitTest::MockTerrainLayerSpawnerComponent>(); UnitTest::MockTerrainLayerSpawnerComponent* layerSpawner = entity->CreateComponent<UnitTest::MockTerrainLayerSpawnerComponent>();
m_app.RegisterComponentDescriptor(layerSpawner->CreateDescriptor()); m_app.RegisterComponentDescriptor(layerSpawner->CreateDescriptor());
m_entity->Init();
} }
}; };
TEST_F(TerrainHeightGradientListComponentTest, MissingRequiredComponentsActivateFailure)
{
auto entity = CreateEntity();
AddHeightGradientListToEntity(entity.get());
const AZ::Entity::DependencySortOutcome sortOutcome = entity->EvaluateDependenciesGetDetails();
EXPECT_FALSE(sortOutcome.IsSuccess());
}
TEST_F(TerrainHeightGradientListComponentTest, ActivateEntityActivateSuccess) TEST_F(TerrainHeightGradientListComponentTest, ActivateEntityActivateSuccess)
{ {
// Check that the entity activates. // Check that the entity activates.
CreateEntity(); auto entity = CreateEntity();
AddHeightGradientListToEntity(entity.get());
m_entity->Activate(); AddRequiredComponetsToEntity(entity.get());
EXPECT_EQ(m_entity->GetState(), AZ::Entity::State::Active);
m_entity.reset(); entity->Activate();
EXPECT_EQ(entity->GetState(), AZ::Entity::State::Active);
} }
TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientRefreshesTerrainSystem) TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientRefreshesTerrainSystem)
{ {
// Check that the HeightGradientListComponent informs the TerrainSystem when the composition changes. // Check that the HeightGradientListComponent informs the TerrainSystem when the composition changes.
CreateEntity(); auto entity = CreateEntity();
m_entity->Activate(); AddHeightGradientListToEntity(entity.get());
AddRequiredComponetsToEntity(entity.get());
entity->Activate();
NiceMock<UnitTest::MockTerrainSystemService> terrainSystem; NiceMock<UnitTest::MockTerrainSystemService> terrainSystem;
@ -95,32 +115,34 @@ TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientRefreshesTer
// and once when the HeightGradientListComponent gets the OnCompositionChanged directly through the DependencyNotificationBus. // and once when the HeightGradientListComponent gets the OnCompositionChanged directly through the DependencyNotificationBus.
EXPECT_CALL(terrainSystem, RefreshArea(_, _)).Times(2); EXPECT_CALL(terrainSystem, RefreshArea(_, _)).Times(2);
LmbrCentral::DependencyNotificationBus::Event(m_entity->GetId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged); LmbrCentral::DependencyNotificationBus::Event(entity->GetId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged);
// Stop the EXPECT_CALL check now, as OnCompositionChanged will get called twice again during the reset. // Stop the EXPECT_CALL check now, as OnCompositionChanged will get called twice again during the reset.
Mock::VerifyAndClearExpectations(&terrainSystem); Mock::VerifyAndClearExpectations(&terrainSystem);
m_entity.reset();
} }
TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientListReturnsHeights) TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientListReturnsHeights)
{ {
// Check that the HeightGradientListComponent returns expected height values. // Check that the HeightGradientListComponent returns expected height values.
CreateEntity(); auto entity = CreateEntity();
NiceMock<UnitTest::MockTerrainAreaHeightRequests> heightfieldRequestBus(m_entity->GetId()); AddHeightGradientListToEntity(entity.get());
m_entity->Activate(); AddRequiredComponetsToEntity(entity.get());
NiceMock<UnitTest::MockTerrainAreaHeightRequests> heightfieldRequestBus(entity->GetId());
entity->Activate();
const float mockGradientValue = 0.25f; const float mockGradientValue = 0.25f;
NiceMock<UnitTest::MockGradientRequests> gradientRequests(m_entity->GetId()); NiceMock<UnitTest::MockGradientRequests> gradientRequests(entity->GetId());
ON_CALL(gradientRequests, GetValue).WillByDefault(Return(mockGradientValue)); ON_CALL(gradientRequests, GetValue).WillByDefault(Return(mockGradientValue));
// Setup a mock to provide the encompassing Aabb to the HeightGradientListComponent. // Setup a mock to provide the encompassing Aabb to the HeightGradientListComponent.
const float min = 0.0f; const float min = 0.0f;
const float max = 1000.0f; const float max = 1000.0f;
const AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3(min), AZ::Vector3(max)); const AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3(min), AZ::Vector3(max));
NiceMock<UnitTest::MockShapeComponentRequests> mockShapeRequests(m_entity->GetId()); NiceMock<UnitTest::MockShapeComponentRequests> mockShapeRequests(entity->GetId());
ON_CALL(mockShapeRequests, GetEncompassingAabb).WillByDefault(Return(aabb)); ON_CALL(mockShapeRequests, GetEncompassingAabb).WillByDefault(Return(aabb));
const float worldMax = 10000.0f; const float worldMax = 10000.0f;
@ -130,17 +152,16 @@ TEST_F(TerrainHeightGradientListComponentTest, TerrainHeightGradientListReturnsH
ON_CALL(mockterrainDataRequests, GetTerrainAabb).WillByDefault(Return(worldAabb)); ON_CALL(mockterrainDataRequests, GetTerrainAabb).WillByDefault(Return(worldAabb));
// Ensure the cached values in the HeightGradientListComponent are up to date. // Ensure the cached values in the HeightGradientListComponent are up to date.
LmbrCentral::DependencyNotificationBus::Event(m_entity->GetId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged); LmbrCentral::DependencyNotificationBus::Event(entity->GetId(), &LmbrCentral::DependencyNotificationBus::Events::OnCompositionChanged);
const AZ::Vector3 inPosition = AZ::Vector3::CreateZero(); const AZ::Vector3 inPosition = AZ::Vector3::CreateZero();
AZ::Vector3 outPosition = AZ::Vector3::CreateZero(); AZ::Vector3 outPosition = AZ::Vector3::CreateZero();
bool terrainExists = false; bool terrainExists = false;
Terrain::TerrainAreaHeightRequestBus::Event(m_entity->GetId(), &Terrain::TerrainAreaHeightRequestBus::Events::GetHeight, inPosition, outPosition, terrainExists); Terrain::TerrainAreaHeightRequestBus::Event(
entity->GetId(), &Terrain::TerrainAreaHeightRequestBus::Events::GetHeight, inPosition, outPosition, terrainExists);
const float height = outPosition.GetZ(); const float height = outPosition.GetZ();
EXPECT_NEAR(height, mockGradientValue * max, 0.01f); EXPECT_NEAR(height, mockGradientValue * max, 0.01f);
m_entity.reset();
} }

@ -11,8 +11,6 @@
#include <GradientSignal/Ebuses/MockGradientRequestBus.h> #include <GradientSignal/Ebuses/MockGradientRequestBus.h>
using ::testing::NiceMock; using ::testing::NiceMock;
using ::testing::AtLeast;
using ::testing::_;
using ::testing::Return; using ::testing::Return;
namespace UnitTest namespace UnitTest
@ -22,10 +20,6 @@ namespace UnitTest
protected: protected:
AZ::ComponentApplication m_app; AZ::ComponentApplication m_app;
AZStd::unique_ptr<AZ::Entity> m_entity;
UnitTest::MockTerrainLayerSpawnerComponent* m_layerSpawnerComponent = nullptr;
AZStd::unique_ptr<AZ::Entity> m_gradientEntity1, m_gradientEntity2;
const AZStd::string surfaceTag1 = "testtag1"; const AZStd::string surfaceTag1 = "testtag1";
const AZStd::string surfaceTag2 = "testtag2"; const AZStd::string surfaceTag2 = "testtag2";
@ -37,81 +31,76 @@ namespace UnitTest
appDesc.m_stackRecordLevels = 20; appDesc.m_stackRecordLevels = 20;
m_app.Create(appDesc); m_app.Create(appDesc);
CreateEntities();
} }
void TearDown() override void TearDown() override
{ {
m_gradientEntity2.reset();
m_gradientEntity1.reset();
m_entity.reset();
m_app.Destroy(); m_app.Destroy();
} }
void CreateEntities() AZStd::unique_ptr<AZ::Entity> CreateEntity()
{ {
m_entity = AZStd::make_unique<AZ::Entity>(); auto entity = AZStd::make_unique<AZ::Entity>();
ASSERT_TRUE(m_entity); entity->Init();
return entity;
}
m_entity->Init(); UnitTest::MockTerrainLayerSpawnerComponent* AddRequiredComponentsToEntity(AZ::Entity* entity)
{
auto layerSpawnerComponent = entity->CreateComponent<UnitTest::MockTerrainLayerSpawnerComponent>();
m_app.RegisterComponentDescriptor(layerSpawnerComponent->CreateDescriptor());
m_gradientEntity1 = AZStd::make_unique<AZ::Entity>(); return layerSpawnerComponent;
ASSERT_TRUE(m_gradientEntity1); }
};
m_gradientEntity1->Init(); TEST_F(TerrainSurfaceGradientListTest, SurfaceGradientMissingRequirementsActivateFails)
{
auto entity = CreateEntity();
m_gradientEntity2 = AZStd::make_unique<AZ::Entity>(); auto terrainSurfaceGradientListComponent = entity->CreateComponent<Terrain::TerrainSurfaceGradientListComponent>();
ASSERT_TRUE(m_gradientEntity2); m_app.RegisterComponentDescriptor(terrainSurfaceGradientListComponent->CreateDescriptor());
m_gradientEntity2->Init(); const AZ::Entity::DependencySortOutcome sortOutcome = entity->EvaluateDependenciesGetDetails();
} EXPECT_FALSE(sortOutcome.IsSuccess());
}
void AddSurfaceGradientListToEntities() TEST_F(TerrainSurfaceGradientListTest, SurfaceGradientActivateSuccess)
{ {
m_layerSpawnerComponent = m_entity->CreateComponent<UnitTest::MockTerrainLayerSpawnerComponent>(); auto entity = CreateEntity();
m_app.RegisterComponentDescriptor(m_layerSpawnerComponent->CreateDescriptor());
Terrain::TerrainSurfaceGradientListConfig config; AddRequiredComponentsToEntity(entity.get());
Terrain::TerrainSurfaceGradientMapping mapping1; auto terrainSurfaceGradientListComponent = entity->CreateComponent<Terrain::TerrainSurfaceGradientListComponent>();
mapping1.m_gradientEntityId = m_gradientEntity1->GetId(); m_app.RegisterComponentDescriptor(terrainSurfaceGradientListComponent->CreateDescriptor());
mapping1.m_surfaceTag = SurfaceData::SurfaceTag(surfaceTag1);
config.m_gradientSurfaceMappings.emplace_back(mapping1);
Terrain::TerrainSurfaceGradientMapping mapping2; entity->Activate();
mapping2.m_gradientEntityId = m_gradientEntity2->GetId();
mapping2.m_surfaceTag = SurfaceData::SurfaceTag(surfaceTag2);
config.m_gradientSurfaceMappings.emplace_back(mapping2);
Terrain::TerrainSurfaceGradientListComponent* terrainSurfaceGradientListComponent = EXPECT_EQ(entity->GetState(), AZ::Entity::State::Active);
m_entity->CreateComponent<Terrain::TerrainSurfaceGradientListComponent>(config); }
m_app.RegisterComponentDescriptor(terrainSurfaceGradientListComponent->CreateDescriptor());
}
};
TEST_F(TerrainSurfaceGradientListTest, SurfaceGradientReturnsSurfaceWeights) TEST_F(TerrainSurfaceGradientListTest, SurfaceGradientReturnsSurfaceWeights)
{ {
// When there is more than one surface/weight defined and added to the component, they should all // When there is more than one surface/weight defined and added to the component, they should all
// be returned. The component isn't required to return them in descending order. // be returned. The component isn't required to return them in descending order.
AddSurfaceGradientListToEntities(); auto entity = CreateEntity();
AddRequiredComponentsToEntity(entity.get());
m_entity->Activate(); auto gradientEntity1 = CreateEntity();
m_gradientEntity1->Activate(); auto gradientEntity2 = CreateEntity();
m_gradientEntity2->Activate();
const float gradient1Value = 0.3f; const float gradient1Value = 0.3f;
NiceMock<UnitTest::MockGradientRequests> mockGradientRequests1(m_gradientEntity1->GetId()); NiceMock<UnitTest::MockGradientRequests> mockGradientRequests1(gradientEntity1->GetId());
ON_CALL(mockGradientRequests1, GetValue).WillByDefault(Return(gradient1Value)); ON_CALL(mockGradientRequests1, GetValue).WillByDefault(Return(gradient1Value));
const float gradient2Value = 1.0f; const float gradient2Value = 1.0f;
NiceMock<UnitTest::MockGradientRequests> mockGradientRequests2(m_gradientEntity2->GetId()); NiceMock<UnitTest::MockGradientRequests> mockGradientRequests2(gradientEntity2->GetId());
ON_CALL(mockGradientRequests2, GetValue).WillByDefault(Return(gradient2Value)); ON_CALL(mockGradientRequests2, GetValue).WillByDefault(Return(gradient2Value));
AzFramework::SurfaceData::SurfaceTagWeightList weightList; AzFramework::SurfaceData::SurfaceTagWeightList weightList;
Terrain::TerrainAreaSurfaceRequestBus::Event( Terrain::TerrainAreaSurfaceRequestBus::Event(
m_entity->GetId(), &Terrain::TerrainAreaSurfaceRequestBus::Events::GetSurfaceWeights, AZ::Vector3::CreateZero(), weightList); entity->GetId(), &Terrain::TerrainAreaSurfaceRequestBus::Events::GetSurfaceWeights, AZ::Vector3::CreateZero(), weightList);
AZ::Crc32 expectedCrcList[] = { AZ::Crc32(surfaceTag1), AZ::Crc32(surfaceTag2) }; AZ::Crc32 expectedCrcList[] = { AZ::Crc32(surfaceTag1), AZ::Crc32(surfaceTag2) };
const float expectedWeightList[] = { gradient1Value, gradient2Value }; const float expectedWeightList[] = { gradient1Value, gradient2Value };

@ -112,7 +112,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/button_disabled.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -158,7 +158,7 @@
<Class name="AZStd::pair" field="element" type="{FED51EB4-F646-51FF-9646-9852CF90F353}"> <Class name="AZStd::pair" field="element" type="{FED51EB4-F646-51FF-9646-9852CF90F353}">
<Class name="AddressType" field="value1" value="AZStd::vector({21786AF0-2606-5B9A-86EB-0892E2820E6C})::Entities·0/AZ::Entity({75651658-8663-478D-9090-2432DFCAFA44})#17165417810190062216·2/AZStd::vector({13D58FF9-1088-5C69-9A1F-C2A144B57B78})::Components·0/UiImageComponent({BDBEFD23-DBB4-4726-A32D-4FEAC24E51F6})#17217584308910145132·7/AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;({68E92460-5C0C-4031-9620-6F1A08763243})::SpritePath·1/SimpleAssetReferenceBase({E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8})::BaseClass1·1/AZStd::string({03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9})::AssetPath·0/" version="1" type="{90752F2D-CBD3-4EE9-9CDD-447E797C8408}"/> <Class name="AddressType" field="value1" value="AZStd::vector({21786AF0-2606-5B9A-86EB-0892E2820E6C})::Entities·0/AZ::Entity({75651658-8663-478D-9090-2432DFCAFA44})#17165417810190062216·2/AZStd::vector({13D58FF9-1088-5C69-9A1F-C2A144B57B78})::Components·0/UiImageComponent({BDBEFD23-DBB4-4726-A32D-4FEAC24E51F6})#17217584308910145132·7/AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;({68E92460-5C0C-4031-9620-6F1A08763243})::SpritePath·1/SimpleAssetReferenceBase({E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8})::BaseClass1·1/AZStd::string({03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9})::AssetPath·0/" version="1" type="{90752F2D-CBD3-4EE9-9CDD-447E797C8408}"/>
<Class name="any" field="value2" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}"> <Class name="any" field="value2" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="ui/textures/prefab/button_normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="m_data" value="ui/textures/prefab/button_normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="AZStd::pair" field="element" type="{FED51EB4-F646-51FF-9646-9852CF90F353}"> <Class name="AZStd::pair" field="element" type="{FED51EB4-F646-51FF-9646-9852CF90F353}">

@ -30,7 +30,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_box_hover.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_box_hover.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -55,7 +55,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_box_hover.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_box_hover.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -74,7 +74,7 @@
</Class> </Class>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="Sprite" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_box_disabled.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_box_disabled.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -234,7 +234,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_box_normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_box_normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -311,7 +311,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_check.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/checkbox_check.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -231,7 +231,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -383,7 +383,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -1218,7 +1218,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="textures/basic/checkbox_check.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -75,7 +75,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/textinput_normal.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/textinput_normal.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
@ -233,7 +233,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/textinput_hover.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/textinput_hover.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -79,7 +79,7 @@
<Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/> <Class name="int" field="SpriteType" value="0" type="{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}"/>
<Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}"> <Class name="AzFramework::SimpleAssetReference&lt;LmbrCentral::TextureAsset&gt;" field="SpritePath" version="1" type="{68E92460-5C0C-4031-9620-6F1A08763243}">
<Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}"> <Class name="SimpleAssetReferenceBase" field="BaseClass1" version="1" type="{E16CA6C5-5C78-4AD9-8E9B-F8C1FB4D1DB8}">
<Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/tooltip_sliced.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/> <Class name="AZStd::string" field="AssetPath" value="ui/textures/prefab/tooltip_sliced.tif.streamingimage" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class> </Class>
</Class> </Class>
<Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/> <Class name="unsigned int" field="Index" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>

@ -105,7 +105,7 @@ def download_o3de_object(object_name: str, default_folder_name: str, dest_path:
origin_uri = downloadable_object_data['originuri'] origin_uri = downloadable_object_data['originuri']
parsed_uri = urllib.parse.urlparse(origin_uri) parsed_uri = urllib.parse.urlparse(origin_uri)
download_zip_result = utils.download_zip_file(parsed_uri, download_zip_path, download_progress_callback) download_zip_result = utils.download_zip_file(parsed_uri, download_zip_path, force_overwrite, download_progress_callback)
if download_zip_result != 0: if download_zip_result != 0:
return download_zip_result return download_zip_result

@ -140,9 +140,9 @@ def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite: bool
download_file_size = s.headers['content-length'] download_file_size = s.headers['content-length']
except KeyError: except KeyError:
pass pass
def download_progress(blocks): def download_progress(downloaded_bytes):
if download_progress_callback and download_file_size: if download_progress_callback:
return download_progress_callback(int(blocks/int(download_file_size) * 100)) return download_progress_callback(int(downloaded_bytes), int(download_file_size))
return False return False
with download_path.open('wb') as f: with download_path.open('wb') as f:
download_cancelled = copyfileobj(s, f, download_progress) download_cancelled = copyfileobj(s, f, download_progress)
@ -157,12 +157,12 @@ def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite: bool
return 0 return 0
def download_zip_file(parsed_uri, download_zip_path: pathlib.Path, download_progress_callback = None) -> int: def download_zip_file(parsed_uri, download_zip_path: pathlib.Path, force_overwrite: bool, download_progress_callback = None) -> int:
""" """
:param parsed_uri: uniform resource identifier to zip file to download :param parsed_uri: uniform resource identifier to zip file to download
:param download_zip_path: path to output zip file :param download_zip_path: path to output zip file
""" """
download_file_result = download_file(parsed_uri, download_zip_path, True, download_progress_callback) download_file_result = download_file(parsed_uri, download_zip_path, force_overwrite, download_progress_callback)
if download_file_result != 0: if download_file_result != 0:
return download_file_result return download_file_result

Loading…
Cancel
Save