From 53ba07d898252e057678b2294ebd7eef80e719c4 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sun, 21 Nov 2021 00:19:46 -0800 Subject: [PATCH 01/42] bugfix: prevent Anchor buttons from overlapping when shrinking layout (#5552) Signed-off-by: Michael Pollind --- Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp b/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp index ca3701743e..bc6d73984a 100644 --- a/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp +++ b/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp @@ -18,7 +18,7 @@ #define UICANVASEDITOR_ANCHOR_ICON_PATH_SELECTED(presetIndex) (QString(":/Icons/AnchorIcon%1Selected.tif").arg(presetIndex, 2, 10, QChar('0'))) #define UICANVASEDITOR_ANCHOR_WIDGET_FIXED_SIZE (106) -#define UICANVASEDITOR_ANCHOR_BUTTON_AND_ICON_FIXED_SIZE (20) +#define UICANVASEDITOR_ANCHOR_BUTTON_AND_ICON_FIXED_SIZE (15) AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, PresetChanger presetChanger, @@ -27,8 +27,6 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, , m_presetIndex(defaultPresetIndex) , m_buttons(AnchorPresets::PresetIndexCount, nullptr) { - setFixedSize(UICANVASEDITOR_ANCHOR_WIDGET_FIXED_SIZE, UICANVASEDITOR_ANCHOR_WIDGET_FIXED_SIZE); - // The layout. QGridLayout* grid = new QGridLayout(this); grid->setContentsMargins(0, 0, 0, 0); @@ -38,6 +36,7 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, { for (int presetIndex = 0; presetIndex < AnchorPresets::PresetIndexCount; ++presetIndex) { + QLayout* boxLayout = new QVBoxLayout(); PresetButton* button = new PresetButton(UICANVASEDITOR_ANCHOR_ICON_PATH_DEFAULT(presetIndex), UICANVASEDITOR_ANCHOR_ICON_PATH_HOVER(presetIndex), UICANVASEDITOR_ANCHOR_ICON_PATH_SELECTED(presetIndex), @@ -50,8 +49,9 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, presetChanger(presetIndex); }, this); - - grid->addWidget(button, (presetIndex / 4), (presetIndex % 4)); + boxLayout->addWidget(button); + boxLayout->setContentsMargins(4,4,4,4); + grid->addItem(boxLayout, (presetIndex / 4), (presetIndex % 4)); m_buttons[ presetIndex ] = button; } From ce38e805bfe2849295460d6058d09944379ea241 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sun, 21 Nov 2021 08:18:25 -0800 Subject: [PATCH 02/42] chore: change minimum width and change fixed size Signed-off-by: Michael Pollind --- Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp | 4 ++-- Gems/LyShine/Code/Editor/PropertiesWidget.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp b/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp index bc6d73984a..84ff2e19a7 100644 --- a/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp +++ b/Gems/LyShine/Code/Editor/AnchorPresetsWidget.cpp @@ -18,7 +18,7 @@ #define UICANVASEDITOR_ANCHOR_ICON_PATH_SELECTED(presetIndex) (QString(":/Icons/AnchorIcon%1Selected.tif").arg(presetIndex, 2, 10, QChar('0'))) #define UICANVASEDITOR_ANCHOR_WIDGET_FIXED_SIZE (106) -#define UICANVASEDITOR_ANCHOR_BUTTON_AND_ICON_FIXED_SIZE (15) +#define UICANVASEDITOR_ANCHOR_BUTTON_AND_ICON_FIXED_SIZE (20) AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, PresetChanger presetChanger, @@ -50,7 +50,7 @@ AnchorPresetsWidget::AnchorPresetsWidget(int defaultPresetIndex, }, this); boxLayout->addWidget(button); - boxLayout->setContentsMargins(4,4,4,4); + boxLayout->setContentsMargins(2, 2, 2, 2); grid->addItem(boxLayout, (presetIndex / 4), (presetIndex % 4)); m_buttons[ presetIndex ] = button; diff --git a/Gems/LyShine/Code/Editor/PropertiesWidget.cpp b/Gems/LyShine/Code/Editor/PropertiesWidget.cpp index c128fe15b9..e350a367c6 100644 --- a/Gems/LyShine/Code/Editor/PropertiesWidget.cpp +++ b/Gems/LyShine/Code/Editor/PropertiesWidget.cpp @@ -49,7 +49,7 @@ PropertiesWidget::PropertiesWidget(EditorWindow* editorWindow, m_refreshTimer.setSingleShot(true); } - setMinimumWidth(250); + setMinimumWidth(330); ToolsApplicationEvents::Bus::Handler::BusConnect(); } From 07555493a9f30b470e5dfd65042388d1edb36eda Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Wed, 24 Nov 2021 16:17:43 +0000 Subject: [PATCH 03/42] LYN-7693 Rename and move vegetation reference shape. Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Code/Source/Editor/MainWindow.cpp | 8 +- .../Editor/Nodes/Areas/BaseAreaNode.cpp | 4 +- .../Code/Mocks/LmbrCentral/Shape/MockShapes.h | 68 ++++++ Gems/LmbrCentral/Code/Source/LmbrCentral.cpp | 2 + .../Code/Source/LmbrCentralEditor.cpp | 2 + .../Shape}/EditorReferenceShapeComponent.cpp | 5 +- .../Shape}/EditorReferenceShapeComponent.h | 16 +- .../Source/Shape}/ReferenceShapeComponent.cpp | 4 +- .../Source/Shape}/ReferenceShapeComponent.h | 5 +- .../Code/Tests/ReferenceShapeTests.cpp | 205 ++++++++++++++++++ .../Shape/ReferenceShapeComponentBus.h} | 5 +- .../Code/lmbrcentral_editor_files.cmake | 2 + Gems/LmbrCentral/Code/lmbrcentral_files.cmake | 3 + .../Code/lmbrcentral_tests_files.cmake | 1 + .../Editor/EditorVegetationComponentTypeIds.h | 3 - .../Code/Source/VegetationEditorModule.cpp | 2 - .../Code/Source/VegetationModule.cpp | 2 - Gems/Vegetation/Code/Tests/VegetationTest.cpp | 92 -------- .../Code/vegetation_editor_files.cmake | 2 - Gems/Vegetation/Code/vegetation_files.cmake | 3 - 20 files changed, 309 insertions(+), 125 deletions(-) rename Gems/{Vegetation/Code/Source/Editor => LmbrCentral/Code/Source/Shape}/EditorReferenceShapeComponent.cpp (70%) rename Gems/{Vegetation/Code/Source/Editor => LmbrCentral/Code/Source/Shape}/EditorReferenceShapeComponent.h (57%) rename Gems/{Vegetation/Code/Source/Components => LmbrCentral/Code/Source/Shape}/ReferenceShapeComponent.cpp (99%) rename Gems/{Vegetation/Code/Source/Components => LmbrCentral/Code/Source/Shape}/ReferenceShapeComponent.h (98%) create mode 100644 Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp rename Gems/{Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h => LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h} (81%) diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index ce9eab5f7e..9c72f75a4c 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -104,6 +104,8 @@ #include #include +#include + namespace LandscapeCanvasEditor { static const int NODE_OFFSET_X_PIXELS = 350; @@ -1303,7 +1305,7 @@ namespace LandscapeCanvasEditor } // Special case for the Vegetation Area Placement Bounds, the slot actually represents a separate - // Vegetation Reference Shape or actual Shape component on the same Entity + // Reference Shape or actual Shape component on the same Entity AZ::Component* component = nullptr; auto targetBaseNode = static_cast(targetNode.get()); if (targetBaseNode->GetBaseNodeType() == LandscapeCanvas::BaseNode::BaseNodeType::VegetationArea && targetSlot->GetName() == LandscapeCanvas::PLACEMENT_BOUNDS_SLOT_ID) @@ -1379,7 +1381,7 @@ namespace LandscapeCanvasEditor AzToolsFramework::EditorDisabledCompositionRequestBus::Event(targetEntityId, &AzToolsFramework::EditorDisabledCompositionRequests::GetDisabledComponents, disabledComponents); for (auto disabledComponent : disabledComponents) { - if (disabledComponent->RTTI_GetType() == Vegetation::EditorReferenceShapeComponentTypeId) + if (disabledComponent->RTTI_GetType() == LmbrCentral::EditorReferenceShapeComponentTypeId) { component = disabledComponent; @@ -1401,7 +1403,7 @@ namespace LandscapeCanvasEditor // If 'component' is still null then that means there is no Reference Shape component on our Entity, so we need to add one if (!component) { - AZ::ComponentId componentId = AddComponentTypeIdToEntity(targetEntityId, Vegetation::EditorReferenceShapeComponentTypeId); + AZ::ComponentId componentId = AddComponentTypeIdToEntity(targetEntityId, LmbrCentral::EditorReferenceShapeComponentTypeId); component = targetEntity->FindComponent(componentId); } diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp index 312dd0873e..b24b681dde 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/Nodes/Areas/BaseAreaNode.cpp @@ -26,6 +26,8 @@ #include "BaseAreaNode.h" #include +#include + namespace LandscapeCanvas { void BaseAreaNode::Reflect(AZ::ReflectContext* context) @@ -61,7 +63,7 @@ namespace LandscapeCanvas return nullptr; } - AZ::Component* component = entity->FindComponent(Vegetation::EditorReferenceShapeComponentTypeId); + AZ::Component* component = entity->FindComponent(LmbrCentral::EditorReferenceShapeComponentTypeId); if (component) { return component; diff --git a/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h b/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h index 20be74dd90..41df0d318d 100644 --- a/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h +++ b/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h @@ -56,5 +56,73 @@ namespace UnitTest MOCK_METHOD1(GenerateRandomPointInside, AZ::Vector3(AZ::RandomDistributionType randomDistribution)); MOCK_METHOD3(IntersectRay, bool(const AZ::Vector3& src, const AZ::Vector3& dir, float& distance)); }; + + class MockShape : public LmbrCentral::ShapeComponentRequestsBus::Handler + { + public: + AZ::Entity m_entity; + mutable int m_count = 0; + + MockShape() + { + LmbrCentral::ShapeComponentRequestsBus::Handler::BusConnect(m_entity.GetId()); + } + + ~MockShape() + { + LmbrCentral::ShapeComponentRequestsBus::Handler::BusDisconnect(); + } + + AZ::Crc32 GetShapeType() override + { + ++m_count; + return AZ_CRC("TestShape", 0x856ca50c); + } + + AZ::Aabb m_aabb = AZ::Aabb::CreateNull(); + AZ::Aabb GetEncompassingAabb() override + { + ++m_count; + return m_aabb; + } + + AZ::Transform m_localTransform = AZ::Transform::CreateIdentity(); + AZ::Aabb m_localBounds = AZ::Aabb::CreateNull(); + void GetTransformAndLocalBounds(AZ::Transform& transform, AZ::Aabb& bounds) override + { + ++m_count; + transform = m_localTransform; + bounds = m_localBounds; + } + + bool m_pointInside = true; + bool IsPointInside([[maybe_unused]] const AZ::Vector3& point) override + { + ++m_count; + return m_pointInside; + } + + float m_distanceSquaredFromPoint = 0.0f; + float DistanceSquaredFromPoint([[maybe_unused]] const AZ::Vector3& point) override + { + ++m_count; + return m_distanceSquaredFromPoint; + } + + AZ::Vector3 m_randomPointInside = AZ::Vector3::CreateZero(); + AZ::Vector3 GenerateRandomPointInside([[maybe_unused]] AZ::RandomDistributionType randomDistribution) override + { + ++m_count; + return m_randomPointInside; + } + + bool m_intersectRay = false; + bool IntersectRay( + [[maybe_unused]] const AZ::Vector3& src, [[maybe_unused]] const AZ::Vector3& dir, [[maybe_unused]] float& distance) override + { + ++m_count; + return m_intersectRay; + } + }; } diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp index ad90c16f43..84ef11b35d 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp @@ -77,6 +77,7 @@ #include "Shape/CompoundShapeComponent.h" #include "Shape/SplineComponent.h" #include "Shape/PolygonPrismShapeComponent.h" +#include "Shape/ReferenceShapeComponent.h" namespace LmbrCentral { @@ -203,6 +204,7 @@ namespace LmbrCentral CapsuleShapeComponent::CreateDescriptor(), TubeShapeComponent::CreateDescriptor(), CompoundShapeComponent::CreateDescriptor(), + ReferenceShapeComponent::CreateDescriptor(), SplineComponent::CreateDescriptor(), PolygonPrismShapeComponent::CreateDescriptor(), NavigationSystemComponent::CreateDescriptor(), diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp index 61b8c8f73d..69e7f57de8 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp @@ -34,6 +34,7 @@ #include "Shape/EditorSplineComponent.h" #include "Shape/EditorTubeShapeComponent.h" #include "Shape/EditorPolygonPrismShapeComponent.h" +#include "Shape/EditorReferenceShapeComponent.h" #include "Editor/EditorCommentComponent.h" #include "Shape/EditorCompoundShapeComponent.h" @@ -73,6 +74,7 @@ namespace LmbrCentral EditorCylinderShapeComponent::CreateDescriptor(), EditorCapsuleShapeComponent::CreateDescriptor(), EditorCompoundShapeComponent::CreateDescriptor(), + EditorReferenceShapeComponent::CreateDescriptor(), EditorSplineComponent::CreateDescriptor(), EditorPolygonPrismShapeComponent::CreateDescriptor(), EditorCommentComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp similarity index 70% rename from Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp rename to Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp index 2fe8ae1e28..aca4fbc3b0 100644 --- a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.cpp @@ -10,11 +10,12 @@ #include #include #include +#include -namespace Vegetation +namespace LmbrCentral { void EditorReferenceShapeComponent::Reflect(AZ::ReflectContext* context) { - ReflectSubClass(context, 1, &EditorVegetationComponentBaseVersionConverter); + ReflectSubClass(context, 1, &EditorWrappedComponentBaseVersionConverter); } } diff --git a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h similarity index 57% rename from Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h rename to Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h index d0f9bf1ea0..9198dac49d 100644 --- a/Gems/Vegetation/Code/Source/Editor/EditorReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h @@ -8,24 +8,24 @@ #pragma once -#include -#include +#include +#include -namespace Vegetation +namespace LmbrCentral { class EditorReferenceShapeComponent - : public EditorVegetationComponentBase + : public EditorWrappedComponentBase { public: - using BaseClassType = EditorVegetationComponentBase; + using BaseClassType = EditorWrappedComponentBase; AZ_EDITOR_COMPONENT(EditorReferenceShapeComponent, EditorReferenceShapeComponentTypeId, BaseClassType); static void Reflect(AZ::ReflectContext* context); - static constexpr const char* const s_categoryName = "Vegetation"; - static constexpr const char* const s_componentName = "Vegetation Reference Shape"; + static constexpr const char* const s_categoryName = "Shape"; + static constexpr const char* const s_componentName = "Reference Shape"; static constexpr const char* const s_componentDescription = "Enables the entity to reference and reuse shape entities"; static constexpr const char* const s_icon = "Editor/Icons/Components/Vegetation.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/Vegetation.svg"; + static constexpr const char* const s_viewportIcon = "Icons/Components/Viewport/Component_Placeholder.svg"; static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/"; }; } diff --git a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp similarity index 99% rename from Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp rename to Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp index 620e43457d..5f33164147 100644 --- a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp @@ -11,7 +11,7 @@ #include #include -namespace Vegetation +namespace LmbrCentral { void ReferenceShapeConfig::Reflect(AZ::ReflectContext* context) { @@ -27,7 +27,7 @@ namespace Vegetation if (edit) { edit->Class( - "Vegetation Reference Shape", "") + "Reference Shape", "") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) diff --git a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h similarity index 98% rename from Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h rename to Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h index dc61768bee..b4e11b13cb 100644 --- a/Gems/Vegetation/Code/Source/Components/ReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.h @@ -12,16 +12,13 @@ #include #include #include -#include +#include namespace LmbrCentral { template class EditorWrappedComponentBase; -} -namespace Vegetation -{ class ReferenceShapeConfig : public AZ::ComponentConfig { diff --git a/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp b/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp new file mode 100644 index 0000000000..040badf7e1 --- /dev/null +++ b/Gems/LmbrCentral/Code/Tests/ReferenceShapeTests.cpp @@ -0,0 +1,205 @@ +/* + * 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 + * + */ + +#include +#include +#include +#include +#include + +#include +#include + +namespace UnitTest +{ + class ReferenceComponentTests + : public AllocatorsFixture + { + protected: + AZ::ComponentApplication m_app; + + void SetUp() override + { + AZ::ComponentApplication::Descriptor appDesc; + appDesc.m_memoryBlocksByteSize = 20 * 1024 * 1024; + appDesc.m_recordingMode = AZ::Debug::AllocationRecords::RECORD_NO_RECORDS; + appDesc.m_stackRecordLevels = 20; + + m_app.Create(appDesc); + } + + void TearDown() override + { + m_app.Destroy(); + } + + template + AZStd::unique_ptr CreateEntity(const Configuration& config, Component** ppComponent) + { + m_app.RegisterComponentDescriptor(Component::CreateDescriptor()); + + auto entity = AZStd::make_unique(); + + if (ppComponent) + { + *ppComponent = entity->CreateComponent(config); + } + else + { + entity->CreateComponent(config); + } + + entity->Init(); + EXPECT_EQ(AZ::Entity::State::Init, entity->GetState()); + + entity->Activate(); + EXPECT_EQ(AZ::Entity::State::Active, entity->GetState()); + + return entity; + } + + template + bool IsComponentCompatible() + { + AZ::ComponentDescriptor::DependencyArrayType providedServicesA; + ComponentA::GetProvidedServices(providedServicesA); + + AZ::ComponentDescriptor::DependencyArrayType incompatibleServicesB; + ComponentB::GetIncompatibleServices(incompatibleServicesB); + + for (auto providedServiceA : providedServicesA) + { + for (auto incompatibleServiceB : incompatibleServicesB) + { + if (providedServiceA == incompatibleServiceB) + { + return false; + } + } + } + return true; + } + + template + bool AreComponentsCompatible() + { + return IsComponentCompatible() && IsComponentCompatible(); + } + }; + + TEST_F(ReferenceComponentTests, VerifyCompatibility) + { + EXPECT_FALSE((AreComponentsCompatible())); + } + + TEST_F(ReferenceComponentTests, ReferenceShapeComponent_WithValidReference) + { + UnitTest::MockShape testShape; + + LmbrCentral::ReferenceShapeConfig config; + config.m_shapeEntityId = testShape.m_entity.GetId(); + + LmbrCentral::ReferenceShapeComponent* component; + auto entity = CreateEntity(config, &component); + + AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; + AZ::Vector3 randPos = AZ::Vector3::CreateOne(); + LmbrCentral::ShapeComponentRequestsBus::EventResult( + randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); + EXPECT_EQ(AZ::Vector3::CreateZero(), randPos); + + testShape.m_aabb = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); + AZ::Aabb resultAABB; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); + EXPECT_EQ(testShape.m_aabb, resultAABB); + + AZ::Crc32 resultCRC = {}; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); + EXPECT_EQ(AZ_CRC("TestShape", 0x856ca50c), resultCRC); + + testShape.m_localBounds = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); + testShape.m_localTransform = AZ::Transform::CreateTranslation(testShape.m_localBounds.GetCenter()); + AZ::Transform resultTransform = AZ::Transform::CreateIdentity(); + AZ::Aabb resultBounds = AZ::Aabb::CreateNull(); + LmbrCentral::ShapeComponentRequestsBus::Event( + entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); + EXPECT_EQ(testShape.m_localTransform, resultTransform); + EXPECT_EQ(testShape.m_localBounds, resultBounds); + + testShape.m_pointInside = true; + bool resultPointInside = false; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); + EXPECT_EQ(testShape.m_pointInside, resultPointInside); + + testShape.m_distanceSquaredFromPoint = 456.0f; + float resultdistanceSquaredFromPoint = 0; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, + AZ::Vector3::CreateZero()); + EXPECT_EQ(testShape.m_distanceSquaredFromPoint, resultdistanceSquaredFromPoint); + + testShape.m_intersectRay = false; + bool resultIntersectRay = false; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), + AZ::Vector3::CreateZero(), 0.0f); + EXPECT_TRUE(testShape.m_intersectRay == resultIntersectRay); + } + + TEST_F(ReferenceComponentTests, ReferenceShapeComponent_WithInvalidReference) + { + LmbrCentral::ReferenceShapeConfig config; + config.m_shapeEntityId = AZ::EntityId(); + + LmbrCentral::ReferenceShapeComponent* component; + auto entity = CreateEntity(config, &component); + + AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; + AZ::Vector3 randPos = AZ::Vector3::CreateOne(); + LmbrCentral::ShapeComponentRequestsBus::EventResult( + randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); + EXPECT_EQ(randPos, AZ::Vector3::CreateZero()); + + AZ::Aabb resultAABB; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); + EXPECT_EQ(resultAABB, AZ::Aabb::CreateNull()); + + AZ::Crc32 resultCRC; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); + EXPECT_EQ(resultCRC, AZ::Crc32(AZ::u32(0))); + + AZ::Transform resultTransform; + AZ::Aabb resultBounds; + LmbrCentral::ShapeComponentRequestsBus::Event( + entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); + EXPECT_EQ(resultTransform, AZ::Transform::CreateIdentity()); + EXPECT_EQ(resultBounds, AZ::Aabb::CreateNull()); + + bool resultPointInside = true; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); + EXPECT_EQ(resultPointInside, false); + + float resultdistanceSquaredFromPoint = 0; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, + AZ::Vector3::CreateZero()); + EXPECT_EQ(resultdistanceSquaredFromPoint, FLT_MAX); + + bool resultIntersectRay = true; + LmbrCentral::ShapeComponentRequestsBus::EventResult( + resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), + AZ::Vector3::CreateZero(), 0.0f); + EXPECT_EQ(resultIntersectRay, false); + } +} // namespace UnitTest diff --git a/Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h b/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h similarity index 81% rename from Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h rename to Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h index d6f517117b..2aec1a7614 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h +++ b/Gems/LmbrCentral/Code/include/LmbrCentral/Shape/ReferenceShapeComponentBus.h @@ -11,8 +11,11 @@ #include #include -namespace Vegetation +namespace LmbrCentral { + // Type ID for Reference EditorReferenceShapeComponent + static const char* EditorReferenceShapeComponentTypeId = "{21BC79CA-C2F4-428F-AF2E-B76E233D4254}"; + class ReferenceShapeRequests : public AZ::ComponentBus { diff --git a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake index aea2f493c7..24f9ff6dcd 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake @@ -60,6 +60,8 @@ set(FILES Source/Shape/EditorCompoundShapeComponent.cpp Source/Shape/EditorQuadShapeComponent.h Source/Shape/EditorQuadShapeComponent.cpp + Source/Shape/EditorReferenceShapeComponent.h + Source/Shape/EditorReferenceShapeComponent.cpp Source/Shape/EditorSplineComponent.h Source/Shape/EditorSplineComponent.cpp Source/Shape/EditorSplineComponentMode.h diff --git a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake index 20a366b5f7..27f0fcbafe 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake @@ -57,6 +57,7 @@ set(FILES include/LmbrCentral/Shape/SplineComponentBus.h include/LmbrCentral/Shape/PolygonPrismShapeComponentBus.h include/LmbrCentral/Shape/TubeShapeComponentBus.h + include/LmbrCentral/Shape/ReferenceShapeComponentBus.h include/LmbrCentral/Shape/SplineAttribute.h include/LmbrCentral/Shape/SplineAttribute.inl include/LmbrCentral/Terrain/TerrainSystemRequestBus.h @@ -140,6 +141,8 @@ set(FILES Source/Shape/PolygonPrismShapeComponent.cpp Source/Shape/TubeShapeComponent.h Source/Shape/TubeShapeComponent.cpp + Source/Shape/ReferenceShapeComponent.h + Source/Shape/ReferenceShapeComponent.cpp Source/Shape/ShapeComponentConverters.h Source/Shape/ShapeComponentConverters.cpp Source/Shape/ShapeComponentConverters.inl diff --git a/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake index c0f1ffd9ec..97e5d87829 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_tests_files.cmake @@ -24,5 +24,6 @@ set(FILES Tests/SpawnerComponentTest.cpp Tests/SplineComponentTests.cpp Tests/DiskShapeTest.cpp + Tests/ReferenceShapeTests.cpp Source/LmbrCentral.cpp ) diff --git a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h index 0c9db4811c..b79bae92a0 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h +++ b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentTypeIds.h @@ -35,7 +35,4 @@ namespace Vegetation // Vegetation Area Selectors static const char* EditorDescriptorWeightSelectorComponentTypeId = "{0FB90550-149B-4E05-B22C-2753F6526E97}"; - - // Vegetation Reference Shape - static const char* EditorReferenceShapeComponentTypeId = "{21BC79CA-C2F4-428F-AF2E-B76E233D4254}"; } diff --git a/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp b/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp index 3210df644f..8d4e1d0558 100644 --- a/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp +++ b/Gems/Vegetation/Code/Source/VegetationEditorModule.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -50,7 +49,6 @@ namespace Vegetation EditorLevelSettingsComponent::CreateDescriptor(), EditorMeshBlockerComponent::CreateDescriptor(), EditorPositionModifierComponent::CreateDescriptor(), - EditorReferenceShapeComponent::CreateDescriptor(), EditorRotationModifierComponent::CreateDescriptor(), EditorScaleModifierComponent::CreateDescriptor(), EditorShapeIntersectionFilterComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Source/VegetationModule.cpp b/Gems/Vegetation/Code/Source/VegetationModule.cpp index b103575ed1..747617d033 100644 --- a/Gems/Vegetation/Code/Source/VegetationModule.cpp +++ b/Gems/Vegetation/Code/Source/VegetationModule.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -52,7 +51,6 @@ namespace Vegetation LevelSettingsComponent::CreateDescriptor(), MeshBlockerComponent::CreateDescriptor(), PositionModifierComponent::CreateDescriptor(), - ReferenceShapeComponent::CreateDescriptor(), RotationModifierComponent::CreateDescriptor(), ScaleModifierComponent::CreateDescriptor(), ShapeIntersectionFilterComponent::CreateDescriptor(), diff --git a/Gems/Vegetation/Code/Tests/VegetationTest.cpp b/Gems/Vegetation/Code/Tests/VegetationTest.cpp index 774a9fcd00..033e988c9b 100644 --- a/Gems/Vegetation/Code/Tests/VegetationTest.cpp +++ b/Gems/Vegetation/Code/Tests/VegetationTest.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -190,8 +189,6 @@ namespace UnitTest EXPECT_FALSE((AreComponentsCompatible())); EXPECT_FALSE((AreComponentsCompatible())); - EXPECT_FALSE((AreComponentsCompatible())); - EXPECT_FALSE((AreComponentsCompatible())); EXPECT_FALSE((AreComponentsCompatible())); @@ -231,7 +228,6 @@ namespace UnitTest CreateWith(); CreateWith(); CreateWith(); - CreateWith(); CreateWith(); CreateWith(); CreateWith(); @@ -287,94 +283,6 @@ namespace UnitTest EXPECT_EQ(defaultProcessTime, instConfig->m_maxInstanceProcessTimeMicroseconds); } - TEST_F(VegetationComponentTestsBasics, ReferenceShapeComponent_WithValidReference) - { - UnitTest::MockShape testShape; - - Vegetation::ReferenceShapeConfig config; - config.m_shapeEntityId = testShape.m_entity.GetId(); - - Vegetation::ReferenceShapeComponent* component; - auto entity = CreateEntity(config, &component); - - AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; - AZ::Vector3 randPos = AZ::Vector3::CreateOne(); - LmbrCentral::ShapeComponentRequestsBus::EventResult(randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); - EXPECT_EQ(AZ::Vector3::CreateZero(), randPos); - - testShape.m_aabb = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); - AZ::Aabb resultAABB; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); - EXPECT_EQ(testShape.m_aabb, resultAABB); - - AZ::Crc32 resultCRC = {}; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); - EXPECT_EQ(AZ_CRC("TestShape", 0x856ca50c), resultCRC); - - testShape.m_localBounds = AZ::Aabb::CreateFromPoint(AZ::Vector3(1.0f, 21.0f, 31.0f)); - testShape.m_localTransform = AZ::Transform::CreateTranslation(testShape.m_localBounds.GetCenter()); - AZ::Transform resultTransform = AZ::Transform::CreateIdentity(); - AZ::Aabb resultBounds = AZ::Aabb::CreateNull(); - LmbrCentral::ShapeComponentRequestsBus::Event(entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); - EXPECT_EQ(testShape.m_localTransform, resultTransform); - EXPECT_EQ(testShape.m_localBounds, resultBounds); - - testShape.m_pointInside = true; - bool resultPointInside = false; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); - EXPECT_EQ(testShape.m_pointInside, resultPointInside); - - testShape.m_distanceSquaredFromPoint = 456.0f; - float resultdistanceSquaredFromPoint = 0; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, AZ::Vector3::CreateZero()); - EXPECT_EQ(testShape.m_distanceSquaredFromPoint, resultdistanceSquaredFromPoint); - - testShape.m_intersectRay = false; - bool resultIntersectRay = false; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), AZ::Vector3::CreateZero(), 0.0f); - EXPECT_TRUE(testShape.m_intersectRay == resultIntersectRay); - } - - TEST_F(VegetationComponentTestsBasics, ReferenceShapeComponent_WithInvalidReference) - { - Vegetation::ReferenceShapeConfig config; - config.m_shapeEntityId = AZ::EntityId(); - - Vegetation::ReferenceShapeComponent* component; - auto entity = CreateEntity(config, &component); - - AZ::RandomDistributionType randomDistribution = AZ::RandomDistributionType::Normal; - AZ::Vector3 randPos = AZ::Vector3::CreateOne(); - LmbrCentral::ShapeComponentRequestsBus::EventResult(randPos, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GenerateRandomPointInside, randomDistribution); - EXPECT_EQ(randPos, AZ::Vector3::CreateZero()); - - AZ::Aabb resultAABB; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultAABB, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetEncompassingAabb); - EXPECT_EQ(resultAABB, AZ::Aabb::CreateNull()); - - AZ::Crc32 resultCRC; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultCRC, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetShapeType); - EXPECT_EQ(resultCRC, AZ::Crc32(AZ::u32(0))); - - AZ::Transform resultTransform; - AZ::Aabb resultBounds; - LmbrCentral::ShapeComponentRequestsBus::Event(entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::GetTransformAndLocalBounds, resultTransform, resultBounds); - EXPECT_EQ(resultTransform, AZ::Transform::CreateIdentity()); - EXPECT_EQ(resultBounds, AZ::Aabb::CreateNull()); - - bool resultPointInside = true; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultPointInside, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IsPointInside, AZ::Vector3::CreateZero()); - EXPECT_EQ(resultPointInside, false); - - float resultdistanceSquaredFromPoint = 0; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultdistanceSquaredFromPoint, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::DistanceSquaredFromPoint, AZ::Vector3::CreateZero()); - EXPECT_EQ(resultdistanceSquaredFromPoint, FLT_MAX); - - bool resultIntersectRay = true; - LmbrCentral::ShapeComponentRequestsBus::EventResult(resultIntersectRay, entity->GetId(), &LmbrCentral::ShapeComponentRequestsBus::Events::IntersectRay, AZ::Vector3::CreateZero(), AZ::Vector3::CreateZero(), 0.0f); - EXPECT_EQ(resultIntersectRay, false); - } - TEST_F(VegetationComponentTestsBasics, Components_HaveMinMaxRanges) { ValidateHasMinMaxRanges(); diff --git a/Gems/Vegetation/Code/vegetation_editor_files.cmake b/Gems/Vegetation/Code/vegetation_editor_files.cmake index aa6b399db9..9e4ea2ca78 100644 --- a/Gems/Vegetation/Code/vegetation_editor_files.cmake +++ b/Gems/Vegetation/Code/vegetation_editor_files.cmake @@ -36,8 +36,6 @@ set(FILES Source/Editor/EditorMeshBlockerComponent.h Source/Editor/EditorPositionModifierComponent.cpp Source/Editor/EditorPositionModifierComponent.h - Source/Editor/EditorReferenceShapeComponent.cpp - Source/Editor/EditorReferenceShapeComponent.h Source/Editor/EditorRotationModifierComponent.cpp Source/Editor/EditorRotationModifierComponent.h Source/Editor/EditorScaleModifierComponent.cpp diff --git a/Gems/Vegetation/Code/vegetation_files.cmake b/Gems/Vegetation/Code/vegetation_files.cmake index 64048b5d91..b4d4e3a356 100644 --- a/Gems/Vegetation/Code/vegetation_files.cmake +++ b/Gems/Vegetation/Code/vegetation_files.cmake @@ -46,7 +46,6 @@ set(FILES Include/Vegetation/Ebuses/AreaBlenderRequestBus.h Include/Vegetation/Ebuses/BlockerRequestBus.h Include/Vegetation/Ebuses/DescriptorListCombinerRequestBus.h - Include/Vegetation/Ebuses/ReferenceShapeRequestBus.h Include/Vegetation/Ebuses/MeshBlockerRequestBus.h Include/Vegetation/Ebuses/SpawnerRequestBus.h Include/Vegetation/Ebuses/DescriptorListRequestBus.h @@ -71,8 +70,6 @@ set(FILES Source/Components/MeshBlockerComponent.h Source/Components/PositionModifierComponent.cpp Source/Components/PositionModifierComponent.h - Source/Components/ReferenceShapeComponent.cpp - Source/Components/ReferenceShapeComponent.h Source/Components/RotationModifierComponent.cpp Source/Components/RotationModifierComponent.h Source/Components/ScaleModifierComponent.cpp From 82d8015af5c4d515f55f6a8aff07b39b9523e2f5 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Wed, 24 Nov 2021 17:12:19 +0000 Subject: [PATCH 04/42] review change Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Code/Source/Shape/EditorReferenceShapeComponent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h index 9198dac49d..dce7874533 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h @@ -24,7 +24,7 @@ namespace LmbrCentral static constexpr const char* const s_categoryName = "Shape"; static constexpr const char* const s_componentName = "Reference Shape"; static constexpr const char* const s_componentDescription = "Enables the entity to reference and reuse shape entities"; - static constexpr const char* const s_icon = "Editor/Icons/Components/Vegetation.svg"; + static constexpr const char* const s_icon = "Icons/Components/Viewport/Component_Placeholder.svg"; static constexpr const char* const s_viewportIcon = "Icons/Components/Viewport/Component_Placeholder.svg"; static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/"; }; From 0a84f171593c314083dd4af7a84ee7916a5f24e1 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Thu, 25 Nov 2021 08:01:17 +0000 Subject: [PATCH 05/42] Change component display name. Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Code/Source/Shape/EditorReferenceShapeComponent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h index dce7874533..0defab9a5b 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h @@ -22,7 +22,7 @@ namespace LmbrCentral static void Reflect(AZ::ReflectContext* context); static constexpr const char* const s_categoryName = "Shape"; - static constexpr const char* const s_componentName = "Reference Shape"; + static constexpr const char* const s_componentName = "Shape Reference"; static constexpr const char* const s_componentDescription = "Enables the entity to reference and reuse shape entities"; static constexpr const char* const s_icon = "Icons/Components/Viewport/Component_Placeholder.svg"; static constexpr const char* const s_viewportIcon = "Icons/Components/Viewport/Component_Placeholder.svg"; From 14d241733d0fd68669765544d5585e5b1af0eec3 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Thu, 25 Nov 2021 08:04:02 +0000 Subject: [PATCH 06/42] Change to use correct placeholder icons Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Code/Source/Shape/EditorReferenceShapeComponent.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h index 0defab9a5b..312fa852bf 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h @@ -24,7 +24,7 @@ namespace LmbrCentral static constexpr const char* const s_categoryName = "Shape"; static constexpr const char* const s_componentName = "Shape Reference"; static constexpr const char* const s_componentDescription = "Enables the entity to reference and reuse shape entities"; - static constexpr const char* const s_icon = "Icons/Components/Viewport/Component_Placeholder.svg"; + static constexpr const char* const s_icon = "Icons/Components/Component_Placeholder.svg"; static constexpr const char* const s_viewportIcon = "Icons/Components/Viewport/Component_Placeholder.svg"; static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/"; }; From bad38f5ed0cc47a76707a04e1e7180e206426b78 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Thu, 25 Nov 2021 12:12:02 +0000 Subject: [PATCH 07/42] Missed python tests Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Gem/PythonTests/Atom/atom_utils/atom_constants.py | 2 +- .../Terrain/EditorScripts/Terrain_SupportsPhysics.py | 2 +- .../dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py | 4 ++-- .../LayerSpawner_InstancesPlantInAllSupportedShapes.py | 4 ++-- .../EditorScripts/AreaNodes_DependentComponentsAdded.py | 4 ++-- .../EditorScripts/Edit_DisabledNodeDuplication.py | 2 +- .../EditorScripts/GradientNodes_DependentComponentsAdded.py | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py index ef9e90802b..d55243b2b3 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py @@ -390,7 +390,7 @@ class AtomComponentProperties: 'name': 'PostFX Shape Weight Modifier', 'requires': [AtomComponentProperties.postfx_layer()], 'shapes': ['Axis Aligned Box Shape', 'Box Shape', 'Capsule Shape', 'Compound Shape', 'Cylinder Shape', - 'Disk Shape', 'Polygon Prism Shape', 'Quad Shape', 'Sphere Shape', 'Vegetation Reference Shape'], + 'Disk Shape', 'Polygon Prism Shape', 'Quad Shape', 'Sphere Shape', 'Shape Reference'], } return properties[property] diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py index e68b0932c2..390ec6a6b0 100644 --- a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py @@ -72,7 +72,7 @@ def Terrain_SupportsPhysics(): # 2) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components entity1_components_to_add = ["Axis Aligned Box Shape", "Terrain Layer Spawner", "Terrain Height Gradient List", "Terrain Physics Heightfield Collider", "PhysX Heightfield Collider"] - entity2_components_to_add = ["Vegetation Reference Shape", "Gradient Transform Modifier", "FastNoise Gradient"] + entity2_components_to_add = ["Shape Reference", "Gradient Transform Modifier", "FastNoise Gradient"] ball_components_to_add = ["Sphere Shape", "PhysX Collider", "PhysX Rigid Body"] terrain_spawner_entity = hydra.Entity("TestEntity1") terrain_spawner_entity.create_entity(azmath.Vector3(512.0, 512.0, 50.0), entity1_components_to_add) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py index 649c7d0776..1153ae2657 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InheritBehaviorFlag.py @@ -78,7 +78,7 @@ def LayerSpawner_InheritBehaviorFlag(): # Create Vegetation area and assign a valid asset veg_1 = hydra.Entity("veg_1") veg_1.create_entity( - position, ["Vegetation Layer Spawner", "Vegetation Reference Shape", "Vegetation Asset List"] + position, ["Vegetation Layer Spawner", "Shape Reference", "Vegetation Asset List"] ) set_dynamic_slice_asset(veg_1, 2, os.path.join("Slices", "PinkFlower.dynamicslice")) veg_1.get_set_test(1, "Configuration|Shape Entity Id", blender_entity.id) @@ -86,7 +86,7 @@ def LayerSpawner_InheritBehaviorFlag(): # Create second vegetation area and assign a valid asset veg_2 = hydra.Entity("veg_2") veg_2.create_entity( - position, ["Vegetation Layer Spawner", "Vegetation Reference Shape", "Vegetation Asset List"] + position, ["Vegetation Layer Spawner", "Shape Reference", "Vegetation Asset List"] ) set_dynamic_slice_asset(veg_2, 2, os.path.join("Slices", "PurpleFlower.dynamicslice")) veg_2.get_set_test(1, "Configuration|Shape Entity Id", blender_entity.id) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py index 0da200d87a..42604cd2da 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/EditorScripts/LayerSpawner_InstancesPlantInAllSupportedShapes.py @@ -9,7 +9,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT def LayerSpawner_InstancesPlantInAllSupportedShapes(): """ Summary: - The level is loaded and vegetation area is created. Then the Vegetation Reference Shape + The level is loaded and vegetation area is created. Then the Shape Reference component of vegetation area is pinned with entities of different shape components to check if the vegetation plants in different shaped areas. @@ -67,7 +67,7 @@ def LayerSpawner_InstancesPlantInAllSupportedShapes(): 10.0, 10.0, 10.0, asset_path) vegetation.remove_component("Box Shape") - vegetation.add_component("Vegetation Reference Shape") + vegetation.add_component("Shape Reference") # Create surface for planting on dynveg.create_surface_entity("Surface Entity", entity_position, 60.0, 60.0, 1.0) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py index 9703423901..c69ce77041 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/AreaNodes_DependentComponentsAdded.py @@ -96,7 +96,7 @@ def AreaNodes_DependentComponentsAdded(): 'SpawnerAreaNode': [ 'Vegetation Layer Spawner', 'Vegetation Asset List', - 'Vegetation Reference Shape' + 'Shape Reference' ], 'MeshBlockerAreaNode': [ 'Vegetation Layer Blocker (Mesh)', @@ -104,7 +104,7 @@ def AreaNodes_DependentComponentsAdded(): ], 'BlockerAreaNode': [ 'Vegetation Layer Blocker', - 'Vegetation Reference Shape' + 'Shape Reference' ] } diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py index 417e093567..4dfc227c53 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/Edit_DisabledNodeDuplication.py @@ -82,7 +82,7 @@ def Edit_DisabledNodeDuplication(): nodes = { 'SpawnerAreaNode': 'Vegetation Asset List', 'MeshBlockerAreaNode': 'Mesh', - 'BlockerAreaNode': 'Vegetation Reference Shape', + 'BlockerAreaNode': 'Shape Reference', 'FastNoiseGradientNode': 'Gradient Transform Modifier', 'ImageGradientNode': 'Gradient Transform Modifier', 'PerlinNoiseGradientNode': 'Gradient Transform Modifier', diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py index c04f9f05f6..63df9a6fcb 100755 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/EditorScripts/GradientNodes_DependentComponentsAdded.py @@ -104,7 +104,7 @@ def GradientNodes_DependentComponentsAdded(): # we will be checking for commonComponents = [ 'Gradient Transform Modifier', - 'Vegetation Reference Shape' + 'Shape Reference' ] componentNames = [] for name in gradients: @@ -114,7 +114,7 @@ def GradientNodes_DependentComponentsAdded(): # Create nodes for the gradients that have additional required dependencies and check if # the Entity created by adding the node has the appropriate Component and required - # Gradient Transform Modifier and Vegetation Reference Shape components added automatically to it + # Gradient Transform Modifier and Shape Reference components added automatically to it newGraph = graph.GraphManagerRequestBus(bus.Broadcast, 'GetGraph', newGraphId) x = 10.0 y = 10.0 From 68d5a46a489a60321a2127e6d750ddd4c7f933ee Mon Sep 17 00:00:00 2001 From: Tobias Alexander Franke Date: Wed, 20 Oct 2021 10:35:46 +0800 Subject: [PATCH 08/42] Fixed bug when deleting event Signed-off-by: T.J. McGrath-Daly --- Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp index 48a16e54e6..f8505d94ea 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp @@ -168,6 +168,12 @@ namespace AudioControls m_pATLControlsTree->setModel(pProxyModel); m_pProxyModel = pProxyModel; + QAction* pAction = new QAction(tr("Delete"), this); + pAction->setShortcutContext(Qt::WidgetWithChildrenShortcut); + pAction->setShortcut(QKeySequence::Delete); + connect(pAction, SIGNAL(triggered()), this, SLOT(DeleteSelectedControl())); + m_pATLControlsTree->addAction(pAction); + connect(m_pATLControlsTree->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), this, SIGNAL(SelectedControlChanged())); connect(m_pATLControlsTree->selectionModel(), SIGNAL(currentChanged(const QModelIndex&, const QModelIndex&)), this, SLOT(StopControlExecution())); connect(m_pTreeModel, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(ItemModified(QStandardItem*))); From dfa6f77075ac124901fdd1728cd76108e518b33b Mon Sep 17 00:00:00 2001 From: "T.J. McGrath-Daly" Date: Tue, 26 Oct 2021 09:38:46 +0800 Subject: [PATCH 09/42] Fix for bug where, when removing a motion that is used by more than one motion set. Signed-off-by: T.J. McGrath-Daly --- .../MotionSetsWindow/MotionSetWindow.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp index 393e26790b..3a4c2628b3 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/MotionSetsWindow/MotionSetWindow.cpp @@ -1138,6 +1138,12 @@ namespace EMStudio for (size_t motionSetId = 0; motionSetId < numMotionSets; motionSetId++) { EMotionFX::MotionSet* motionSet2 = EMotionFX::GetMotionManager().GetMotionSet(motionSetId); + + if (motionSet2->GetIsOwnedByRuntime()) + { + continue; + } + if (motionSet2->FindMotionEntryById(motionEntry->GetId())) { numMotionSetContainsMotion++; @@ -1148,12 +1154,6 @@ namespace EMStudio } } - // If motion exists in multiple motion sets, then it should not be removed from motions window. - if (removeMotion && numMotionSetContainsMotion > 1) - { - continue; - } - // check the reference counter if only one reference registered // two is needed because the remove motion command has to be called to have the undo/redo possible // without it the motion list is also not updated because the remove motion callback is not called @@ -1170,6 +1170,12 @@ namespace EMStudio } motionIdsToRemoveString += motionEntry->GetId(); + // If motion exists in multiple motion sets, then it should not be removed from motions window. + if (removeMotion && numMotionSetContainsMotion > 1) + { + continue; + } + // Check if the motion is not valid, that means the motion is not loaded. if (removeMotion && motionEntry->GetMotion()) { From f49a699ab4c99f7d53bb5c296bfeb9b1caf6fb2b Mon Sep 17 00:00:00 2001 From: "T.J. McGrath-Daly" Date: Fri, 15 Oct 2021 14:25:18 +0800 Subject: [PATCH 10/42] Fix for animation window render options not being persistent Signed-off-by: T.J. McGrath-Daly --- .../EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp index c74cb3cb0f..2c9e84c9b9 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp @@ -933,6 +933,7 @@ namespace EMStudio // save the current settings and disable rendering m_renderOptions.SetLastUsedLayout(layout->GetName()); + SaveRenderOptions(); ClearViewWidgets(); VisibilityChanged(false); From 9753655d8916ec0d8e397f1f61eec1b387e296e1 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Mon, 29 Nov 2021 09:48:36 +0000 Subject: [PATCH 11/42] Add preferred component types to landscape canvas code. Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Code/Source/Editor/MainWindow.cpp | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index 9c72f75a4c..d7f68accda 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -203,13 +203,12 @@ namespace LandscapeCanvasEditor { using namespace AzToolsFramework; - static const QStringList preferredCategories = { - "Vegetation", - "Atom" - }; + static const QStringList preferredCategories = { "Vegetation", "Atom" }; + + static const AZStd::unordered_map preferredComponentByCategory = { { "Shape", "Shape Reference" } }; // There are a couple of cases where we prefer certain categories of Components - // to be added over others (e.g. a Vegetation Shape Reference instead of actual LmbrCentral shapes), + // to be added over others, // so if those there are components in those categories, then choose them first. // Otherwise, just pick the first one in the list. ComponentPaletteUtil::ComponentDataTable::const_iterator categoryIt; @@ -228,6 +227,22 @@ namespace LandscapeCanvasEditor AZ_Assert(categoryIt->second.size(), "No components found that satisfy the missing required service(s)."); + const AZStd::string categoryName(categoryIt->first.toUtf8()); + + // Check whether the selected category has a preferred component and return that if it does. + for (const auto& preferredComponentPair : preferredComponentByCategory) + { + if (categoryName == preferredComponentPair.first) + { + const auto& componentPair = categoryIt->second.find(preferredComponentPair.second); + + if (componentPair != categoryIt->second.end()) + { + return componentPair->second->m_typeId; + } + } + } + const auto& componentPair = categoryIt->second.begin(); return componentPair->second->m_typeId; } From a414f87894e71ffe6bc2d1b99f5ab9251d90bbfe Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Tue, 30 Nov 2021 15:36:58 +0000 Subject: [PATCH 12/42] Review changes, new icons Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Code/Source/Editor/MainWindow.cpp | 35 +++++----- .../Icons/Components/ShapeReference.svg | 3 + .../Components/Viewport/ShapeReference.svg | 16 +++++ .../Code/Mocks/LmbrCentral/Shape/MockShapes.h | 2 +- .../Shape/EditorReferenceShapeComponent.h | 6 +- .../Source/Shape/ReferenceShapeComponent.cpp | 2 +- Gems/Vegetation/Code/CMakeLists.txt | 1 + .../Tests/VegetationComponentFilterTests.cpp | 2 + Gems/Vegetation/Code/Tests/VegetationMocks.h | 68 ------------------- 9 files changed, 44 insertions(+), 91 deletions(-) create mode 100644 Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg create mode 100644 Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index d7f68accda..c1eaa32bb6 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -203,14 +203,29 @@ namespace LandscapeCanvasEditor { using namespace AzToolsFramework; - static const QStringList preferredCategories = { "Vegetation", "Atom" }; + // Check whether the first category has a preferred component and return that if it does. + const AZStd::unordered_map preferredComponentByCategory = { { "Shape", "Shape Reference" } }; - static const AZStd::unordered_map preferredComponentByCategory = { { "Shape", "Shape Reference" } }; + const AZStd::string firstCategoryName(componentDataTable.begin()->first.toUtf8()); + + const auto& preferredComponentPair = preferredComponentByCategory.find(firstCategoryName); + + if (preferredComponentPair != preferredComponentByCategory.end()) + { + const auto& componentPair = componentDataTable.begin()->second.find(preferredComponentPair->second); + + if (componentPair != componentDataTable.begin()->second.end()) + { + return componentPair->second->m_typeId; + } + } // There are a couple of cases where we prefer certain categories of Components // to be added over others, // so if those there are components in those categories, then choose them first. // Otherwise, just pick the first one in the list. + static const QStringList preferredCategories = { "Vegetation", "Atom" }; + ComponentPaletteUtil::ComponentDataTable::const_iterator categoryIt; for (const auto& categoryName : preferredCategories) { @@ -227,22 +242,6 @@ namespace LandscapeCanvasEditor AZ_Assert(categoryIt->second.size(), "No components found that satisfy the missing required service(s)."); - const AZStd::string categoryName(categoryIt->first.toUtf8()); - - // Check whether the selected category has a preferred component and return that if it does. - for (const auto& preferredComponentPair : preferredComponentByCategory) - { - if (categoryName == preferredComponentPair.first) - { - const auto& componentPair = categoryIt->second.find(preferredComponentPair.second); - - if (componentPair != categoryIt->second.end()) - { - return componentPair->second->m_typeId; - } - } - } - const auto& componentPair = categoryIt->second.begin(); return componentPair->second->m_typeId; } diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg new file mode 100644 index 0000000000..a304220c48 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/ShapeReference.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg new file mode 100644 index 0000000000..fe6abb9fe4 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/ShapeReference.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h b/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h index 41df0d318d..b0118a914a 100644 --- a/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h +++ b/Gems/LmbrCentral/Code/Mocks/LmbrCentral/Shape/MockShapes.h @@ -61,7 +61,7 @@ namespace UnitTest { public: AZ::Entity m_entity; - mutable int m_count = 0; + int m_count = 0; MockShape() { diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h index 312fa852bf..fd98809bcc 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorReferenceShapeComponent.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include namespace LmbrCentral @@ -24,8 +24,8 @@ namespace LmbrCentral static constexpr const char* const s_categoryName = "Shape"; static constexpr const char* const s_componentName = "Shape Reference"; static constexpr const char* const s_componentDescription = "Enables the entity to reference and reuse shape entities"; - static constexpr const char* const s_icon = "Icons/Components/Component_Placeholder.svg"; - static constexpr const char* const s_viewportIcon = "Icons/Components/Viewport/Component_Placeholder.svg"; + static constexpr const char* const s_icon = "Editor/Icons/Components/ShapeReference.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/ShapeReference.svg"; static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/"; }; } diff --git a/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp index 5f33164147..7ed79fe3a3 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/ReferenceShapeComponent.cpp @@ -27,7 +27,7 @@ namespace LmbrCentral if (edit) { edit->Class( - "Reference Shape", "") + "Shape Reference", "") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) diff --git a/Gems/Vegetation/Code/CMakeLists.txt b/Gems/Vegetation/Code/CMakeLists.txt index 735bb35bd9..53fa6bd59f 100644 --- a/Gems/Vegetation/Code/CMakeLists.txt +++ b/Gems/Vegetation/Code/CMakeLists.txt @@ -103,6 +103,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest AZ::AzFrameworkTestShared Gem::Vegetation.Static + Gem::LmbrCentral.Mocks ) ly_add_googletest( NAME Gem::Vegetation.Tests diff --git a/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp b/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp index abb76c8c2d..221a2da432 100644 --- a/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp +++ b/Gems/Vegetation/Code/Tests/VegetationComponentFilterTests.cpp @@ -8,6 +8,8 @@ #include "VegetationTest.h" #include "VegetationMocks.h" +#include + #include #include #include diff --git a/Gems/Vegetation/Code/Tests/VegetationMocks.h b/Gems/Vegetation/Code/Tests/VegetationMocks.h index 4c526447d3..ece0833433 100644 --- a/Gems/Vegetation/Code/Tests/VegetationMocks.h +++ b/Gems/Vegetation/Code/Tests/VegetationMocks.h @@ -312,74 +312,6 @@ namespace UnitTest } }; - class MockShape - : public LmbrCentral::ShapeComponentRequestsBus::Handler - { - public: - AZ::Entity m_entity; - mutable int m_count = 0; - - MockShape() - { - LmbrCentral::ShapeComponentRequestsBus::Handler::BusConnect(m_entity.GetId()); - } - - ~MockShape() - { - LmbrCentral::ShapeComponentRequestsBus::Handler::BusDisconnect(); - } - - AZ::Crc32 GetShapeType() override - { - ++m_count; - return AZ_CRC("TestShape", 0x856ca50c); - } - - AZ::Aabb m_aabb = AZ::Aabb::CreateNull(); - AZ::Aabb GetEncompassingAabb() override - { - ++m_count; - return m_aabb; - } - - AZ::Transform m_localTransform = AZ::Transform::CreateIdentity(); - AZ::Aabb m_localBounds = AZ::Aabb::CreateNull(); - void GetTransformAndLocalBounds(AZ::Transform& transform, AZ::Aabb& bounds) override - { - ++m_count; - transform = m_localTransform; - bounds = m_localBounds; - } - - bool m_pointInside = true; - bool IsPointInside([[maybe_unused]] const AZ::Vector3& point) override - { - ++m_count; - return m_pointInside; - } - - float m_distanceSquaredFromPoint = 0.0f; - float DistanceSquaredFromPoint([[maybe_unused]] const AZ::Vector3& point) override - { - ++m_count; - return m_distanceSquaredFromPoint; - } - - AZ::Vector3 m_randomPointInside = AZ::Vector3::CreateZero(); - AZ::Vector3 GenerateRandomPointInside([[maybe_unused]] AZ::RandomDistributionType randomDistribution) override - { - ++m_count; - return m_randomPointInside; - } - - bool m_intersectRay = false; - bool IntersectRay([[maybe_unused]] const AZ::Vector3& src, [[maybe_unused]] const AZ::Vector3& dir, [[maybe_unused]] float& distance) override - { - ++m_count; - return m_intersectRay; - } - }; - struct MockSurfaceHandler : public SurfaceData::SurfaceDataSystemRequestBus::Handler { From bb5c2ac4625214a3577e9d55c8ee2e65ff17a003 Mon Sep 17 00:00:00 2001 From: greerdv Date: Tue, 30 Nov 2021 15:52:34 +0000 Subject: [PATCH 13/42] fix alignment of autosized ragdoll colliders Signed-off-by: greerdv --- Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp index 02b3fd7649..14618b1736 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp @@ -299,7 +299,7 @@ namespace EMotionFX { Physics::CapsuleShapeConfiguration* capsule = static_cast(collider.second.get()); capsule->m_height = boneDirection.GetLength(); - if (AZ::IsClose(localBoneDirection.GetLength(), 1.0f)) + if (!localBoneDirection.IsZero()) { collider.first->m_rotation = AZ::Quaternion::CreateShortestArc(AZ::Vector3::CreateAxisZ(), localBoneDirection.GetNormalized()); } @@ -309,7 +309,7 @@ namespace EMotionFX } else if (colliderType == azrtti_typeid()) { - if (AZ::IsClose(localBoneDirection.GetLength(), 1.0f)) + if (!localBoneDirection.IsZero()) { collider.first->m_rotation = AZ::Quaternion::CreateShortestArc(AZ::Vector3::CreateAxisZ(), localBoneDirection.GetNormalized()); } From 3e92ea6b3e10a7ce8f1d3cf33e8602a329acf872 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Tue, 30 Nov 2021 18:58:40 +0000 Subject: [PATCH 14/42] review change Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../Code/Source/Editor/MainWindow.cpp | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index c1eaa32bb6..e58ea77373 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -203,20 +203,25 @@ namespace LandscapeCanvasEditor { using namespace AzToolsFramework; - // Check whether the first category has a preferred component and return that if it does. - const AZStd::unordered_map preferredComponentByCategory = { { "Shape", "Shape Reference" } }; + // A map of category names with preferred component names. + // There may be multiple component names for a category, as long as they provide different services. + const AZStd::map> preferredComponentsByCategory = { { "Shape", { "Shape Reference" } } }; - const AZStd::string firstCategoryName(componentDataTable.begin()->first.toUtf8()); - - const auto& preferredComponentPair = preferredComponentByCategory.find(firstCategoryName); - - if (preferredComponentPair != preferredComponentByCategory.end()) + // Scan through the preferred categories to see whether any exist in the componentDataTable. + for (const auto& preferredComponentPair : preferredComponentsByCategory) { - const auto& componentPair = componentDataTable.begin()->second.find(preferredComponentPair->second); - - if (componentPair != componentDataTable.begin()->second.end()) + auto candidateDataTablePair = componentDataTable.find(preferredComponentPair.first); + if (candidateDataTablePair != componentDataTable.end()) { - return componentPair->second->m_typeId; + // Now check all the preferred components for that category, and return the first one that exists in the candidate componentDataTable. + for (const auto& preferredComponentName : preferredComponentPair.second) + { + const auto& candidateComponent = candidateDataTablePair->second.find(preferredComponentName); + if (candidateComponent != candidateDataTablePair->second.end()) + { + return candidateComponent->second->m_typeId; + } + } } } From a44270e4df1667749559a0617069cb61b2d1c408 Mon Sep 17 00:00:00 2001 From: greerdv Date: Tue, 30 Nov 2021 19:33:39 +0000 Subject: [PATCH 15/42] improvement suggested during PR Signed-off-by: greerdv --- Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp index 14618b1736..d691f4b202 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/PhysicsSetup.cpp @@ -273,7 +273,7 @@ namespace EMotionFX { AZ::Vector3 boneCenter = nodeTransform.GetTranslation() + 0.5f * boneDirection; float sumDistanceFromAxisSq = 0.0f; - float boneLengthSqReciprocal = 1.0f / boneDirection.GetLengthSq(); + float boneLengthSqReciprocal = 1.0f / (boneLength * boneLength); for (int i = 0; i < numMeshPoints; i++) { meshPoints[i] -= boneCenter; From 816d1f1b3de8c0c97cbca226a05be45f31a574bf Mon Sep 17 00:00:00 2001 From: Jeremy Ong Date: Wed, 1 Dec 2021 11:07:11 -0700 Subject: [PATCH 16/42] Add CLI option to enable PIX GPU events without expressing loading the Pix runtime Signed-off-by: Jeremy Ong --- Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h | 3 +++ Gems/Atom/RHI/Code/Source/RHI/Factory.cpp | 13 +++++++++++++ Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp | 4 ++-- Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp | 4 ++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h b/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h index 71f9f1605b..1755d45a74 100644 --- a/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h +++ b/Gems/Atom/RHI/Code/Include/Atom/RHI/Factory.h @@ -112,6 +112,9 @@ namespace AZ //! Returns true if Pix dll is loaded static bool IsPixModuleLoaded(); + //! Returns true if Pix GPU events should be emitted + static bool PixGpuEventsEnabled(); + //! Returns true if Warp is enabled static bool UsingWarpDevice(); diff --git a/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp b/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp index 82b0a13c86..9146175252 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/Factory.cpp @@ -26,6 +26,7 @@ static bool s_isRenderDocDllLoaded = false; #if defined(USE_PIX) static AZStd::unique_ptr s_pixModule; static bool s_isPixGpuCaptureDllLoaded = false; +static bool s_pixGpuMarkersEnabled = false; #endif static bool s_usingWarpDevice = false; @@ -62,6 +63,7 @@ namespace AZ #if defined(USE_RENDERDOC) // If RenderDoc is requested, we need to load the library as early as possible (before device queries/factories are made) bool enableRenderDoc = RHI::QueryCommandLineOption("enableRenderDoc"); + s_pixGpuMarkersEnabled = s_pixGpuMarkersEnabled || enableRenderDoc; if (enableRenderDoc && AZ_TRAIT_RENDERDOC_MODULE && !s_renderDocModule) { @@ -119,6 +121,8 @@ namespace AZ //Pix dll can still be injected even if we do not pass in enablePixGPU. This can be done if we launch the app from Pix. s_isPixGpuCaptureDllLoaded = Platform::IsPixDllInjected(AZ_TRAIT_PIX_MODULE); + + s_pixGpuMarkersEnabled = s_pixGpuMarkersEnabled || RHI::QueryCommandLineOption("enablePixGpuMarkers"); #endif } @@ -202,6 +206,15 @@ namespace AZ #endif } + bool Factory::PixGpuEventsEnabled() + { +#if defined(USE_PIX) + return s_pixGpuMarkersEnabled; +#else + return false; +#endif + } + bool Factory::UsingWarpDevice() { return s_usingWarpDevice; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp index 1ee35c513a..07cf3bf8ad 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/CommandList.cpp @@ -97,7 +97,7 @@ namespace AZ SetName(name); PIXBeginEvent(PIX_MARKER_CMDLIST_COL, name.GetCStr()); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXBeginEvent(GetCommandList(), PIX_MARKER_CMDLIST_COL, name.GetCStr()); } @@ -107,7 +107,7 @@ namespace AZ { FlushBarriers(); PIXEndEvent(); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXEndEvent(GetCommandList()); } diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp index cea072954a..b29018a2ac 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/Scope.cpp @@ -311,7 +311,7 @@ namespace AZ PIXBeginEvent(0xFFFF00FF, GetId().GetCStr()); - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXBeginEvent(commandList.GetCommandList(), 0xFFFF00FF, GetId().GetCStr()); } @@ -428,7 +428,7 @@ namespace AZ } } - if (RHI::Factory::Get().IsPixModuleLoaded() || RHI::Factory::Get().IsRenderDocModuleLoaded()) + if (RHI::Factory::Get().PixGpuEventsEnabled()) { PIXEndEvent(commandList.GetCommandList()); } From c3461868d981aaac8828b362bdb79f2215bd7093 Mon Sep 17 00:00:00 2001 From: Junbo Liang <68558268+junbo75@users.noreply.github.com> Date: Wed, 1 Dec 2021 15:24:02 -0800 Subject: [PATCH 17/42] Move the header files in the AWS ClientAuth gem based on the latest gem structure guideline" (#5177) Signed-off-by: Junbo Liang <68558268+junbo75@users.noreply.github.com> --- Gems/AWSClientAuth/Code/CMakeLists.txt | 10 +-- .../AuthenticationProviderBus.h | 0 .../Authentication/AuthenticationTokens.h | 0 .../AWSCognitoAuthorizationBus.h | 0 .../Authorization/ClientAuthAWSCredentials.h | 0 .../AWSCognitoUserManagementBus.h | 0 .../Private => Source}/AWSClientAuthBus.h | 0 .../Private => Source}/AWSClientAuthModule.h | 0 .../AWSClientAuthResourceMappingConstants.h | 0 .../AWSClientAuthSystemComponent.h | 0 .../AWSCognitoAuthenticationProvider.h | 0 ...enticationNotificationBusBehaviorHandler.h | 0 .../AuthenticationProviderInterface.h | 0 .../AuthenticationProviderManager.h | 0 .../AuthenticationProviderScriptCanvasBus.h | 0 .../AuthenticationProviderTypes.h | 0 .../GoogleAuthenticationProvider.h | 0 .../LWAAuthenticationProvider.h | 0 .../Authentication/OAuthConstants.h | 0 ...oCachingAuthenticatedCredentialsProvider.h | 0 ...entAuthPersistentCognitoIdentityProvider.h | 0 .../AWSCognitoAuthorizationController.h | 0 ...horizationNotificationBusBehaviorHandler.h | 0 .../AWSCognitoUserManagementController.h | 0 ...ManagementNotificationBusBehaviorHandler.h | 0 .../Code/awsclientauth_files.cmake | 69 +++++++++---------- .../Code/awsclientauth_shared_files.cmake | 2 +- 27 files changed, 39 insertions(+), 42 deletions(-) rename Gems/AWSClientAuth/Code/Include/{Public => }/Authentication/AuthenticationProviderBus.h (100%) rename Gems/AWSClientAuth/Code/Include/{Public => }/Authentication/AuthenticationTokens.h (100%) rename Gems/AWSClientAuth/Code/Include/{Public => }/Authorization/AWSCognitoAuthorizationBus.h (100%) rename Gems/AWSClientAuth/Code/Include/{Public => }/Authorization/ClientAuthAWSCredentials.h (100%) rename Gems/AWSClientAuth/Code/Include/{Public => }/UserManagement/AWSCognitoUserManagementBus.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/AWSClientAuthBus.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/AWSClientAuthModule.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/AWSClientAuthResourceMappingConstants.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/AWSClientAuthSystemComponent.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/AWSCognitoAuthenticationProvider.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/AuthenticationNotificationBusBehaviorHandler.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/AuthenticationProviderInterface.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/AuthenticationProviderManager.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/AuthenticationProviderScriptCanvasBus.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/AuthenticationProviderTypes.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/GoogleAuthenticationProvider.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/LWAAuthenticationProvider.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authentication/OAuthConstants.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authorization/AWSCognitoAuthorizationController.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/UserManagement/AWSCognitoUserManagementController.h (100%) rename Gems/AWSClientAuth/Code/{Include/Private => Source}/UserManagement/UserManagementNotificationBusBehaviorHandler.h (100%) diff --git a/Gems/AWSClientAuth/Code/CMakeLists.txt b/Gems/AWSClientAuth/Code/CMakeLists.txt index bd8b174b65..1f0c119f5a 100644 --- a/Gems/AWSClientAuth/Code/CMakeLists.txt +++ b/Gems/AWSClientAuth/Code/CMakeLists.txt @@ -15,9 +15,9 @@ ly_add_target( awsclientauth_files.cmake INCLUDE_DIRECTORIES PUBLIC - Include/Public + Include PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -35,7 +35,7 @@ ly_add_target( awsclientauth_shared_files.cmake INCLUDE_DIRECTORIES PRIVATE - Include/Private + Source BUILD_DEPENDENCIES PRIVATE AZ::AzCore @@ -97,8 +97,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) awsclientauth_test_files.cmake INCLUDE_DIRECTORIES PRIVATE - "Include/Private" - "Include/Public" + Source + Include Tests BUILD_DEPENDENCIES PRIVATE diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationProviderBus.h b/Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationProviderBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationProviderBus.h rename to Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationProviderBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationTokens.h b/Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationTokens.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authentication/AuthenticationTokens.h rename to Gems/AWSClientAuth/Code/Include/Authentication/AuthenticationTokens.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authorization/AWSCognitoAuthorizationBus.h b/Gems/AWSClientAuth/Code/Include/Authorization/AWSCognitoAuthorizationBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authorization/AWSCognitoAuthorizationBus.h rename to Gems/AWSClientAuth/Code/Include/Authorization/AWSCognitoAuthorizationBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/Authorization/ClientAuthAWSCredentials.h b/Gems/AWSClientAuth/Code/Include/Authorization/ClientAuthAWSCredentials.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/Authorization/ClientAuthAWSCredentials.h rename to Gems/AWSClientAuth/Code/Include/Authorization/ClientAuthAWSCredentials.h diff --git a/Gems/AWSClientAuth/Code/Include/Public/UserManagement/AWSCognitoUserManagementBus.h b/Gems/AWSClientAuth/Code/Include/UserManagement/AWSCognitoUserManagementBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Public/UserManagement/AWSCognitoUserManagementBus.h rename to Gems/AWSClientAuth/Code/Include/UserManagement/AWSCognitoUserManagementBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthBus.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthBus.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthModule.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthModule.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthModule.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthModule.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthResourceMappingConstants.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthResourceMappingConstants.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthResourceMappingConstants.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthResourceMappingConstants.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthSystemComponent.h b/Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/AWSClientAuthSystemComponent.h rename to Gems/AWSClientAuth/Code/Source/AWSClientAuthSystemComponent.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AWSCognitoAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AWSCognitoAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderInterface.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderInterface.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderInterface.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderInterface.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderManager.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderManager.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderScriptCanvasBus.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderScriptCanvasBus.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderTypes.h b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderTypes.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/AuthenticationProviderTypes.h rename to Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderTypes.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/GoogleAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/GoogleAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/LWAAuthenticationProvider.h b/Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/LWAAuthenticationProvider.h rename to Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authentication/OAuthConstants.h b/Gems/AWSClientAuth/Code/Source/Authentication/OAuthConstants.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authentication/OAuthConstants.h rename to Gems/AWSClientAuth/Code/Source/Authentication/OAuthConstants.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/UserManagement/AWSCognitoUserManagementController.h b/Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/UserManagement/AWSCognitoUserManagementController.h rename to Gems/AWSClientAuth/Code/Source/UserManagement/AWSCognitoUserManagementController.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h b/Gems/AWSClientAuth/Code/Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h similarity index 100% rename from Gems/AWSClientAuth/Code/Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h rename to Gems/AWSClientAuth/Code/Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h diff --git a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake index 3b07b710e7..5de71210af 100644 --- a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake +++ b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake @@ -7,46 +7,43 @@ # set(FILES - Include/Public/Authentication/AuthenticationProviderBus.h - Include/Public/Authentication/AuthenticationTokens.h - Include/Public/Authorization/AWSCognitoAuthorizationBus.h - Include/Public/Authorization/ClientAuthAWSCredentials.h - Include/Public/UserManagement/AWSCognitoUserManagementBus.h + Include/Authentication/AuthenticationProviderBus.h + Include/Authentication/AuthenticationTokens.h + Include/Authorization/AWSCognitoAuthorizationBus.h + Include/Authorization/ClientAuthAWSCredentials.h + Include/UserManagement/AWSCognitoUserManagementBus.h - Include/Private/AWSClientAuthSystemComponent.h - Include/Private/AWSClientAuthBus.h - Include/Private/AWSClientAuthResourceMappingConstants.h - Include/Private/Authentication/AuthenticationProviderTypes.h - Include/Private/Authentication/AuthenticationProviderScriptCanvasBus.h - Include/Private/Authentication/AuthenticationProviderManager.h - Include/Private/Authentication/AuthenticationNotificationBusBehaviorHandler.h - - Include/Private/Authorization/AWSCognitoAuthorizationController.h - Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h - Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h - Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h - - Include/Private/UserManagement/AWSCognitoUserManagementController.h - Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h - - Include/Private/Authentication/AuthenticationProviderInterface.h - Include/Private/Authentication/OAuthConstants.h - Include/Private/Authentication/AWSCognitoAuthenticationProvider.h - Include/Private/Authentication/LWAAuthenticationProvider.h - Include/Private/Authentication/GoogleAuthenticationProvider.h - Source/AWSClientAuthSystemComponent.cpp - Source/Authentication/AuthenticationTokens.cpp - Source/Authentication/AuthenticationProviderInterface.cpp - Source/Authentication/AuthenticationProviderManager.cpp - Source/Authentication/AWSCognitoAuthenticationProvider.cpp - Source/Authentication/LWAAuthenticationProvider.cpp - Source/Authentication/GoogleAuthenticationProvider.cpp + Source/AWSClientAuthSystemComponent.h + Source/AWSClientAuthBus.h + Source/AWSClientAuthResourceMappingConstants.h + + Source/Authentication/AuthenticationNotificationBusBehaviorHandler.h + Source/Authentication/AuthenticationProviderInterface.cpp + Source/Authentication/AuthenticationProviderInterface.h + Source/Authentication/AuthenticationProviderManager.cpp + Source/Authentication/AuthenticationProviderManager.h + Source/Authentication/AuthenticationProviderScriptCanvasBus.h + Source/Authentication/AuthenticationProviderTypes.h + Source/Authentication/AuthenticationTokens.cpp + Source/Authentication/AWSCognitoAuthenticationProvider.cpp + Source/Authentication/AWSCognitoAuthenticationProvider.h + Source/Authentication/LWAAuthenticationProvider.cpp + Source/Authentication/LWAAuthenticationProvider.h + Source/Authentication/GoogleAuthenticationProvider.cpp + Source/Authentication/GoogleAuthenticationProvider.h + Source/Authentication/OAuthConstants.h - Source/Authorization/ClientAuthAWSCredentials.cpp - Source/Authorization/AWSCognitoAuthorizationController.cpp - Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.cpp Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp + Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h + Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.cpp + Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h + Source/Authorization/AWSCognitoAuthorizationController.cpp + Source/Authorization/AWSCognitoAuthorizationController.h + Source/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h + Source/Authorization/ClientAuthAWSCredentials.cpp Source/UserManagement/AWSCognitoUserManagementController.cpp + Source/UserManagement/AWSCognitoUserManagementController.h + Source/UserManagement/UserManagementNotificationBusBehaviorHandler.h ) diff --git a/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake b/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake index 6297f400fd..cca6184641 100644 --- a/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake +++ b/Gems/AWSClientAuth/Code/awsclientauth_shared_files.cmake @@ -7,6 +7,6 @@ # set(FILES - Include/Private/AWSClientAuthModule.h Source/AWSClientAuthModule.cpp + Source/AWSClientAuthModule.h ) From 8b3c76d8b8326fa714fcf80bcc755ed0ea21edf6 Mon Sep 17 00:00:00 2001 From: Mike Chang Date: Wed, 1 Dec 2021 17:14:00 -0800 Subject: [PATCH 18/42] Add platform specific codesign script and modifications for Linux and Windows installer packaging (#5893) Signed-off-by: Mike Chang --- cmake/Packaging.cmake | 1 + .../Linux/PackagingCodeSign_linux.cmake | 33 +++++++++++ .../Linux/PackagingPostBuild_linux.cmake | 10 ++-- .../Linux/PackagingPreBuild_linux.cmake | 4 +- .../Platform/Linux/platform_linux_files.cmake | 1 + .../Windows/PackagingCodeSign_windows.cmake | 56 +++++++++++++++++++ .../Windows/PackagingPostBuild_windows.cmake | 48 +--------------- .../Windows/PackagingPreBuild_windows.cmake | 46 +-------------- .../Windows/platform_windows_files.cmake | 1 + .../build/Platform/Linux/build_config.json | 3 + scripts/signer/Platform/Linux/signer.sh | 0 11 files changed, 107 insertions(+), 96 deletions(-) create mode 100644 cmake/Platform/Linux/PackagingCodeSign_linux.cmake create mode 100644 cmake/Platform/Windows/PackagingCodeSign_windows.cmake mode change 100644 => 100755 scripts/signer/Platform/Linux/signer.sh diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index d716efb225..4ba4e750de 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -111,6 +111,7 @@ set(CPACK_STRIP_FILES TRUE) # always strip symbols on packaging set(CPACK_PACKAGE_CHECKSUM SHA256) # Generate checksum file set(CPACK_PRE_BUILD_SCRIPTS ${pal_dir}/PackagingPreBuild_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) set(CPACK_POST_BUILD_SCRIPTS ${pal_dir}/PackagingPostBuild_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) +set(CPACK_CODESIGN_SCRIPT ${pal_dir}/PackagingCodeSign_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) set(CPACK_LY_PYTHON_CMD ${LY_PYTHON_CMD}) # IMPORTANT: required to be included AFTER setting all property overrides diff --git a/cmake/Platform/Linux/PackagingCodeSign_linux.cmake b/cmake/Platform/Linux/PackagingCodeSign_linux.cmake new file mode 100644 index 0000000000..c4b6375385 --- /dev/null +++ b/cmake/Platform/Linux/PackagingCodeSign_linux.cmake @@ -0,0 +1,33 @@ +# +# 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 +# +# + +function(ly_sign_binaries in_path) + message(STATUS "Executing package signing...") + file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) + unset(_signing_command) + + cmake_path(SET _sign_script "${_root_path}/scripts/signer/Platform/Linux/signer.sh") + + list(APPEND _signing_command + ${_sign_script} + ) + message(STATUS "Signing package files in ${in_path}") + execute_process( + COMMAND ${_signing_command} ${in_path} + RESULT_VARIABLE _signing_result + ERROR_VARIABLE _signing_errors + OUTPUT_VARIABLE _signing_output + ECHO_OUTPUT_VARIABLE + ) + + if(NOT ${_signing_result} EQUAL 0) + message(FATAL_ERROR "An error occurred during signing files. ${_signing_errors}") + else() + message(STATUS "Signing complete!") + endif() +endfunction() diff --git a/cmake/Platform/Linux/PackagingPostBuild_linux.cmake b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake index d92ee908fd..ebeefe3833 100644 --- a/cmake/Platform/Linux/PackagingPostBuild_linux.cmake +++ b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake @@ -8,6 +8,7 @@ file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) file(${CPACK_PACKAGE_CHECKSUM} ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb file_checksum) file(WRITE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb.sha256 "${file_checksum} ${CPACK_PACKAGE_FILE_NAME}.deb") @@ -19,6 +20,10 @@ if(CPACK_UPLOAD_URL) set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads) endif() + # Sign and regenerate checksum + ly_sign_binaries("${CPACK_TOPLEVEL_DIRECTORY}/*.deb" "") + file(WRITE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb.sha256 "${file_checksum} ${CPACK_PACKAGE_FILE_NAME}.deb") + # Copy the artifacts intended to be uploaded to a remote server into the folder specified # through CPACK_UPLOAD_DIRECTORY. This mimics the same process cpack does natively for # some other frameworks that have built-in online installer support. @@ -27,14 +32,13 @@ if(CPACK_UPLOAD_URL) file(GLOB _artifacts "${CPACK_TOPLEVEL_DIRECTORY}/*.deb" "${CPACK_TOPLEVEL_DIRECTORY}/*.sha256" + "${LY_ROOT_FOLDER}/scripts/signer/Platform/Linux/*.gpg" ) file(COPY ${_artifacts} DESTINATION ${CPACK_UPLOAD_DIRECTORY} ) message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}") - # TODO: copy gpg file to CPACK_UPLOAD_DIRECTORY - ly_upload_to_url( ${CPACK_UPLOAD_URL} ${CPACK_UPLOAD_DIRECTORY} @@ -51,8 +55,6 @@ if(CPACK_UPLOAD_URL) ${latest_deb_package} ) ly_upload_to_latest(${CPACK_UPLOAD_URL} ${latest_deb_package}) - - # TODO: upload gpg file to latest # Generate a checksum file for latest and upload it set(latest_hash_file "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb.sha256") diff --git a/cmake/Platform/Linux/PackagingPreBuild_linux.cmake b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake index 31dc393307..39108355ea 100644 --- a/cmake/Platform/Linux/PackagingPreBuild_linux.cmake +++ b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake @@ -9,8 +9,6 @@ file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) -if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package +if(NOT CPACK_UPLOAD_URL) # Skip this step if we are not uploading the package return() endif() - -# TODO: do signing diff --git a/cmake/Platform/Linux/platform_linux_files.cmake b/cmake/Platform/Linux/platform_linux_files.cmake index d30959b8d2..dd10c47ca6 100644 --- a/cmake/Platform/Linux/platform_linux_files.cmake +++ b/cmake/Platform/Linux/platform_linux_files.cmake @@ -18,6 +18,7 @@ set(FILES LYTestWrappers_linux.cmake LYWrappers_linux.cmake Packaging_linux.cmake + PackagingCodeSign_linux.cmake PackagingPostBuild_linux.cmake PackagingPreBuild_linux.cmake PAL_linux.cmake diff --git a/cmake/Platform/Windows/PackagingCodeSign_windows.cmake b/cmake/Platform/Windows/PackagingCodeSign_windows.cmake new file mode 100644 index 0000000000..8ef7f79e40 --- /dev/null +++ b/cmake/Platform/Windows/PackagingCodeSign_windows.cmake @@ -0,0 +1,56 @@ +# +# 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 +# +# + +function(ly_sign_binaries in_path in_path_type) + message(STATUS "Executing package signing...") + file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) + unset(_signing_command) + + cmake_path(SET _sign_script "${_root_path}/scripts/signer/Platform/Windows/signer.ps1") + + find_program(_psiexec_path psexec.exe) + if(_psiexec_path) + list(APPEND _signing_command + ${_psiexec_path} + -accepteula + -nobanner + -s + ) + endif() + + find_program(_powershell_path powershell.exe REQUIRED) + list(APPEND _signing_command + ${_powershell_path} + -NoLogo + -ExecutionPolicy Bypass + -File ${_sign_script} + ) + + # This requires to have a valid local certificate. In continuous integration, these certificates are stored + # in the machine directly. + # You can generate a test certificate to be able to run this in a PowerShell elevated promp with: + # New-SelfSignedCertificate -DnsName foo.o3de.com -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My + # Export-Certificate -Cert (Get-ChildItem Cert:\CurrentUser\My\) -Filepath "c:\selfsigned.crt" + # Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\TrustedPublisher + # Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\Root + + message(STATUS "Signing ${in_path_type} files in ${in_path}") + execute_process( + COMMAND ${_signing_command} -${in_path_type} ${in_path} + RESULT_VARIABLE _signing_result + ERROR_VARIABLE _signing_errors + OUTPUT_VARIABLE _signing_output + ECHO_OUTPUT_VARIABLE + ) + + if(NOT ${_signing_result} EQUAL 0) + message(FATAL_ERROR "An error occurred during signing files for ${in_path_type}. ${_signing_errors}") + else() + message(STATUS "Signing complete!") + endif() +endfunction() diff --git a/cmake/Platform/Windows/PackagingPostBuild_windows.cmake b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake index 0993135c23..10f0f902a3 100644 --- a/cmake/Platform/Windows/PackagingPostBuild_windows.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake @@ -8,6 +8,7 @@ file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) # convert the path to a windows style path using string replace because TO_NATIVE_PATH # only works on real paths @@ -59,39 +60,7 @@ set(_light_command ) if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - file(TO_NATIVE_PATH "${LY_ROOT_FOLDER}/scripts/signer/Platform/Windows/signer.ps1" _sign_script) - - unset(_signing_command) - find_program(_psiexec_path psexec.exe) - if(_psiexec_path) - list(APPEND _signing_command - ${_psiexec_path} - -accepteula - -nobanner - -s - ) - endif() - - find_program(_powershell_path powershell.exe REQUIRED) - list(APPEND _signing_command - ${_powershell_path} - -NoLogo - -ExecutionPolicy Bypass - -File ${_sign_script} - ) - - message(STATUS "Signing package files in ${_cpack_wix_out_dir}") - execute_process( - COMMAND ${_signing_command} -packagePath ${_cpack_wix_out_dir} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE - ) - - if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing package files. ${_signing_errors}") - endif() + ly_sign_binaries("${_cpack_wix_out_dir}" "packagePath") endif() message(STATUS "Creating Bootstrap Installer...") @@ -116,18 +85,7 @@ endif() message(STATUS "Bootstrap installer generated to ${_bootstrap_output_file}") if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - message(STATUS "Signing bootstrap installer in ${_bootstrap_output_file}") - execute_process( - COMMAND ${_signing_command} -bootstrapPath ${_bootstrap_output_file} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE - ) - - if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing bootstrap installer. ${_signing_errors}") - endif() + ly_sign_binaries("${_bootstrap_output_file}" "bootstrapPath") endif() # use the internal default path if somehow not specified from cpack_configure_downloads diff --git a/cmake/Platform/Windows/PackagingPreBuild_windows.cmake b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake index 29995518da..b6b5708a8c 100644 --- a/cmake/Platform/Windows/PackagingPreBuild_windows.cmake +++ b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake @@ -8,53 +8,11 @@ file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) +include(${CPACK_CODESIGN_SCRIPT}) if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package return() endif() -file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) set(_cpack_wix_out_dir ${CPACK_TOPLEVEL_DIRECTORY}) -file(TO_NATIVE_PATH "${_root_path}/scripts/signer/Platform/Windows/signer.ps1" _sign_script) - -unset(_signing_command) -find_program(_psiexec_path psexec.exe) -if(_psiexec_path) - list(APPEND _signing_command - ${_psiexec_path} - -accepteula - -nobanner - -s - ) -endif() - -find_program(_powershell_path powershell.exe REQUIRED) -list(APPEND _signing_command - ${_powershell_path} - -NoLogo - -ExecutionPolicy Bypass - -File ${_sign_script} -) - -# This requires to have a valid local certificate. In continuous integration, these certificates are stored -# in the machine directly. -# You can generate a test certificate to be able to run this in a PowerShell elevated promp with: -# New-SelfSignedCertificate -DnsName foo.o3de.com -Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My -# Export-Certificate -Cert (Get-ChildItem Cert:\CurrentUser\My\) -Filepath "c:\selfsigned.crt" -# Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\TrustedPublisher -# Import-Certificate -FilePath "c:\selfsigned.crt" -Cert Cert:\CurrentUser\Root - -message(STATUS "Signing executable files in ${_cpack_wix_out_dir}") -execute_process( - COMMAND ${_signing_command} -exePath ${_cpack_wix_out_dir} - RESULT_VARIABLE _signing_result - ERROR_VARIABLE _signing_errors - OUTPUT_VARIABLE _signing_output - ECHO_OUTPUT_VARIABLE -) - -if(NOT ${_signing_result} EQUAL 0) - message(FATAL_ERROR "An error occurred during signing executable files. ${_signing_errors}") -else() - message(STATUS "Signing exes complete!") -endif() +ly_sign_binaries("${_cpack_wix_out_dir}" "exePath") \ No newline at end of file diff --git a/cmake/Platform/Windows/platform_windows_files.cmake b/cmake/Platform/Windows/platform_windows_files.cmake index 984d985380..8ad242f842 100644 --- a/cmake/Platform/Windows/platform_windows_files.cmake +++ b/cmake/Platform/Windows/platform_windows_files.cmake @@ -25,6 +25,7 @@ set(FILES PALDetection_windows.cmake Install_windows.cmake Packaging_windows.cmake + PackagingCodeSign_windows.cmake PackagingPostBuild_windows.cmake PackagingPreBuild_windows.cmake Packaging/Bootstrapper.wxs diff --git a/scripts/build/Platform/Linux/build_config.json b/scripts/build/Platform/Linux/build_config.json index db9e2e7b8a..b6fcd5b0ba 100644 --- a/scripts/build/Platform/Linux/build_config.json +++ b/scripts/build/Platform/Linux/build_config.json @@ -230,6 +230,9 @@ "nightly-clean", "nightly-installer" ], + "PIPELINE_ENV":{ + "NODE_LABEL":"linux-707531fc7-packaging" + }, "COMMAND": "build_installer_linux.sh", "PARAMETERS": { "CONFIGURATION": "profile", diff --git a/scripts/signer/Platform/Linux/signer.sh b/scripts/signer/Platform/Linux/signer.sh old mode 100644 new mode 100755 From b897b2084c54627617a8dfd1ebebb3a36ec5576f Mon Sep 17 00:00:00 2001 From: Roman <69218254+amzn-rhhong@users.noreply.github.com> Date: Wed, 1 Dec 2021 20:50:51 -0800 Subject: [PATCH 19/42] BUGFIX improve the start up time of the atom render plugin (#6065) Signed-off-by: rhhong --- .../EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp index 396042c9f6..ef6ff4681a 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportRenderer.cpp @@ -128,6 +128,7 @@ namespace EMStudio m_groundEntity->CreateComponent(AZ::Render::MeshComponentTypeId); m_groundEntity->CreateComponent(AZ::Render::MaterialComponentTypeId); m_groundEntity->CreateComponent(azrtti_typeid()); + m_groundEntity->Init(); m_groundEntity->Activate(); Reinit(); From bdd09a22a349fb5b52eb1fa718a91f09562e3512 Mon Sep 17 00:00:00 2001 From: antonmic <56370189+antonmic@users.noreply.github.com> Date: Wed, 1 Dec 2021 22:19:46 -0800 Subject: [PATCH 20/42] Fixed depth of field for vulkan issue due to missing depth flag and added padding to depth of field view SRG struct Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com> --- .../Common/Assets/Passes/NewDepthOfFieldComposite.pass | 5 +++++ .../Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass b/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass index 522ae78fa5..c96039f159 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/NewDepthOfFieldComposite.pass @@ -11,6 +11,11 @@ "Name": "Depth", "SlotType": "Input", "ScopeAttachmentUsage": "Shader", + "ImageViewDesc": { + "AspectFlags": [ + "Depth" + ] + }, "ShaderImageDimensionsConstant": "m_fullResDimensions" }, { diff --git a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli index 10906ac09b..4006416c12 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/PostProcessing/ViewSrg.azsli @@ -26,6 +26,8 @@ partial ShaderResourceGroup ViewSrg // circle of confusion to screen ratio; float m_cocToScreenRatio; + + float2 PADDING; }; DepthOfFieldData m_dof; From bd1c8ec96165da04e202f3dd74abde688195bf0d Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Thu, 2 Dec 2021 01:28:29 -0800 Subject: [PATCH 21/42] chore: remove duplicate instance of FancyDockingDropZoneConstants (#5827) * chore: remove duplicate instance of FancyDockingDropZoneConstants Signed-off-by: Michael Pollind * chore: move to namespace Signed-off-by: Michael Pollind --- .../Components/FancyDocking.cpp | 43 +++++++++---------- .../Components/FancyDockingDropZoneWidget.cpp | 34 +++------------ .../Components/FancyDockingDropZoneWidget.h | 37 +++++++--------- 3 files changed, 44 insertions(+), 70 deletions(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index af902f97a0..7e78f64778 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -53,7 +53,6 @@ static void OptimizedSetParent(QWidget* widget, QWidget* parent) namespace AzQtComponents { - static const FancyDockingDropZoneConstants g_FancyDockingConstants; // Constant for the threshold in pixels for snapping to edges while dragging for docking static const int g_snapThresholdInPixels = 15; @@ -155,7 +154,7 @@ namespace AzQtComponents // Timer for updating our hovered drop zone opacity QObject::connect(m_dropZoneHoverFadeInTimer, &QTimer::timeout, this, &FancyDocking::onDropZoneHoverFadeInUpdate); - m_dropZoneHoverFadeInTimer->setInterval(g_FancyDockingConstants.dropZoneHoverFadeUpdateIntervalMS); + m_dropZoneHoverFadeInTimer->setInterval(FancyDockingDropZoneConstants::dropZoneHoverFadeUpdateIntervalMS); QIcon dragIcon = QIcon(QStringLiteral(":/Cursors/Grabbing.svg")); m_dragCursor = QCursor(dragIcon.pixmap(16), 5, 2); } @@ -333,13 +332,13 @@ namespace AzQtComponents */ void FancyDocking::onDropZoneHoverFadeInUpdate() { - const qreal dropZoneHoverOpacity = g_FancyDockingConstants.dropZoneHoverFadeIncrement + m_dropZoneState.dropZoneHoverOpacity(); + const qreal dropZoneHoverOpacity = FancyDockingDropZoneConstants::dropZoneHoverFadeIncrement + m_dropZoneState.dropZoneHoverOpacity(); // Once we've reached the full drop zone opacity, cut it off in case we // went over and stop the timer - if (dropZoneHoverOpacity >= g_FancyDockingConstants.dropZoneOpacity) + if (dropZoneHoverOpacity >= FancyDockingDropZoneConstants::dropZoneOpacity) { - m_dropZoneState.setDropZoneHoverOpacity(g_FancyDockingConstants.dropZoneOpacity); + m_dropZoneState.setDropZoneHoverOpacity(FancyDockingDropZoneConstants::dropZoneOpacity); m_dropZoneHoverFadeInTimer->stop(); } else @@ -792,12 +791,12 @@ namespace AzQtComponents QPoint mainWindowTopLeft = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.topLeft())); QPoint mainWindowTopRight = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.topRight())); QPoint mainWindowBottomLeft = multiscreenMapFromGlobal(mainWindow->mapToGlobal(mainWindowRect.bottomLeft())); - QSize absoluteLeftRightSize(g_FancyDockingConstants.absoluteDropZoneSizeInPixels, mainWindowRect.height()); + QSize absoluteLeftRightSize(FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels, mainWindowRect.height()); QRect absoluteLeftDropZone(mainWindowTopLeft, absoluteLeftRightSize); - QRect absoluteRightDropZone(mainWindowTopRight - QPoint(g_FancyDockingConstants.absoluteDropZoneSizeInPixels, 0), absoluteLeftRightSize); - QSize absoluteTopBottomSize(mainWindowRect.width(), g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + QRect absoluteRightDropZone(mainWindowTopRight - QPoint(FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels, 0), absoluteLeftRightSize); + QSize absoluteTopBottomSize(mainWindowRect.width(), FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); QRect absoluteTopDropZone(mainWindowTopLeft, absoluteTopBottomSize); - QRect absoluteBottomDropZone(mainWindowBottomLeft - QPoint(0, g_FancyDockingConstants.absoluteDropZoneSizeInPixels), absoluteTopBottomSize); + QRect absoluteBottomDropZone(mainWindowBottomLeft - QPoint(0, FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels), absoluteTopBottomSize); // If the drop target is a main window, then we will only show the absolute // drop zone if the cursor is in that zone already @@ -986,16 +985,16 @@ namespace AzQtComponents switch (m_dropZoneState.absoluteDropZoneArea()) { case Qt::LeftDockWidgetArea: - dockRect.setX(dockRect.x() + g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setX(dockRect.x() + FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::RightDockWidgetArea: - dockRect.setWidth(dockRect.width() - g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setWidth(dockRect.width() - FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::TopDockWidgetArea: - dockRect.setY(dockRect.y() + g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setY(dockRect.y() + FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; case Qt::BottomDockWidgetArea: - dockRect.setHeight(dockRect.height() - g_FancyDockingConstants.absoluteDropZoneSizeInPixels); + dockRect.setHeight(dockRect.height() - FancyDockingDropZoneConstants::absoluteDropZoneSizeInPixels); break; } @@ -1034,15 +1033,15 @@ namespace AzQtComponents // Set the drop zone width/height to the default, but if the dock widget // width and/or height is below the threshold, then switch to scaling them // down accordingly - int dropZoneWidth = g_FancyDockingConstants.dropZoneSizeInPixels; - if (dockWidth < g_FancyDockingConstants.minDockSizeBeforeDropZoneScalingInPixels) + int dropZoneWidth = FancyDockingDropZoneConstants::dropZoneSizeInPixels; + if (dockWidth < FancyDockingDropZoneConstants::minDockSizeBeforeDropZoneScalingInPixels) { - dropZoneWidth = aznumeric_cast(dockWidth * g_FancyDockingConstants.dropZoneScaleFactor); + dropZoneWidth = aznumeric_cast(dockWidth * FancyDockingDropZoneConstants::dropZoneScaleFactor); } - int dropZoneHeight = g_FancyDockingConstants.dropZoneSizeInPixels; - if (dockHeight < g_FancyDockingConstants.minDockSizeBeforeDropZoneScalingInPixels) + int dropZoneHeight = FancyDockingDropZoneConstants::dropZoneSizeInPixels; + if (dockHeight < FancyDockingDropZoneConstants::minDockSizeBeforeDropZoneScalingInPixels) { - dropZoneHeight = aznumeric_cast(dockHeight * g_FancyDockingConstants.dropZoneScaleFactor); + dropZoneHeight = aznumeric_cast(dockHeight * FancyDockingDropZoneConstants::dropZoneScaleFactor); } // Calculate the inner corners to be used when constructing the drop zone polygons @@ -1078,7 +1077,7 @@ namespace AzQtComponents int innerDropZoneWidth = m_dropZoneState.innerDropZoneRect().width(); int innerDropZoneHeight = m_dropZoneState.innerDropZoneRect().height(); int centerDropZoneDiameter = (innerDropZoneWidth < innerDropZoneHeight) ? innerDropZoneWidth : innerDropZoneHeight; - centerDropZoneDiameter = aznumeric_cast(centerDropZoneDiameter * g_FancyDockingConstants.centerTabDropZoneScale); + centerDropZoneDiameter = aznumeric_cast(centerDropZoneDiameter * FancyDockingDropZoneConstants::centerTabDropZoneScale); // Setup our center tab drop zone const QSize centerDropZoneSize(centerDropZoneDiameter, centerDropZoneDiameter); @@ -1986,7 +1985,7 @@ namespace AzQtComponents // hasn't faded in all the way yet, then ignore the drop zone area // which will make the widget floating bool modifiedKeyPressed = FancyDockingDropZoneWidget::CheckModifierKey(); - if (modifiedKeyPressed || m_dropZoneState.dropZoneHoverOpacity() != g_FancyDockingConstants.dropZoneOpacity) + if (modifiedKeyPressed || m_dropZoneState.dropZoneHoverOpacity() != FancyDockingDropZoneConstants::dropZoneOpacity) { area = Qt::NoDockWidgetArea; } @@ -3026,7 +3025,7 @@ namespace AzQtComponents { bool modifiedKeyPressed = FancyDockingDropZoneWidget::CheckModifierKey(); - m_ghostWidget->setWindowOpacity(modifiedKeyPressed ? 1.0f : g_FancyDockingConstants.draggingDockWidgetOpacity); + m_ghostWidget->setWindowOpacity(modifiedKeyPressed ? 1.0f : FancyDockingDropZoneConstants::draggingDockWidgetOpacity); m_ghostWidget->setPixmap(m_state.dockWidgetScreenGrab.screenGrab, m_state.placeholder(), m_state.placeholderScreen()); } } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp index 1451094ea1..3873f0389b 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.cpp @@ -19,26 +19,6 @@ namespace AzQtComponents { - static const FancyDockingDropZoneConstants g_Constants; - - FancyDockingDropZoneConstants::FancyDockingDropZoneConstants() - { - draggingDockWidgetOpacity = 0.6; - dropZoneOpacity = 0.4; - dropZoneSizeInPixels = 40; - minDockSizeBeforeDropZoneScalingInPixels = dropZoneSizeInPixels * 3; - dropZoneScaleFactor = 0.25; - centerTabDropZoneScale = 0.5; - centerTabIconScale = 0.5; - dropZoneColor = QColor(155, 155, 155); - dropZoneBorderColor = Qt::black; - dropZoneBorderInPixels = 1; - absoluteDropZoneSizeInPixels = 25; - dockingTargetDelayMS = 110; - dropZoneHoverFadeUpdateIntervalMS = 20; - dropZoneHoverFadeIncrement = dropZoneOpacity / (dockingTargetDelayMS / dropZoneHoverFadeUpdateIntervalMS); - centerDropZoneIconPath = QString(":/stylesheet/img/UI20/docking/tabs_icon.svg"); - } FancyDockingDropZoneWidget::FancyDockingDropZoneWidget(QMainWindow* mainWindow, QWidget* coordinatesRelativeTo, QScreen* screen, FancyDockingDropZoneState* dropZoneState) // NOTE: this will not work with multiple monitors if this widget has a parent. The floating drop zone @@ -154,7 +134,7 @@ namespace AzQtComponents // Draw all of the normal drop zones if they exist (if a dock widget is hovered over) painter.setPen(Qt::NoPen); - painter.setOpacity(g_Constants.dropZoneOpacity); + painter.setOpacity(FancyDockingDropZoneConstants::dropZoneOpacity); auto dropZones = m_dropZoneState->dropZones(); for (auto it = dropZones.cbegin(); it != dropZones.cend(); ++it) { @@ -189,7 +169,7 @@ namespace AzQtComponents // Otherwise, set the normal color else { - painter.setBrush(g_Constants.dropZoneColor); + painter.setBrush(FancyDockingDropZoneConstants::dropZoneColor); } // negate the window position to offset everything by that much @@ -214,8 +194,8 @@ namespace AzQtComponents // Scale the tabs icon based on the drop zone size and our specified offset // Doing this through QIcon to make sure that SVG is rendered already in desired resolution const QSize& dropZoneSize = dropZoneRect.size(); - const QSize requestedIconSize = dropZoneSize * g_Constants.centerTabIconScale; - const QIcon dropZoneIcon = QIcon(g_Constants.centerDropZoneIconPath); + const QSize requestedIconSize = dropZoneSize * FancyDockingDropZoneConstants::centerTabIconScale; + const QIcon dropZoneIcon = QIcon(FancyDockingDropZoneConstants::centerDropZoneIconPath); const QPixmap dropZonePixmap = dropZoneIcon.pixmap(requestedIconSize); const QSize receivedIconSize = dropZoneIcon.actualSize(requestedIconSize); @@ -264,7 +244,7 @@ namespace AzQtComponents } else { - painter.setBrush(g_Constants.dropZoneColor); + painter.setBrush(FancyDockingDropZoneConstants::dropZoneColor); } painter.drawRect(absoluteDropZoneRect); @@ -313,8 +293,8 @@ namespace AzQtComponents const QPoint innerBottomRight = innerDropZoneRect.bottomRight(); // Draw the lines using the appropriate pen - QPen dropZoneBorderPen(g_Constants.dropZoneBorderColor); - dropZoneBorderPen.setWidth(g_Constants.dropZoneBorderInPixels); + QPen dropZoneBorderPen(FancyDockingDropZoneConstants::dropZoneBorderColor); + dropZoneBorderPen.setWidth(FancyDockingDropZoneConstants::dropZoneBorderInPixels); painter.setPen(dropZoneBorderPen); painter.setOpacity(1); painter.drawLine(topLeft, innerTopLeft); diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h index 94a6792833..865adcea59 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDockingDropZoneWidget.h @@ -28,63 +28,58 @@ class QPainter; namespace AzQtComponents { - struct AZ_QT_COMPONENTS_API FancyDockingDropZoneConstants + namespace FancyDockingDropZoneConstants { // Constant for the opacity of the screen grab for the dock widget being dragged - qreal draggingDockWidgetOpacity; + static constexpr qreal draggingDockWidgetOpacity = 0.6; // Constant for the opacity of the normal drop zones - qreal dropZoneOpacity; + static constexpr qreal dropZoneOpacity = 0.4; // Constant for the default drop zone size (in pixels) - int dropZoneSizeInPixels; + static constexpr int dropZoneSizeInPixels = 40; // Constant for the dock width/height size (in pixels) before we need to start // scaling down the drop zone sizes, or else they will overlap with the center // tab icon or each other - int minDockSizeBeforeDropZoneScalingInPixels; + static constexpr int minDockSizeBeforeDropZoneScalingInPixels = dropZoneSizeInPixels * 3; // Constant for the factor by which we must scale down the drop zone sizes once // the dock width/height size is too small - qreal dropZoneScaleFactor; + static constexpr qreal dropZoneScaleFactor = 0.25; // Constant for the percentage to scale down the inner drop zone rectangle for the center tab drop zone - qreal centerTabDropZoneScale; + static constexpr qreal centerTabDropZoneScale = 0.5; // Constant for the percentage to scale down the center tab drop zone for the center tab icon - qreal centerTabIconScale; + static constexpr qreal centerTabIconScale = 0.5; // Constant for the drop zone hotspot default color - QColor dropZoneColor; + static const QColor dropZoneColor = QColor(155, 155, 155); // Constant for the drop zone border color - QColor dropZoneBorderColor; + static const QColor dropZoneBorderColor = Qt::black; // Constant for the border width in pixels separating the drop zones - int dropZoneBorderInPixels; + static constexpr int dropZoneBorderInPixels = 1; // Constant for the border width in pixels separating the drop zones - int absoluteDropZoneSizeInPixels; + static constexpr int absoluteDropZoneSizeInPixels = 25; // Constant for the delay (in milliseconds) before a drop zone becomes active // once it is hovered over - int dockingTargetDelayMS; + static constexpr int dockingTargetDelayMS = 110; // Constant for the rate at which we will update (fade in) the drop zone opacity // when hovered over (in milliseconds) - int dropZoneHoverFadeUpdateIntervalMS; + static constexpr int dropZoneHoverFadeUpdateIntervalMS = 20; // Constant for the incremental opacity increase for the hovered drop zone // that will fade in to the full drop zone opacity in the desired time - qreal dropZoneHoverFadeIncrement; + static constexpr qreal dropZoneHoverFadeIncrement = dropZoneOpacity / (dockingTargetDelayMS / dropZoneHoverFadeUpdateIntervalMS); // Constant for the path to the center drop zone tabs icon - QString centerDropZoneIconPath; - - FancyDockingDropZoneConstants(); - - FancyDockingDropZoneConstants(const FancyDockingDropZoneConstants&) = delete; - FancyDockingDropZoneConstants& operator=(const FancyDockingDropZoneConstants&) = delete; + static const QString centerDropZoneIconPath = QStringLiteral(":/stylesheet/img/UI20/docking/tabs_icon.svg"); }; class FancyDockingDropZoneState From 625fca71ab6cf36674b5262bf32e60b216fb7ff2 Mon Sep 17 00:00:00 2001 From: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com> Date: Thu, 2 Dec 2021 21:39:28 +0530 Subject: [PATCH 22/42] Prefab/unit tests for deletion (#6034) * Added tests for deleting entity under level and other prefabs Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com> * Added class comments and improved variable names Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com> * Called the reflect function of PrefabFocusHandler from PrefabSystemComponent Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com> * Added couple of unit tests around entity and prefab deletion Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com> * Used engine root path from settings registry as fake path for prefab creation Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com> * Added 2 unit tests around deleting prefabs Signed-off-by: srikappa-amzn <82230713+srikappa-amzn@users.noreply.github.com> --- .../Prefab/PrefabPublicHandler.cpp | 25 ++- .../Tests/Prefab/PrefabDeleteTests.cpp | 150 ++++++++++++++++++ .../Tests/Prefab/PrefabTestFixture.cpp | 14 ++ .../Tests/Prefab/PrefabTestFixture.h | 4 + .../Tests/UI/EntityOutlinerTests.cpp | 2 +- .../Tests/aztoolsframeworktests_files.cmake | 1 + 6 files changed, 181 insertions(+), 15 deletions(-) create mode 100644 Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp index 1640ac1017..e5530b49f4 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp @@ -521,21 +521,18 @@ namespace AzToolsFramework nestedInstanceLink.has_value(), "A valid link was not found for one of the instances provided as input for the CreatePrefab operation."); - PrefabDomReference nestedInstanceLinkDom = nestedInstanceLink->get().GetLinkDom(); - AZ_Assert( - nestedInstanceLinkDom.has_value(), - "A valid DOM was not found for the link corresponding to one of the instances provided as input for the " - "CreatePrefab operation."); - - PrefabDomValueReference nestedInstanceLinkPatches = - PrefabDomUtils::FindPrefabDomValue(nestedInstanceLinkDom->get(), PrefabDomUtils::PatchesName); - AZ_Assert( - nestedInstanceLinkPatches.has_value(), - "A valid DOM for patches was not found for the link corresponding to one of the instances provided as input for the " - "CreatePrefab operation."); - PrefabDom patchesCopyForUndoSupport; - patchesCopyForUndoSupport.CopyFrom(nestedInstanceLinkPatches->get(), patchesCopyForUndoSupport.GetAllocator()); + PrefabDomReference nestedInstanceLinkDom = nestedInstanceLink->get().GetLinkDom(); + if (nestedInstanceLinkDom.has_value()) + { + PrefabDomValueReference nestedInstanceLinkPatches = + PrefabDomUtils::FindPrefabDomValue(nestedInstanceLinkDom->get(), PrefabDomUtils::PatchesName); + if (nestedInstanceLinkPatches.has_value()) + { + patchesCopyForUndoSupport.CopyFrom(nestedInstanceLinkPatches->get(), patchesCopyForUndoSupport.GetAllocator()); + } + } + PrefabUndoHelpers::RemoveLink( sourceInstance->GetTemplateId(), targetTemplateId, sourceInstance->GetInstanceAlias(), sourceInstance->GetLinkId(), AZStd::move(patchesCopyForUndoSupport), undoBatch); diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp new file mode 100644 index 0000000000..0ef328b2ca --- /dev/null +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabDeleteTests.cpp @@ -0,0 +1,150 @@ +/* + * 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 + * + */ + +#include +#include +#include + +#include +#include +#include + +namespace UnitTest +{ + using PrefabDeleteTest = PrefabTestFixture; + + TEST_F(PrefabDeleteTest, DeleteEntitiesInInstance_DeleteSingleEntitySucceeds) + { + PrefabEntityResult createEntityResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created. + AZ::EntityId testEntityId = createEntityResult.GetValue(); + ASSERT_TRUE(testEntityId.IsValid()); + AZ::Entity* testEntity = AzToolsFramework::GetEntityById(testEntityId); + ASSERT_TRUE(testEntity != nullptr); + + m_prefabPublicInterface->DeleteEntitiesInInstance(AzToolsFramework::EntityIdList{ testEntityId }); + + // Verify that entity can't be found after deletion. + testEntity = AzToolsFramework::GetEntityById(testEntityId); + EXPECT_TRUE(testEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesInInstance_DeleteSinglePrefabSucceeds) + { + PrefabEntityResult createEntityResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created. + AZ::EntityId createdEntityId = createEntityResult.GetValue(); + ASSERT_TRUE(createdEntityId.IsValid()); + AZ::Entity* createdEntity = AzToolsFramework::GetEntityById(createdEntityId); + ASSERT_TRUE(createdEntity != nullptr); + + // Rather than hardcode a path, use a path from settings registry since that will work on all platforms. + AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); + AZ::IO::FixedMaxPath path; + registry->Get(path.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + CreatePrefabResult createPrefabResult = + m_prefabPublicInterface->CreatePrefabInMemory(AzToolsFramework::EntityIdList{ createdEntityId }, path); + + AZ::EntityId createdPrefabContainerId = createPrefabResult.GetValue(); + ASSERT_TRUE(createdPrefabContainerId.IsValid()); + AZ::Entity* prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + ASSERT_TRUE(prefabContainerEntity != nullptr); + + // Verify that the prefab container entity and the entity within are deleted. + m_prefabPublicInterface->DeleteEntitiesInInstance(AzToolsFramework::EntityIdList{ createdPrefabContainerId }); + prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + EXPECT_TRUE(prefabContainerEntity == nullptr); + createdEntity = AzToolsFramework::GetEntityById(createdEntityId); + EXPECT_TRUE(createdEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesAndAllDescendantsInInstance_DeletingEntityDeletesChildEntityToo) + { + PrefabEntityResult parentEntityCreationResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that valid parent entity is created. + AZ::EntityId parentEntityId = parentEntityCreationResult.GetValue(); + ASSERT_TRUE(parentEntityId.IsValid()); + AZ::Entity* parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity != nullptr); + + // Verify that valid child entity is created. + PrefabEntityResult childEntityCreationResult = m_prefabPublicInterface->CreateEntity(parentEntityId, AZ::Vector3()); + AZ::EntityId childEntityId = childEntityCreationResult.GetValue(); + ASSERT_TRUE(childEntityId.IsValid()); + AZ::Entity* childEntity = AzToolsFramework::GetEntityById(childEntityId); + ASSERT_TRUE(childEntity != nullptr); + + // PrefabTestFixture won't add required editor components by default. Hence we add them here. + AddRequiredEditorComponents(childEntity); + AddRequiredEditorComponents(parentEntity); + + // Parent the child entity under the parent entity. + AZ::TransformBus::Event(childEntityId, &AZ::TransformBus::Events::SetParent, parentEntityId); + + // Delete parent entity and its children. + m_prefabPublicInterface->DeleteEntitiesAndAllDescendantsInInstance(AzToolsFramework::EntityIdList{ parentEntityId }); + + // Verify that both the parent and child entities are deleted. + parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + EXPECT_TRUE(parentEntity == nullptr); + childEntity = AzToolsFramework::GetEntityById(childEntityId); + EXPECT_TRUE(childEntity == nullptr); + } + + TEST_F(PrefabDeleteTest, DeleteEntitiesAndAllDescendantsInInstance_DeletingEntityDeletesChildPrefabToo) + { + PrefabEntityResult entityToBePutUnderPrefabResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + + // Verify that a valid entity is created that will be put in a prefab later. + AZ::EntityId entityToBePutUnderPrefabId = entityToBePutUnderPrefabResult.GetValue(); + ASSERT_TRUE(entityToBePutUnderPrefabId.IsValid()); + AZ::Entity* entityToBePutUnderPrefab = AzToolsFramework::GetEntityById(entityToBePutUnderPrefabId); + ASSERT_TRUE(entityToBePutUnderPrefab != nullptr); + + // Verify that a valid parent entity is created. + PrefabEntityResult parentEntityCreationResult = m_prefabPublicInterface->CreateEntity(AZ::EntityId(), AZ::Vector3()); + AZ::EntityId parentEntityId = parentEntityCreationResult.GetValue(); + ASSERT_TRUE(parentEntityId.IsValid()); + AZ::Entity* parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity != nullptr); + + // Rather than hardcode a path, use a path from settings registry since that will work on all platforms. + AZ::SettingsRegistryInterface* registry = AZ::SettingsRegistry::Get(); + AZ::IO::FixedMaxPath path; + registry->Get(path.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder); + CreatePrefabResult createPrefabResult = + m_prefabPublicInterface->CreatePrefabInMemory(AzToolsFramework::EntityIdList{ entityToBePutUnderPrefabId }, path); + + // Verify that a valid prefab container entity is created. + AZ::EntityId createdPrefabContainerId = createPrefabResult.GetValue(); + ASSERT_TRUE(createdPrefabContainerId.IsValid()); + AZ::Entity* prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + ASSERT_TRUE(prefabContainerEntity != nullptr); + + // PrefabTestFixture won't add required editor components by default. Hence we add them here. + AddRequiredEditorComponents(parentEntity); + AddRequiredEditorComponents(prefabContainerEntity); + + // Parent the prefab under the parent entity. + AZ::TransformBus::Event(createdPrefabContainerId, &AZ::TransformBus::Events::SetParent, parentEntityId); + + // Delete the parent entity. + m_prefabPublicInterface->DeleteEntitiesAndAllDescendantsInInstance(AzToolsFramework::EntityIdList{ parentEntityId }); + + // Validate that the parent and the prefab under it and the entity inside the prefab are all deleted. + parentEntity = AzToolsFramework::GetEntityById(parentEntityId); + ASSERT_TRUE(parentEntity == nullptr); + entityToBePutUnderPrefab = AzToolsFramework::GetEntityById(entityToBePutUnderPrefabId); + ASSERT_TRUE(entityToBePutUnderPrefab == nullptr); + prefabContainerEntity = AzToolsFramework::GetEntityById(createdPrefabContainerId); + EXPECT_TRUE(prefabContainerEntity == nullptr); + } +} // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp index ed30de09c4..494f635a9f 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp @@ -57,6 +57,11 @@ namespace UnitTest return AZStd::make_unique("PrefabTestApplication"); } + void PrefabTestFixture::PropagateAllTemplateChanges() + { + m_prefabSystemComponent->OnSystemTick(); + } + AZ::Entity* PrefabTestFixture::CreateEntity(const char* entityName, const bool shouldActivate) { // Circumvent the EntityContext system and generate a new entity with a transformcomponent @@ -125,4 +130,13 @@ namespace UnitTest EXPECT_EQ(entityInInstance->GetState(), AZ::Entity::State::Active); } } + + void PrefabTestFixture::AddRequiredEditorComponents(AZ::Entity* entity) + { + ASSERT_TRUE(entity != nullptr); + entity->Deactivate(); + AzToolsFramework::EditorEntityContextRequestBus::Broadcast( + &AzToolsFramework::EditorEntityContextRequests::AddRequiredComponents, *entity); + entity->Activate(); + } } diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h index 0a78ded1a6..e7fe771610 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h @@ -52,6 +52,8 @@ namespace UnitTest AZStd::unique_ptr CreateTestApplication() override; + void PropagateAllTemplateChanges(); + AZ::Entity* CreateEntity(const char* entityName, const bool shouldActivate = true); void CompareInstances(const Instance& instanceA, const Instance& instanceB, bool shouldCompareLinkIds = true, @@ -62,6 +64,8 @@ namespace UnitTest //! Validates that all entities within a prefab instance are in 'Active' state. void ValidateInstanceEntitiesActive(Instance& instance); + void AddRequiredEditorComponents(AZ::Entity* entity); + PrefabSystemComponent* m_prefabSystemComponent = nullptr; PrefabLoaderInterface* m_prefabLoaderInterface = nullptr; PrefabPublicInterface* m_prefabPublicInterface = nullptr; diff --git a/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp b/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp index 78cdcf9d38..eb7d87fb78 100644 --- a/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp @@ -128,7 +128,7 @@ namespace UnitTest void ProcessDeferredUpdates() { // Force a prefab propagation for updates that are deferred to the next tick. - m_prefabSystemComponent->OnSystemTick(); + PropagateAllTemplateChanges(); // Ensure the model process its entity update queue m_model->ProcessEntityUpdates(); diff --git a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake index b2b50ca7c6..1a8819b188 100644 --- a/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake +++ b/Code/Framework/AzToolsFramework/Tests/aztoolsframeworktests_files.cmake @@ -69,6 +69,7 @@ set(FILES Prefab/PrefabFocus/PrefabFocusTests.cpp Prefab/MockPrefabFileIOActionValidator.cpp Prefab/MockPrefabFileIOActionValidator.h + Prefab/PrefabDeleteTests.cpp Prefab/PrefabDuplicateTests.cpp Prefab/PrefabEntityAliasTests.cpp Prefab/PrefabInstanceToTemplatePropagatorTests.cpp From 0116f0a520cc00df5e52978c7443c454dce0a559 Mon Sep 17 00:00:00 2001 From: SWMasterson Date: Thu, 2 Dec 2021 08:26:56 -0800 Subject: [PATCH 23/42] Adding Macbeth level to AutomatedTesting and converting to Prefab (#6060) * Adding macbeth level to AutomatedTesting Signed-off-by: Sean Masterson * removing unnecessary files Signed-off-by: Sean Masterson --- .../macbeth_shaderballs.prefab | 3401 +++++++++++++++++ .../Levels/macbeth_shaderballs/tags.txt | 12 + .../Presets/MacBeth/00_illuminant.material | 6 +- .../MacBeth/00_illuminant_tex.material | 10 +- .../Presets/MacBeth/01_dark_skin.material | 14 +- .../Presets/MacBeth/01_dark_skin_tex.material | 8 +- .../Presets/MacBeth/02_light_skin.material | 10 +- .../MacBeth/02_light_skin_tex.material | 8 +- .../Presets/MacBeth/03_blue_sky.material | 14 +- .../Presets/MacBeth/03_blue_sky_tex.material | 8 +- .../Presets/MacBeth/04_foliage.material | 12 +- .../Presets/MacBeth/04_foliage_tex.material | 10 +- .../Presets/MacBeth/05_blue_flower.material | 10 +- .../MacBeth/05_blue_flower_tex.material | 10 +- .../Presets/MacBeth/06_bluish_green.material | 12 +- .../MacBeth/06_bluish_green_tex.material | 8 +- .../Presets/MacBeth/07_orange.material | 12 +- .../Presets/MacBeth/07_orange_tex.material | 10 +- .../Presets/MacBeth/08_purplish_blue.material | 12 +- .../MacBeth/08_purplish_blue_tex.material | 8 +- .../Presets/MacBeth/09_moderate_red.material | 10 +- .../MacBeth/09_moderate_red_tex.material | 8 +- .../Presets/MacBeth/10_purple.material | 12 +- .../Presets/MacBeth/10_purple_tex.material | 8 +- .../Presets/MacBeth/11_yellow_green.material | 10 +- .../MacBeth/11_yellow_green_tex.material | 8 +- .../Presets/MacBeth/12_orange_yellow.material | 12 +- .../MacBeth/12_orange_yellow_tex.material | 8 +- .../Presets/MacBeth/13_blue.material | 14 +- .../Presets/MacBeth/13_blue_tex.material | 8 +- .../Presets/MacBeth/14_green.material | 10 +- .../Presets/MacBeth/14_green_tex.material | 8 +- .../Materials/Presets/MacBeth/15_red.material | 14 +- .../Presets/MacBeth/15_red_tex.material | 8 +- .../Presets/MacBeth/16_yellow.material | 10 +- .../Presets/MacBeth/16_yellow_tex.material | 8 +- .../Presets/MacBeth/17_magenta.material | 10 +- .../Presets/MacBeth/17_magenta_tex.material | 8 +- .../Presets/MacBeth/18_cyan.material | 12 +- .../Presets/MacBeth/18_cyan_tex.material | 8 +- .../MacBeth/19_white_9-5_0-05D.material | 10 +- .../MacBeth/19_white_9-5_0-05D_tex.material | 8 +- .../MacBeth/20_neutral_8-0_0-23D.material | 10 +- .../MacBeth/20_neutral_8-0_0-23D_tex.material | 8 +- .../MacBeth/21_neutral_6-5_0-44D.material | 14 +- .../MacBeth/21_neutral_6-5_0-44D_tex.material | 8 +- .../MacBeth/22_neutral_5-0_0-70D.material | 12 +- .../MacBeth/22_neutral_5-0_0-70D_tex.material | 8 +- .../MacBeth/23_neutral_3-5_1-05D.material | 10 +- .../MacBeth/23_neutral_3-5_1-05D_tex.material | 8 +- .../MacBeth/24_black_2-0_1-50D.material | 10 +- .../MacBeth/24_black_2-0_1-50D_tex.material | 8 +- .../macbeth_lab_16bit_2014_sRGB.material | 10 +- 53 files changed, 3663 insertions(+), 250 deletions(-) create mode 100644 AutomatedTesting/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab create mode 100644 AutomatedTesting/Levels/macbeth_shaderballs/tags.txt diff --git a/AutomatedTesting/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab b/AutomatedTesting/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab new file mode 100644 index 0000000000..22504f168a --- /dev/null +++ b/AutomatedTesting/Levels/macbeth_shaderballs/macbeth_shaderballs.prefab @@ -0,0 +1,3401 @@ +{ + "ContainerEntity": { + "Id": "ContainerEntity", + "Name": "macbeth_shaderballs", + "Components": { + "Component_[10182366347512475253]": { + "$type": "EditorPrefabComponent", + "Id": 10182366347512475253 + }, + "Component_[12917798267488243668]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12917798267488243668 + }, + "Component_[3261249813163778338]": { + "$type": "EditorOnlyEntityComponent", + "Id": 3261249813163778338 + }, + "Component_[3837204912784440039]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 3837204912784440039 + }, + "Component_[4272963378099646759]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 4272963378099646759, + "Parent Entity": "" + }, + "Component_[4848458548047175816]": { + "$type": "EditorVisibilityComponent", + "Id": 4848458548047175816 + }, + "Component_[5787060997243919943]": { + "$type": "EditorInspectorComponent", + "Id": 5787060997243919943 + }, + "Component_[7804170251266531779]": { + "$type": "EditorLockComponent", + "Id": 7804170251266531779 + }, + "Component_[7874177159288365422]": { + "$type": "EditorEntitySortComponent", + "Id": 7874177159288365422 + }, + "Component_[8018146290632383969]": { + "$type": "EditorEntityIconComponent", + "Id": 8018146290632383969 + }, + "Component_[8452360690590857075]": { + "$type": "SelectionComponent", + "Id": 8452360690590857075 + } + } + }, + "Entities": { + "Entity_[471076350497]": { + "Id": "Entity_[471076350497]", + "Name": "WorldOrigin", + "Components": { + "Component_[10118378636607282023]": { + "$type": "AZ::Render::EditorImageBasedLightComponent", + "Id": 10118378636607282023, + "Controller": { + "Configuration": { + "diffuseImageAsset": { + "assetId": { + "guid": "{10853039-DC8A-558A-B27E-4433A6386731}", + "subId": 3000 + }, + "assetHint": "lightingpresets/lowcontrast/blouberg_sunrise_1_4k_iblskyboxcm_ibldiffuse.exr.streamingimage" + }, + "specularImageAsset": { + "assetId": { + "guid": "{10853039-DC8A-558A-B27E-4433A6386731}", + "subId": 2000 + }, + "assetHint": "lightingpresets/lowcontrast/blouberg_sunrise_1_4k_iblskyboxcm_iblspecular.exr.streamingimage" + }, + "exposure": 1.0 + } + } + }, + "Component_[10390989140659450689]": { + "$type": "EditorInspectorComponent", + "Id": 10390989140659450689, + "ComponentOrderEntryArray": [ + { + "ComponentId": 6066687697346848609 + }, + { + "ComponentId": 1538992203183232042, + "SortIndex": 1 + }, + { + "ComponentId": 10118378636607282023, + "SortIndex": 2 + } + ] + }, + "Component_[1122756123782465575]": { + "$type": "EditorLockComponent", + "Id": 1122756123782465575 + }, + "Component_[1411541685315998773]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1411541685315998773 + }, + "Component_[1538992203183232042]": { + "$type": "AZ::Render::EditorGridComponent", + "Id": 1538992203183232042 + }, + "Component_[16871442125196328877]": { + "$type": "EditorEntitySortComponent", + "Id": 16871442125196328877, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[604220336673]" + }, + { + "EntityId": "Entity_[599925369377]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[475371317793]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[509731056161]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[505436088865]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[539795827233]", + "SortIndex": 5 + }, + { + "EntityId": "Entity_[569860598305]", + "SortIndex": 6 + } + ] + }, + "Component_[18389136819207633744]": { + "$type": "SelectionComponent", + "Id": 18389136819207633744 + }, + "Component_[2967708543517171475]": { + "$type": "EditorEntityIconComponent", + "Id": 2967708543517171475 + }, + "Component_[6066687697346848609]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 6066687697346848609, + "Parent Entity": "ContainerEntity" + }, + "Component_[7035058231756199033]": { + "$type": "EditorVisibilityComponent", + "Id": 7035058231756199033 + }, + "Component_[7861798362721154905]": { + "$type": "EditorOnlyEntityComponent", + "Id": 7861798362721154905 + }, + "Component_[8535986786667781968]": { + "$type": "EditorPendingCompositionComponent", + "Id": 8535986786667781968 + } + } + }, + "Entity_[475371317793]": { + "Id": "Entity_[475371317793]", + "Name": "00_Illuminant", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{29C7358C-9899-56DF-8F99-F654C7138DB8}" + }, + "assetHint": "materials/presets/macbeth/00_illuminant.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + -0.020035700872540474, + 10.880657196044922, + 1.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[479666285089]": { + "Id": "Entity_[479666285089]", + "Name": "09_moderate_red", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{FD3D09E1-9B20-5761-87A2-388ADD3C966A}" + }, + "assetHint": "materials/presets/macbeth/09_moderate_red.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[483961252385]": { + "Id": "Entity_[483961252385]", + "Name": "08_purplish_blue", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{0478869F-5E19-5A5C-AA22-0D31972E83B7}" + }, + "assetHint": "materials/presets/macbeth/08_purplish_blue.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[488256219681]": { + "Id": "Entity_[488256219681]", + "Name": "07_orange", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{3E414822-FF6A-5A79-BF1A-66F4C48C381D}" + }, + "assetHint": "materials/presets/macbeth/07_orange.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[492551186977]": { + "Id": "Entity_[492551186977]", + "Name": "10_purple", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6A0A0CBE-FE95-5732-B2A9-442ABAC6B3AA}" + }, + "assetHint": "materials/presets/macbeth/10_purple.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[496846154273]": { + "Id": "Entity_[496846154273]", + "Name": "11_yellowish_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{8D382D9F-D56E-523E-8372-C372B002B81D}" + }, + "assetHint": "materials/presets/macbeth/11_yellow_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[501141121569]": { + "Id": "Entity_[501141121569]", + "Name": "12_orange_yellow", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{7C8D9C96-8D79-5AA5-9A1D-DE68760127D7}" + }, + "assetHint": "materials/presets/macbeth/12_orange_yellow.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[505436088865]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[505436088865]": { + "Id": "Entity_[505436088865]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[488256219681]" + }, + { + "EntityId": "Entity_[483961252385]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[479666285089]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[492551186977]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[496846154273]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[501141121569]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 2.0, + 1.0 + ] + } + } + } + }, + "Entity_[509731056161]": { + "Id": "Entity_[509731056161]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[522615958049]" + }, + { + "EntityId": "Entity_[518320990753]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[514026023457]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[526910925345]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[531205892641]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[535500859937]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 6.0, + 1.0 + ] + } + } + } + }, + "Entity_[514026023457]": { + "Id": "Entity_[514026023457]", + "Name": "03_blue_sky", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{65DF9715-8D50-5852-BDDF-345BF9A36AAF}" + }, + "assetHint": "materials/presets/macbeth/03_blue_sky.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[518320990753]": { + "Id": "Entity_[518320990753]", + "Name": "02_light_skin", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{0B0603C9-E7C3-5166-98EC-F8B3A4D469FB}" + }, + "assetHint": "materials/presets/macbeth/02_light_skin.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[522615958049]": { + "Id": "Entity_[522615958049]", + "Name": "01_dark_skin", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{73B6CE55-0766-51FD-8D9C-92C60862D270}" + }, + "assetHint": "materials/presets/macbeth/01_dark_skin.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[526910925345]": { + "Id": "Entity_[526910925345]", + "Name": "04_foliage", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{C11C560D-F984-5836-928A-45CF96179862}" + }, + "assetHint": "materials/presets/macbeth/04_foliage.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[531205892641]": { + "Id": "Entity_[531205892641]", + "Name": "05_blue_flower", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{3326A6D9-FEA4-5CDE-AE4A-8BD28DF3A7CA}" + }, + "assetHint": "materials/presets/macbeth/05_blue_flower.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[535500859937]": { + "Id": "Entity_[535500859937]", + "Name": "06_bluish_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{BD7A8B80-242E-50CC-900F-9001945C5A0C}" + }, + "assetHint": "materials/presets/macbeth/06_bluish_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[509731056161]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[539795827233]": { + "Id": "Entity_[539795827233]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[552680729121]" + }, + { + "EntityId": "Entity_[548385761825]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[544090794529]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[556975696417]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[561270663713]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[565565631009]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + -2.0, + 1.0 + ] + } + } + } + }, + "Entity_[544090794529]": { + "Id": "Entity_[544090794529]", + "Name": "15_red", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{9C47066E-BD8F-5C1B-B935-933296BBE312}" + }, + "assetHint": "materials/presets/macbeth/15_red.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[548385761825]": { + "Id": "Entity_[548385761825]", + "Name": "14_green", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{82346ED7-D369-5EF0-A7E0-70C1082EE073}" + }, + "assetHint": "materials/presets/macbeth/14_green.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[552680729121]": { + "Id": "Entity_[552680729121]", + "Name": "13_blue", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{B8972ADB-DBA9-5807-9742-2B14453FDD96}" + }, + "assetHint": "materials/presets/macbeth/13_blue.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[556975696417]": { + "Id": "Entity_[556975696417]", + "Name": "16_yellow", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{099BB2A1-F76E-5B77-BCFD-B0A6249F0EA3}" + }, + "assetHint": "materials/presets/macbeth/16_yellow.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[561270663713]": { + "Id": "Entity_[561270663713]", + "Name": "17_magenta", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{2A83451E-0FE6-508E-BAA2-6142AAA53C42}" + }, + "assetHint": "materials/presets/macbeth/17_magenta.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[565565631009]": { + "Id": "Entity_[565565631009]", + "Name": "18_cyan", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6949B983-05D6-50A4-9D43-A6CDAB2BF3F5}" + }, + "assetHint": "materials/presets/macbeth/18_cyan.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[539795827233]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[569860598305]": { + "Id": "Entity_[569860598305]", + "Name": "Row", + "Components": { + "Component_[10247332857034196288]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 10247332857034196288 + }, + "Component_[1050259146293298025]": { + "$type": "EditorOnlyEntityComponent", + "Id": 1050259146293298025 + }, + "Component_[10963468433108777551]": { + "$type": "EditorInspectorComponent", + "Id": 10963468433108777551, + "ComponentOrderEntryArray": [ + { + "ComponentId": 5648156935684358836 + } + ] + }, + "Component_[11044618010943237536]": { + "$type": "EditorEntityIconComponent", + "Id": 11044618010943237536 + }, + "Component_[11056805018150955063]": { + "$type": "EditorEntitySortComponent", + "Id": 11056805018150955063, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "Entity_[582745500193]" + }, + { + "EntityId": "Entity_[578450532897]", + "SortIndex": 1 + }, + { + "EntityId": "Entity_[574155565601]", + "SortIndex": 2 + }, + { + "EntityId": "Entity_[587040467489]", + "SortIndex": 3 + }, + { + "EntityId": "Entity_[591335434785]", + "SortIndex": 4 + }, + { + "EntityId": "Entity_[595630402081]", + "SortIndex": 5 + } + ] + }, + "Component_[11466054095979053511]": { + "$type": "EditorPendingCompositionComponent", + "Id": 11466054095979053511 + }, + "Component_[1364058654406679998]": { + "$type": "SelectionComponent", + "Id": 1364058654406679998 + }, + "Component_[1550934027474222562]": { + "$type": "EditorVisibilityComponent", + "Id": 1550934027474222562 + }, + "Component_[15938036103959223730]": { + "$type": "EditorLockComponent", + "Id": 15938036103959223730 + }, + "Component_[5648156935684358836]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 5648156935684358836, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + -6.0, + 1.0 + ] + } + } + } + }, + "Entity_[574155565601]": { + "Id": "Entity_[574155565601]", + "Name": "21_neutral_6.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{ADAA8BF6-1580-5684-A7F5-4B0150117375}" + }, + "assetHint": "materials/presets/macbeth/21_neutral_6-5_0-44d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -2.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[578450532897]": { + "Id": "Entity_[578450532897]", + "Name": "20_neutral_8", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{A9BAEC06-A3F6-53E9-9E3E-61E12048FC75}" + }, + "assetHint": "materials/presets/macbeth/20_neutral_8-0_0-23d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -6.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[582745500193]": { + "Id": "Entity_[582745500193]", + "Name": "19_white_9.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{94E3052F-2B5A-5C28-912A-C0FDC00F5CD3}" + }, + "assetHint": "materials/presets/macbeth/19_white_9-5_0-05d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + -10.113382339477539, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[587040467489]": { + "Id": "Entity_[587040467489]", + "Name": "22_neutral_5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{1E45E15B-8035-5775-B796-A77654CDB094}" + }, + "assetHint": "materials/presets/macbeth/22_neutral_5-0_0-70d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 1.8866175413131714, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[591335434785]": { + "Id": "Entity_[591335434785]", + "Name": "23_neutral_3.5", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{23C26041-7155-5FE2-8E12-FACFD52DA006}" + }, + "assetHint": "materials/presets/macbeth/23_neutral_3-5_1-05d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 5.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[595630402081]": { + "Id": "Entity_[595630402081]", + "Name": "24_black_2", + "Components": { + "Component_[12222961627447331506]": { + "$type": "EditorMaterialComponent", + "Id": 12222961627447331506, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{1D83625A-4016-58F0-A94A-13B92B19F5B5}" + }, + "assetHint": "materials/presets/macbeth/24_black_2-0_1-50d.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[12780007764330464223]": { + "$type": "EditorVisibilityComponent", + "Id": 12780007764330464223 + }, + "Component_[12904863407657276829]": { + "$type": "EditorInspectorComponent", + "Id": 12904863407657276829, + "ComponentOrderEntryArray": [ + { + "ComponentId": 7205597372613518510 + }, + { + "ComponentId": 8564054653851438099, + "SortIndex": 1 + }, + { + "ComponentId": 12222961627447331506, + "SortIndex": 2 + } + ] + }, + "Component_[13729618014821386240]": { + "$type": "EditorPendingCompositionComponent", + "Id": 13729618014821386240 + }, + "Component_[14429836600052599894]": { + "$type": "EditorEntityIconComponent", + "Id": 14429836600052599894 + }, + "Component_[14808014799413383215]": { + "$type": "EditorEntitySortComponent", + "Id": 14808014799413383215 + }, + "Component_[17252932649882883756]": { + "$type": "SelectionComponent", + "Id": 17252932649882883756 + }, + "Component_[2229055145450914672]": { + "$type": "EditorLockComponent", + "Id": 2229055145450914672 + }, + "Component_[2249882080644631374]": { + "$type": "EditorOnlyEntityComponent", + "Id": 2249882080644631374 + }, + "Component_[7205597372613518510]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 7205597372613518510, + "Parent Entity": "Entity_[569860598305]", + "Transform Data": { + "Translate": [ + 9.886617660522461, + -9.999999974752427e-7, + 0.0 + ], + "Rotate": [ + 0.0, + 0.0, + 180.00001525878906 + ] + } + }, + "Component_[7918371639409185899]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 7918371639409185899 + }, + "Component_[8564054653851438099]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 8564054653851438099, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{D0F73AAF-52B7-507C-B045-DBE2FE2D4403}", + "subId": 268677693 + }, + "assetHint": "objects/shaderball_simple/shaberball_simple_1m.azmodel" + }, + "LodOverride": 255 + } + } + } + } + }, + "Entity_[599925369377]": { + "Id": "Entity_[599925369377]", + "Name": "MacBeth_Chart", + "Components": { + "Component_[10911367092756441312]": { + "$type": "EditorLockComponent", + "Id": 10911367092756441312 + }, + "Component_[11487615730470734577]": { + "$type": "EditorEntitySortComponent", + "Id": 11487615730470734577 + }, + "Component_[1380862607750834390]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 1380862607750834390 + }, + "Component_[17376808010180534107]": { + "$type": "EditorOnlyEntityComponent", + "Id": 17376808010180534107 + }, + "Component_[18051852481298910543]": { + "$type": "EditorPendingCompositionComponent", + "Id": 18051852481298910543 + }, + "Component_[2468310869499941539]": { + "$type": "EditorVisibilityComponent", + "Id": 2468310869499941539 + }, + "Component_[3104847651593575388]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 3104847651593575388, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + 0.0, + 0.0, + 1.0 + ], + "Scale": [ + 24.748918533325195, + 24.748918533325195, + 24.748918533325195 + ], + "UniformScale": 24.748918533325195 + } + }, + "Component_[4039743767801786212]": { + "$type": "AZ::Render::EditorMeshComponent", + "Id": 4039743767801786212, + "Controller": { + "Configuration": { + "ModelAsset": { + "assetId": { + "guid": "{767B3209-EDF7-503A-BF3D-6A69DAABC966}", + "subId": 285003870 + }, + "assetHint": "materialeditor/viewportmodels/plane_1x1.azmodel" + }, + "LodOverride": 255 + } + } + }, + "Component_[4350883917310195183]": { + "$type": "EditorMaterialComponent", + "Id": 4350883917310195183, + "Controller": { + "Configuration": { + "materials": { + "{}": { + "MaterialAsset": { + "assetId": { + "guid": "{6BCA78B0-98F0-5843-A0D9-2FD6AB5B8B95}" + }, + "assetHint": "materials/presets/macbeth/macbeth_lab_16bit_2014_srgb.azmaterial" + } + } + } + } + }, + "materialSlotsByLodEnabled": true + }, + "Component_[5382697958657080154]": { + "$type": "EditorInspectorComponent", + "Id": 5382697958657080154, + "ComponentOrderEntryArray": [ + { + "ComponentId": 3104847651593575388 + }, + { + "ComponentId": 4039743767801786212, + "SortIndex": 1 + }, + { + "ComponentId": 4350883917310195183, + "SortIndex": 2 + } + ] + }, + "Component_[5944774294236360498]": { + "$type": "SelectionComponent", + "Id": 5944774294236360498 + }, + "Component_[7918181081161287223]": { + "$type": "EditorEntityIconComponent", + "Id": 7918181081161287223 + } + } + }, + "Entity_[604220336673]": { + "Id": "Entity_[604220336673]", + "Name": "Camera1", + "Components": { + "Component_[10875630838724467144]": { + "$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent", + "Id": 10875630838724467144, + "Controller": { + "Configuration": { + "EditorEntityId": 604220336673 + } + } + }, + "Component_[11853636775353879324]": { + "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", + "Id": 11853636775353879324, + "Parent Entity": "Entity_[471076350497]", + "Transform Data": { + "Translate": [ + -0.088332898914814, + -14.735246658325195, + 12.247514724731445 + ], + "Rotate": [ + -34.60991287231445, + 0.19504709541797638, + -0.282683789730072 + ] + } + }, + "Component_[14115131108729471373]": { + "$type": "EditorEntitySortComponent", + "Id": 14115131108729471373 + }, + "Component_[14490537709933782275]": { + "$type": "SelectionComponent", + "Id": 14490537709933782275 + }, + "Component_[15389860813854215395]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 15389860813854215395 + }, + "Component_[16956210187152487952]": { + "$type": "EditorVisibilityComponent", + "Id": 16956210187152487952 + }, + "Component_[3120168445836073859]": { + "$type": "EditorInspectorComponent", + "Id": 3120168445836073859, + "ComponentOrderEntryArray": [ + { + "ComponentId": 11853636775353879324 + }, + { + "ComponentId": 6418726603140010485, + "SortIndex": 1 + }, + { + "ComponentId": 6573470892650938647, + "SortIndex": 2 + }, + { + "ComponentId": 10875630838724467144, + "SortIndex": 3 + }, + { + "ComponentId": 9127356411199949930, + "SortIndex": 4 + } + ] + }, + "Component_[397791896240265054]": { + "$type": "EditorEntityIconComponent", + "Id": 397791896240265054 + }, + "Component_[6418726603140010485]": { + "$type": "AZ::Render::EditorExposureControlComponent", + "Id": 6418726603140010485, + "Controller": { + "Configuration": { + "ExposureControlType": 1, + "EyeAdaptationExposureMin": -10.0, + "EyeAdaptationExposureMax": 10.0 + } + } + }, + "Component_[6572845495569063152]": { + "$type": "EditorOnlyEntityComponent", + "Id": 6572845495569063152 + }, + "Component_[6573470892650938647]": { + "$type": "AZ::Render::EditorPostFxLayerComponent", + "Id": 6573470892650938647 + }, + "Component_[7175586201406734874]": { + "$type": "EditorLockComponent", + "Id": 7175586201406734874 + }, + "Component_[7393764569438584638]": { + "$type": "EditorPendingCompositionComponent", + "Id": 7393764569438584638 + }, + "Component_[9127356411199949930]": { + "$type": "GenericComponentWrapper", + "Id": 9127356411199949930, + "m_template": { + "$type": "FlyCameraInputComponent" + } + } + } + } + } +} \ No newline at end of file diff --git a/AutomatedTesting/Levels/macbeth_shaderballs/tags.txt b/AutomatedTesting/Levels/macbeth_shaderballs/tags.txt new file mode 100644 index 0000000000..0d6c1880e7 --- /dev/null +++ b/AutomatedTesting/Levels/macbeth_shaderballs/tags.txt @@ -0,0 +1,12 @@ +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 +0,0,0,0,0,0 diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material index d49ca5dfe8..070c275b51 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 3, + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "metallic": { "useTexture": false @@ -18,4 +18,4 @@ "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material index 49014ae2b1..22b9c9f4f6 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/00_illuminant_tex.material @@ -1,11 +1,11 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "textureMap": "Materials/Presets/MacBeth/00_illuminant_sRGB.tif" + "textureMap": "00_illuminant_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material index 0fcedddf9d..534d4f0e85 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.17143511772155763, + 0.17143511772155762, 0.08227664977312088, - 0.056122682988643649, + 0.056122682988643646, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/01_dark_skin_sRGB.tif", + "textureMap": "01_dark_skin_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material index 7b10a3b5f5..172f6ea142 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/01_dark_skin_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\01_dark_skin.material", - "propertyLayoutVersion": 3, + "parentMaterial": "01_dark_skin.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material index 2ca339cadc..13831b6c55 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.21953155100345612, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/02_light_skin_sRGB.tif", + "textureMap": "02_light_skin_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material index b2f9c271b9..bd886e2dfe 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/02_light_skin_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\02_light_skin.material", - "propertyLayoutVersion": 3, + "parentMaterial": "02_light_skin.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material index 6432314ff2..47afe4d792 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10946822166442871, - 0.19806210696697236, - 0.33716335892677309, + 0.19806210696697235, + 0.33716335892677307, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/03_blue_sky_sRGB.tif", + "textureMap": "03_blue_sky_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material index 606d958818..0760647c9d 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/03_blue_sky_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\03_blue_sky.material", - "propertyLayoutVersion": 3, + "parentMaterial": "03_blue_sky.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material index 6b43cabedb..2f833f57ee 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10223544389009476, - 0.14996567368507386, - 0.052857253700494769, + 0.14996567368507385, + 0.052857253700494766, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material index 5ea1a31afc..bb83083003 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/04_foliage_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\04_foliage.material", - "propertyLayoutVersion": 3, + "parentMaterial": "04_foliage.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,7 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/04_foliage_sRGB.tif" + "textureMap": "04_foliage_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material index fa8302b859..bf6ee703da 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.2232242375612259, 0.21953155100345612, - 0.43414968252182009, + 0.43414968252182007, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material index 2d3ecdea6f..5f83eecd82 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/05_blue_flower_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\05_blue_flower.material", - "propertyLayoutVersion": 3, + "parentMaterial": "05_blue_flower.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,7 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/05_blue_flower_sRGB.tif" + "textureMap": "05_blue_flower_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material index 86e4fcb19d..fd20326fe2 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.12477302551269531, 0.5209887623786926, - 0.40723279118537905, + 0.40723279118537903, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/06_bluish_green_sRGB.tif", + "textureMap": "06_bluish_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material index 13b3cf293d..a5d7541fe2 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/06_bluish_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\06_bluish_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "06_bluish_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material index f60f82f16c..c1c76e8eaf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange.material @@ -1,16 +1,16 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.7156938910484314, - 0.19806210696697236, - 0.026245517656207086, + 0.19806210696697235, + 0.026245517656207085, 1.0 ] } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material index 8db258d41f..7ebc7ab081 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/07_orange_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\07_orange.material", - "propertyLayoutVersion": 3, + "parentMaterial": "07_orange.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,7 +11,7 @@ 1.0, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/07_orange_sRGB.tif" + "textureMap": "07_orange_sRGB.tif" } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material index 5e978ea495..4884aef6ab 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.06480506807565689, 0.10702677816152573, - 0.39157700538635256, + 0.39157700538635254, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/08_purplish_blue_sRGB.tif", + "textureMap": "08_purplish_blue_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material index 0ae7ea5e92..6722af151c 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/08_purplish_blue_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\08_purplish_blue.material", - "propertyLayoutVersion": 3, + "parentMaterial": "08_purplish_blue.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material index 86d9714b41..1a49b6339b 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.12213321030139923, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/09_moderate_red_sRGB.tif", + "textureMap": "09_moderate_red_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material index a738a10dfd..cddceff49a 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/09_moderate_red_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\09_moderate_red.material", - "propertyLayoutVersion": 3, + "parentMaterial": "09_moderate_red.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material index cf9d9c2f03..792881c65c 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.10461585223674774, - 0.043732356280088428, + 0.043732356280088425, 0.1412680298089981, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/10_purple_sRGB.tif", + "textureMap": "10_purple_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material index f0deb97c0c..09e57d0cae 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/10_purple_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\10_purple.material", - "propertyLayoutVersion": 3, + "parentMaterial": "10_purple.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material index 11b67ee518..ec49ed13d2 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.0481727309525013, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/11_yellow_green_sRGB.tif", + "textureMap": "11_yellow_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material index e7c081c496..35e77c9ced 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/11_yellow_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\11_yellow_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "11_yellow_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material index eb194f7990..6c7fcd08cd 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.7835355401039124, - 0.35640496015548708, + 0.35640496015548706, 0.02217135950922966, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/12_orange_yellow_sRGB.tif", + "textureMap": "12_orange_yellow_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material index 392c99b0ba..9a198e2d84 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/12_orange_yellow_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\12_orange_yellow.material", - "propertyLayoutVersion": 3, + "parentMaterial": "12_orange_yellow.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material index 0403aff6fe..91d337919f 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.024155031889677049, + 0.024155031889677048, 0.0481727309525013, - 0.29176774621009829, + 0.29176774621009827, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/13_blue_sRGB.tif", + "textureMap": "13_blue_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material index fe9929f7d4..b294d8d2d4 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/13_blue_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\13_blue.material", - "propertyLayoutVersion": 3, + "parentMaterial": "13_blue.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material index f199575b58..29bb867531 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.06480506807565689, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/14_green_sRGB.tif", + "textureMap": "14_green_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material index 15adcf4788..8e2df1342f 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/14_green_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\14_green.material", - "propertyLayoutVersion": 3, + "parentMaterial": "14_green.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material index 6489638ba6..553d1584a5 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.43414968252182009, - 0.029556725174188615, + 0.43414968252182007, + 0.029556725174188614, 0.03955138474702835, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/15_red_sRGB.tif", + "textureMap": "15_red_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material index 79ce245674..a3b472c083 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/15_red_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\15_red.material", - "propertyLayoutVersion": 3, + "parentMaterial": "15_red.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material index f5d302126f..a28aa13685 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.00802624598145485, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/16_yellow_sRGB.tif", + "textureMap": "16_yellow_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material index 6daa82a310..c7fa73d87b 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/16_yellow_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\16_yellow.material", - "propertyLayoutVersion": 3, + "parentMaterial": "16_yellow.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material index 7d3019913d..d30ef62a63 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.30498206615448, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/17_magenta_sRGB.tif", + "textureMap": "17_magenta_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material index c346a3e29d..e4c3b35e2e 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/17_magenta_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\17_magenta.material", - "propertyLayoutVersion": 3, + "parentMaterial": "17_magenta.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material index 6b2ab75dbd..efd9aa4005 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.0, - 0.24620431661605836, + 0.24620431661605835, 0.3813229501247406, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/18_cyan_sRGB.tif", + "textureMap": "18_cyan_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material index d0d5234498..2975d48196 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/18_cyan_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\18_cyan.material", - "propertyLayoutVersion": 3, + "parentMaterial": "18_cyan.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material index de5c5f6281..462e969d65 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.8713664412498474, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/19_white_9-5_0-05D_sRGB.tif", + "textureMap": "19_white_9-5_0-05D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material index 9fd79a1633..452a891639 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/19_white_9-5_0-05D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\19_white_9-5_0-05D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "19_white_9-5_0-05D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material index 748471138d..cc8a1b1b14 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.5840848684310913, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/20_neutral_8-0_0-23D_sRGB.tif", + "textureMap": "20_neutral_8-0_0-23D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material index 3a23f07bfa..d46a64105e 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/20_neutral_8-0_0-23D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\20_neutral_8-0_0-23D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "20_neutral_8-0_0-23D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material index edfae0689f..462259b193 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ 0.3515373468399048, - 0.35640496015548708, - 0.35640496015548708, + 0.35640496015548706, + 0.35640496015548706, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/21_neutral_6-5_0-44D_sRGB.tif", + "textureMap": "21_neutral_6-5_0-44D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material index bf4fe1218a..4072adf8cf 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/21_neutral_6-5_0-44D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\21_neutral_6-5_0-44D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "21_neutral_6-5_0-44D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material index a758b474f7..a5b5cf4127 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D.material @@ -1,18 +1,18 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ - 0.18782329559326173, + 0.18782329559326172, 0.191195547580719, 0.191195547580719, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/22_neutral_5-0_0-70D_sRGB.tif", + "textureMap": "22_neutral_5-0_0-70D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material index 69b18cb115..7dc6016eed 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/22_neutral_5-0_0-70D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\22_neutral_5-0_0-70D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "22_neutral_5-0_0-70D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material index 7ce60b545b..e69f1a7827 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.09083695709705353, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/23_neutral_3-5_1-05D_sRGB.tif", + "textureMap": "23_neutral_3-5_1-05D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material index 1b77a786c9..2611311790 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/23_neutral_3-5_1-05D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\23_neutral_3-5_1-05D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "23_neutral_3-5_1-05D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material index f448eea265..1222c09018 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -11,8 +11,8 @@ 0.0318913571536541, 1.0 ], - "textureMap": "Materials/Presets/MacBeth/24_black_2-0_1-50D_sRGB.tif", + "textureMap": "24_black_2-0_1-50D_sRGB.tif", "useTexture": false } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material index 8530dc7ffc..c60f696b58 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/24_black_2-0_1-50D_tex.material @@ -1,8 +1,8 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\24_black_2-0_1-50D.material", - "propertyLayoutVersion": 3, + "parentMaterial": "24_black_2-0_1-50D.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { "color": [ @@ -14,4 +14,4 @@ "useTexture": true } } -} +} \ No newline at end of file diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material index a67b484c31..f70b3538aa 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material +++ b/Gems/Atom/Feature/Common/Assets/Materials/Presets/MacBeth/macbeth_lab_16bit_2014_sRGB.material @@ -1,11 +1,11 @@ { "description": "", - "materialType": "Materials\\Types\\StandardPBR.materialtype", - "parentMaterial": "Materials\\Presets\\MacBeth\\00_illuminant.material", - "propertyLayoutVersion": 3, + "parentMaterial": "00_illuminant.material", + "materialType": "../../Types/StandardPBR.materialtype", + "materialTypeVersion": 4, "properties": { "baseColor": { - "textureMap": "Materials/Presets/MacBeth/ColorChecker_sRGB_from_Lab_16bit_AfterNov2014.tif" + "textureMap": "ColorChecker_sRGB_from_Lab_16bit_AfterNov2014.tif" } } -} +} \ No newline at end of file From d89dcff7dfa5951e274c3b5b1717e2ae92c1e523 Mon Sep 17 00:00:00 2001 From: Steve Pham <82231385+spham-amzn@users.noreply.github.com> Date: Thu, 2 Dec 2021 08:50:03 -0800 Subject: [PATCH 24/42] Fix failing zero color conversion test on Linux * Removed AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST (#6074) * Protect against 'NaN' (divide by zero) for saturation calculations by setting value to zero instead Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com> --- .../Components/Widgets/ColorPicker/ColorController.cpp | 7 ++++--- .../AzQtComponents/Tests/ColorControllerTests.cpp | 4 ---- .../AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp index 176443c0cd..4e8e86bc5a 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorController.cpp @@ -323,7 +323,7 @@ namespace AzQtComponents saturation *= 2.0 - lightness; } double value = (lightness + saturation) / 2.0; - saturation = (2.0 * saturation) / (lightness + saturation); + saturation = qFuzzyIsNull(lightness + saturation) ? 0 : (2.0 * saturation) / (lightness + saturation); m_hsv.saturation = AZ::GetClamp(saturation, 0.0, 1.0); m_hsv.value = AZ::GetClamp(value, 0.0, 12.5); @@ -341,11 +341,12 @@ namespace AzQtComponents double saturation = m_hsv.saturation * m_hsv.value; if (lightness <= 1.0) { - saturation /= lightness; + saturation = (qFuzzyIsNull(lightness)) ? 0.0 : saturation / lightness; } else { - saturation /= 2.0 - lightness; + double two_minus_lightness = 2.0 - lightness; + saturation = (qFuzzyIsNull(two_minus_lightness)) ? 0.0 : saturation / two_minus_lightness; } lightness /= 2.0; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp index fbd58dcac7..9e9bb92737 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Tests/ColorControllerTests.cpp @@ -164,11 +164,7 @@ namespace } } -#if AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST -TEST(AzQtComponents, DISABLED_ColorConversionsTestAllZeros) -#else TEST(AzQtComponents, ColorConversionsTestAllZeros) -#endif // AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST { TestConversions({ 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 0.0, 0.0 }); } diff --git a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h index 755888e1d9..b8a604b582 100644 --- a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h +++ b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h @@ -18,7 +18,7 @@ #define AZ_TRAIT_DISABLE_FAILED_ATOM_RPI_TESTS true #define AZ_TRAIT_DISABLE_FAILED_ARCHIVE_TESTS true -#define AZ_TRAIT_DISABLE_FAILED_ZERO_COLOR_CONVERSION_TEST true + #define AZ_TRAIT_DISABLE_FAILED_FRAMEPROFILER_TEST true #define AZ_TRAIT_DISABLE_FAILED_FRAMEWORK_TESTS true #define AZ_TRAIT_DISABLE_FAILED_GRADIENT_SIGNAL_TESTS true From f4f7f0772137afa255af9a255b34327a553c30fe Mon Sep 17 00:00:00 2001 From: mrieggeramzn <61609885+mrieggeramzn@users.noreply.github.com> Date: Thu, 2 Dec 2021 09:26:34 -0800 Subject: [PATCH 25/42] shadow fixes (#5890) * shadow fixes Signed-off-by: Michael Riegger * Adding missing line Signed-off-by: Michael Riegger * Adding point sampler Signed-off-by: Michael Riegger * feedback from pr Signed-off-by: mrieggeramzn * better variable name Signed-off-by: mrieggeramzn * Fix compile error Signed-off-by: mrieggeramzn --- .../ShaderLib/Atom/Features/Math/Filter.azsli | 94 ------------------- .../Atom/Features/PBR/Lights/PointLight.azsli | 18 +++- .../ShaderLib/Atom/Features/Shadow/ESM.azsli | 24 +++++ .../Features/Shadow/ProjectedShadow.azsli | 24 ++--- 4 files changed, 49 insertions(+), 111 deletions(-) create mode 100644 Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli index 8271aa46fb..11dac7b81c 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Math/Filter.azsli @@ -41,97 +41,3 @@ bool IsInsideOfImageSize( return IsInsideOfImageSize(coord, inputImageSize) && IsInsideOfImageSize(coord, outputImageSize); } - -//! This returns filtered value of "source" with weights in "filterTable" in 1 direction. -//! @param coord the center coordinate (in Texture2DArray) of the filtered area. -//! the xy coordinate is in pixel, and z is array slice index. -//! @param source image resource which is used as the source of the filtering. -//! Note that it contains entire of the shadowmap atlas, not a single shadowmap. -//! @param direction either (1,0) or (0,1). -//! If (1,0), the filtering direction is horizontal, -//! and if (0,1), it is vertical. -//! @param sourceMin the minimum (left/top most) index of the shadowmap. -//! @param sourceMax the maximum (right/bottom most) index of the shadowmap. -//! @param filterTable the weight table for this table. -//! Since the weight table of a Gaussian filter is left-right symmetry, -//! the right half is omitted in this filterTable. -//! @param filterOffset the offset of the filtering parameter in filterTable. -//! @param filterCount the element count of filtering parameter in filterTable. -//! For example, the weight table has size 11 in the original meaning -//! of Gaussian filter, filterCount == 6 by omitting the right half. -float FilteredFloat( - uint3 coord, - Texture2DArray source, - int2 direction, - int sourceMin, - int sourceMax, - Buffer filterTable, - uint filterOffset, - uint filterCount) -{ - if (filterCount == 0) - { - return 0.; // if no filtering info, early return. - } - - const int centerIndex = (int)dot(coord.xy, direction); - float result = 0.; - int index = 0; - - // This function summarizes the values stored in "source" - // from minIndex to maxIndex with weight in "filterTable". - // In the case that some point in [minIndex, maxIndex] go outside of - // the shadowmap (indicated by sourceMin and sourceMax), - // the edge value of the shadowmap is used. - - // 1. littler index side (left/up side) - const int minIndex = centerIndex - ((int)filterCount - 1); - - // 1-1. outside of shadowmap (littler) - // Assuming outside values are equal to the edge value, - // it first summarize the weights for outside of shadowmap - // then multiply it by the edge value. - float weight = 0.; // summation of weights of outside of shadowmap - for (index = minIndex; index < sourceMin; ++index) - { - weight += filterTable[filterOffset + index - minIndex]; - } - int2 edgeOffset = direction * (sourceMin - centerIndex); - int3 edgeCoord = coord + int3(edgeOffset, 0); - result += weight * source[edgeCoord]; - - // 1-2. inside of shadowmap (littler) - for (index = max(sourceMin, minIndex); index < centerIndex; ++index) - { - const int2 offset = direction * (index - centerIndex); - result += filterTable[filterOffset + index - minIndex] * - source[coord + int3(offset, 0)]; - } - - // 2. greater index side (right/down side) - const int maxIndex = centerIndex + ((int)filterCount - 1); - - // 2-1. outside of shadowmap (greater) - // This is similar to 1-1 above. - weight = 0.; // summation of weights of outside of shadowmap - for (index = maxIndex; index > sourceMax; --index) - { - weight += filterTable[filterOffset + maxIndex - index]; - } - edgeOffset = direction * (sourceMax - centerIndex); - edgeCoord = coord + int3(edgeOffset, 0); - result += weight * source[edgeCoord]; - - // 2-2. inside of shadowmap (greater) - for (index = min(sourceMax, maxIndex); index > centerIndex; --index) - { - const int2 offset = direction * (index - centerIndex); - result += filterTable[filterOffset + maxIndex - index] * - source[coord + int3(offset, 0)]; - } - - // 3. center - result += filterTable[filterOffset + filterCount - 1] * source[coord]; - - return result; -} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli index e6eea9728f..92f4065931 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PointLight.azsli @@ -50,6 +50,20 @@ int UnpackPointLightShadowIndex(const ViewSrg::PointLight light, const int face) return (light.m_shadowIndices[index] >> shiftAmount) & 0xFFFF; } +uint ComputeShadowIndex(const ViewSrg::PointLight light, const Surface surface) +{ + // shadow map size and bias are the same across all shadowmaps used by a specific point light, so just grab the first one + const uint lightIndex0 = UnpackPointLightShadowIndex(light, 0); + const float shadowmapSize = ViewSrg::m_projectedFilterParams[lightIndex0].m_shadowmapSize; + + // Note that the normal bias offset could potentially move the shadowed position from one map to another map inside the same point light shadow. + const float normalBias = ViewSrg::m_projectedShadows[lightIndex0].m_normalShadowBias; + const float3 biasedPosition = surface.position + ComputeNormalShadowOffset(normalBias, surface.vertexNormal, shadowmapSize); + + const int shadowCubemapFace = GetPointLightShadowCubemapFace(biasedPosition, light.m_position); + return UnpackPointLightShadowIndex(light, shadowCubemapFace); +} + void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingData lightingData) { float3 posToLight = light.m_position - surface.position; @@ -74,10 +88,8 @@ void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingD float backShadowRatio = 0.0; if (o_enableShadows) { - const int shadowCubemapFace = GetPointLightShadowCubemapFace(surface.position, light.m_position); - const int shadowIndex = UnpackPointLightShadowIndex(light, shadowCubemapFace); const float3 lightDir = normalize(light.m_position - surface.position); - + const uint shadowIndex = ComputeShadowIndex(light, surface); litRatio *= ProjectedShadow::GetVisibility( shadowIndex, light.m_position, diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli new file mode 100644 index 0000000000..3a258c2f47 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ESM.azsli @@ -0,0 +1,24 @@ +/* + * 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 + * + */ + +#pragma once + + +float SampleESM(const Texture2DArray shadowMap, const SamplerState samp, const float3 uv, const float zReceiver, const float esmExponent) +{ + const float mipmaplevel = 0; + const float occluder = shadowMap.SampleLevel(samp,uv, mipmaplevel).r; + const float lit = exp((occluder - zReceiver) * esmExponent); + return lit; +} + +float PCFFallbackForESM(const Texture2DArray shadowMap, const float3 uv, const float zReceiver, const float esmExponent) +{ + const float result = SampleESM(shadowMap, PassSrg::LinearSampler, uv, zReceiver, esmExponent); + return saturate(result); +} diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli index 3b8379e7fa..98ec9ea8bc 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli @@ -15,6 +15,7 @@ #include "BicubicPcfFilters.azsli" #include "Shadow.azsli" #include "NormalOffsetShadows.azsli" +#include "ESM.azsli" // ProjectedShadow calculates shadowed area projected from a light. class ProjectedShadow @@ -190,13 +191,11 @@ float ProjectedShadow::GetVisibilityEsm() const float depth = PerspectiveDepthToLinear( m_shadowPosition.z - m_bias, coefficients); - const float occluder = shadowmap.SampleLevel( - PassSrg::LinearSampler, - float3(atlasPosition.xy * invAtlasSize, atlasPosition.z), - /*LOD=*/0).r; + + const float3 uv = float3(atlasPosition.xy * invAtlasSize, atlasPosition.z); + const float esmExponent = ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent; + const float ratio = SampleESM(shadowmap, PassSrg::LinearSampler, uv, depth, esmExponent); - const float exponent = -ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent * (depth - occluder); - const float ratio = exp(exponent); // pow() mitigates light bleeding to shadows from near shadow casters. return saturate( pow(ratio, 8) ); } @@ -229,21 +228,18 @@ float ProjectedShadow::GetVisibilityEsmPcf() return 1.; } const float3 atlasPosition = GetAtlasPosition(m_shadowPosition.xy); + const float3 uv = float3(atlasPosition.xy * invAtlasSize, atlasPosition.z); const float depth = PerspectiveDepthToLinear( m_shadowPosition.z - m_bias, coefficients); - const float occluder = shadowmap.SampleLevel( - PassSrg::LinearSampler, - float3(atlasPosition.xy * invAtlasSize, atlasPosition.z), - /*LOD=*/0).r; - - const float exponent = -ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent * (depth - occluder); - float ratio = exp(exponent); + + const float esmExponent = ViewSrg::m_projectedShadows[m_shadowIndex].m_esmExponent; + float ratio = SampleESM(shadowmap, PassSrg::LinearSampler, uv, depth, esmExponent); static const float pcfFallbackThreshold = 1.04; if (ratio > pcfFallbackThreshold) { - ratio = GetVisibilityPcf(); + ratio = PCFFallbackForESM(shadowmap, uv, depth, esmExponent); } else { From bce5e36b5378e93a280d990e55330cfbcb6f9537 Mon Sep 17 00:00:00 2001 From: mrieggeramzn <61609885+mrieggeramzn@users.noreply.github.com> Date: Thu, 2 Dec 2021 09:27:01 -0800 Subject: [PATCH 26/42] Fix for artifact with thin-film materials and shadows (#6016) * *BackL*.azsli Signed-off-by: mrieggeramzn * refactoring from feedback Signed-off-by: mrieggeramzn --- .../Atom/Features/PBR/BackLighting.azsli | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli index 83cf79ed61..dfd5522f5c 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli @@ -23,6 +23,16 @@ float3 TransmissionKernel(float t, float3 s) return 0.25 * (1.0 / exp(exponent) + 3.0 / exp(exponent / 3.0)); } +float ThinObjectFalloff(const float3 surfaceNormal, const float3 dirToLight) +{ + const float ndl = saturate(dot(-surfaceNormal, dirToLight)); + + // ndl works decently well but it can produce a harsh discontinuity in the area just before + // the shadow starts appearing on objects like cylinder and tubes. + // Smoothing out ndl does a decent enough job of removing this artifact. + return smoothstep(0, 1, ndl * ndl); +} + float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightIntensity, float3 dirToLight, float shadowRatio) { float3 result = float3(0.0, 0.0, 0.0); @@ -53,8 +63,10 @@ float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightI float litRatio = 1.0 - shadowRatio; if (litRatio) { - result = TransmissionKernel(surface.transmission.thickness * transmissionParams.w, rcp(transmissionParams.xyz)) * - saturate(dot(-surface.normal, dirToLight)) * lightIntensity * litRatio; + const float thickness = surface.transmission.thickness * transmissionParams.w; + const float3 invScattering = rcp(transmissionParams.xyz); + const float falloff = ThinObjectFalloff(surface.normal, dirToLight); + result = TransmissionKernel(thickness, invScattering) * falloff * lightIntensity * litRatio; } break; From bd1a4a306248a0f90239f28f1b79a3a544b86484 Mon Sep 17 00:00:00 2001 From: Steve Pham <82231385+spham-amzn@users.noreply.github.com> Date: Thu, 2 Dec 2021 10:20:55 -0800 Subject: [PATCH 27/42] Removed trait AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS * Removed trait AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS (#6078) * Added check for gamepad support * Skip tests that rely on gamepad support on platforms that dont support it * Use GTEST_SKIP(() if available, otherwise just use SUCCEED() Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com> --- .../AzFramework/Tests/InputTests.cpp | 175 +++++++++++++----- .../Platform/Linux/AzTest_Traits_Linux.h | 1 - 2 files changed, 127 insertions(+), 49 deletions(-) diff --git a/Code/Framework/AzFramework/Tests/InputTests.cpp b/Code/Framework/AzFramework/Tests/InputTests.cpp index 5fba7f5796..31558250b5 100644 --- a/Code/Framework/AzFramework/Tests/InputTests.cpp +++ b/Code/Framework/AzFramework/Tests/InputTests.cpp @@ -29,6 +29,13 @@ namespace InputUnitTests //////////////////////////////////////////////////////////////////////////////////////////////// class InputTest : public ScopedAllocatorSetupFixture { + public: + InputTest() : ScopedAllocatorSetupFixture() + { + // Many input tests are only valid if the GamePad device is supported on this platform. + m_gamepadSupported = InputDeviceGamepad::GetMaxSupportedGamepads() > 0; + } + protected: //////////////////////////////////////////////////////////////////////////////////////////// void SetUp() override @@ -46,6 +53,7 @@ namespace InputUnitTests //////////////////////////////////////////////////////////////////////////////////////////// AZStd::unique_ptr m_inputSystemComponent; + bool m_gamepadSupported; }; //////////////////////////////////////////////////////////////////////////////////////////////// @@ -78,12 +86,17 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_ActivateDeactivate_Successfull) -#else TEST_F(InputTest, InputContext_ActivateDeactivate_Successfull) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_ActivateDeactivate_Successfull"; + #else + SUCCEED() << "Skipping test InputContext_ActivateDeactivate_Successfull"; + #endif + return; + } // Create an input context (they are inactive by default). InputContext inputContext("TestInputContext"); @@ -148,12 +161,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_AddRemoveInputMapping_Successfull) -#else TEST_F(InputTest, InputContext_AddRemoveInputMapping_Successfull) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_AddRemoveInputMapping_Successfull"; + #else + SUCCEED() << "Skipping test InputContext_AddRemoveInputMapping_Successfull"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -256,12 +275,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_ConsumeProcessedInput_Consumed) -#else TEST_F(InputTest, InputContext_ConsumeProcessedInput_Consumed) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_ConsumeProcessedInput_Consumed"; + #else + SUCCEED() << "Skipping test InputContext_ConsumeProcessedInput_Consumed"; + #endif + return; + } + InputContext::InitData initData; // Create a high priority input context that consumes input processed by any of its mappings. @@ -340,12 +365,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputContext_FilteredInput_Mapped) -#else TEST_F(InputTest, InputContext_FilteredInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputContext_FilteredInput_Mapped"; + #else + SUCCEED() << "Skipping test InputContext_FilteredInput_Mapped"; + #endif + return; + } + // Create an input context that initially only listens for keyboard input. InputContext::InitData initData; initData.autoActivate = true; @@ -413,12 +444,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_AddRemoveSourceInput_Successful) -#else TEST_F(InputTest, InputMappingOr_AddRemoveSourceInput_Successful) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_AddRemoveSourceInput_Successful"; + #else + SUCCEED() << "Skipping test InputMappingOr_AddRemoveSourceInput_Successful"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -491,12 +528,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_SingleSourceInput_Mapped) -#else TEST_F(InputTest, InputMappingOr_SingleSourceInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_SingleSourceInput_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingOr_SingleSourceInput_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -558,12 +601,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingOr_MultipleSourceInputs_Mapped) -#else TEST_F(InputTest, InputMappingOr_MultipleSourceInputs_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingOr_MultipleSourceInputs_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingOr_MultipleSourceInputs_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -650,12 +699,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_AddRemoveSourceInput_Successful) -#else TEST_F(InputTest, InputMappingAnd_AddRemoveSourceInput_Successful) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_AddRemoveSourceInput_Successful"; + #else + SUCCEED() << "Skipping test InputMappingAnd_AddRemoveSourceInput_Successful"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -728,12 +783,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_SingleSourceInput_Mapped) -#else TEST_F(InputTest, InputMappingAnd_SingleSourceInput_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_SingleSourceInput_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_SingleSourceInput_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -795,12 +856,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputs_Mapped) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputs_Mapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputs_Mapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputs_Mapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -909,12 +976,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputsWithDifferentValues_ValuesAveraged"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); @@ -969,12 +1042,18 @@ namespace InputUnitTests } //////////////////////////////////////////////////////////////////////////////////////////////// -#if AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS - TEST_F(InputTest, DISABLED_InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped) -#else TEST_F(InputTest, InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped) -#endif // AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS { + if (!m_gamepadSupported) + { + #if defined(GTEST_SKIP) + GTEST_SKIP() << "Skipping test InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped"; + #else + SUCCEED() << "Skipping test InputMappingAnd_MultipleSourceInputsFromTheSameInputDeviceTypeWithDifferentIndicies_NotMapped"; + #endif + return; + } + // Create an input context and activate it. InputContext inputContext("TestInputContext"); inputContext.Activate(); diff --git a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h index b8a604b582..6d6513043b 100644 --- a/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h +++ b/Code/Framework/AzTest/AzTest/Platform/Linux/AzTest_Traits_Linux.h @@ -23,7 +23,6 @@ #define AZ_TRAIT_DISABLE_FAILED_FRAMEWORK_TESTS true #define AZ_TRAIT_DISABLE_FAILED_GRADIENT_SIGNAL_TESTS true #define AZ_TRAIT_DISABLE_FAILED_MULTIPLAYER_GRIDMATE_TESTS true -#define AZ_TRAIT_DISABLE_FAILED_INPUT_TESTS true #define AZ_TRAIT_DISABLE_FAILED_NATIVE_WINDOWS_TESTS true #define AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS true #define AZ_TRAIT_DISABLE_FAILED_EMOTION_FX_TESTS true From dea512f02fc5d699a4b40d51d0d1e2e0a5ad96db Mon Sep 17 00:00:00 2001 From: Guthrie Adams Date: Thu, 2 Dec 2021 12:19:22 -0600 Subject: [PATCH 28/42] Removing PythonAssetBuilderSystemComponent from GetRequiredSystemComponents This change was prompted by the Python asset builder activating in the material editor and asset processor, leading to conflicts as both initialized, started Python, spamming the console window and log with warnings while trying to save module symbol information. Because PythonAssetBuilderSystemComponent also has a SystemComponentTag attribute declaring it as an AssetBuilder, it will still be discovered and automatically added to the asset builder. Removing it from GetRequiredSystemComponents will stop the component from activating outside of the asset builder. Signed-off-by: Guthrie Adams --- .../Code/Source/PythonAssetBuilderModule.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp index 1d330c90df..2675855e4b 100644 --- a/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp +++ b/Gems/PythonAssetBuilder/Code/Source/PythonAssetBuilderModule.cpp @@ -34,9 +34,7 @@ namespace PythonAssetBuilder // Add required SystemComponents to the SystemEntity. AZ::ComponentTypeList GetRequiredSystemComponents() const override { - return AZ::ComponentTypeList { - azrtti_typeid(), - }; + return AZ::ComponentTypeList{}; } }; } From ce717ad48ac61e365a24694ddc6e6a482b1daa5b Mon Sep 17 00:00:00 2001 From: tjmgd <92784061+tjmgd@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:54:40 +0000 Subject: [PATCH 29/42] Improvement to filter types (optimization) (#5944) Signed-off-by: T.J. McGrath-Daly Co-authored-by: Tobias Alexander Franke --- .../Code/Source/Editor/AudioSystemEditor_wwise.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp index 5bad3ecf1c..d56e6b3434 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp @@ -571,7 +571,7 @@ namespace AudioControls case eACET_RTPC: return eWCT_WWISE_RTPC; case eACET_SWITCH: - return AUDIO_IMPL_INVALID_TYPE; + return (eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE); case eACET_SWITCH_STATE: return (eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE | eWCT_WWISE_RTPC); case eACET_ENVIRONMENT: From 0842eae3a067b0e7a184b43a24303c4479596392 Mon Sep 17 00:00:00 2001 From: tjmgd <92784061+tjmgd@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:54:51 +0000 Subject: [PATCH 30/42] Fix for inappropriate data being used to calc position of audio listerner (#5941) Signed-off-by: T.J. McGrath-Daly --- .../Code/Source/Audio/AudioListenerComponent.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp b/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp index 05d8061856..7062f685c2 100644 --- a/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Audio/AudioListenerComponent.cpp @@ -96,7 +96,7 @@ namespace LmbrCentral } else { - m_positionEntity = entityId; + m_currentPositionEntity = entityId; } } @@ -221,26 +221,26 @@ namespace LmbrCentral if (rotationEntityId.IsValid()) { - AZ::EntityBus::MultiHandler::BusConnect(rotationEntityId); m_currentRotationEntity = rotationEntityId; + AZ::EntityBus::MultiHandler::BusConnect(rotationEntityId); } else { - AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); m_currentRotationEntity = GetEntityId(); + AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); } // Lastly, connect to the Entity used for Position if (positionEntityId.IsValid()) { - AZ::EntityBus::MultiHandler::BusConnect(positionEntityId); m_currentPositionEntity = positionEntityId; + AZ::EntityBus::MultiHandler::BusConnect(positionEntityId); } else { - AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); m_currentPositionEntity = GetEntityId(); + AZ::TransformNotificationBus::MultiHandler::BusConnect(GetEntityId()); } // Do a fetch of the transforms to sync upon connecting. From 11357fbf9f88bf316879b60df6dccc66cb1b9f76 Mon Sep 17 00:00:00 2001 From: tjmgd <92784061+tjmgd@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:54:58 +0000 Subject: [PATCH 31/42] Fix for bug preventing undo function working correctly (#5937) Signed-off-by: T.J. McGrath-Daly --- .../Source/Editor/AudioControlsEditorUndo.cpp | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp index 062d14addf..311f8a98a0 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorUndo.cpp @@ -11,7 +11,7 @@ #include #include - +#include #include #include @@ -273,6 +273,51 @@ namespace AudioControls pControl->m_connectedControls = m_connectedControls; pModel->OnControlModified(pControl); + auto& tmpConnectedControls1 = + connectedControls.size() > m_connectedControls.size() ? connectedControls : m_connectedControls; + auto& tmpConnectedControls2 = + connectedControls.size() > m_connectedControls.size() ? m_connectedControls : connectedControls; + for (auto& connection1 : tmpConnectedControls1) + { + bool bCheck = true; + for (auto& connection2 : tmpConnectedControls2) + { + if (connection1 == connection2) + { + bCheck = false; + break; + } + } + + if (!bCheck) + { + continue; + } + + if (IAudioSystemEditor* audioSystemImpl = CAudioControlsEditorPlugin::GetImplementationManager()->GetImplementation()) + { + if (IAudioSystemControl* middlewareControl = audioSystemImpl->GetControl(connection1->GetID())) + { + if (connectedControls.size() > m_connectedControls.size()) + { + audioSystemImpl->ConnectionRemoved(middlewareControl); + pControl->SignalConnectionRemoved(middlewareControl); + } + else + { + TConnectionPtr connection = + audioSystemImpl->CreateConnectionToControl(pControl->GetType(), middlewareControl); + if (connection) + { + pControl->SignalConnectionAdded(middlewareControl); + } + } + + pControl->SignalControlModified(); + } + } + } + m_name = name; m_scope = scope; m_isAutoLoad = isAutoLoad; From ba9ae77023d8182b0eca5c789b661c89c4ffec9a Mon Sep 17 00:00:00 2001 From: tjmgd <92784061+tjmgd@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:55:05 +0000 Subject: [PATCH 32/42] Bug - association update (#5932) * Fixed crash when typing asset name and clicking browse (#5495) Signed-off-by: T.J. McGrath-Daly * Fixed issue where associated control disappears after clicking Save Signed-off-by: T.J. McGrath-Daly Co-authored-by: AMZN-AlexOteiza <82234181+AMZN-AlexOteiza@users.noreply.github.com> Co-authored-by: Tobias Alexander Franke --- .../Code/Source/Editor/AudioSystemEditor_wwise.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp index d56e6b3434..d29bec190e 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp @@ -322,6 +322,10 @@ namespace AudioControls connection->m_value = value; return connection; } + case EACEControlType::eACET_ENVIRONMENT: + { + return AZStd::make_shared(control->GetId()); + } } } else @@ -575,7 +579,7 @@ namespace AudioControls case eACET_SWITCH_STATE: return (eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE | eWCT_WWISE_RTPC); case eACET_ENVIRONMENT: - return (eWCT_WWISE_AUX_BUS | eWCT_WWISE_SWITCH | eWCT_WWISE_GAME_STATE | eWCT_WWISE_RTPC); + return (eWCT_WWISE_AUX_BUS | eWCT_WWISE_RTPC); case eACET_PRELOAD: return eWCT_WWISE_SOUND_BANK; } From 74cc3ccc20caab8894f056bd2c579e6b0742a81e Mon Sep 17 00:00:00 2001 From: Guthrie Adams Date: Thu, 2 Dec 2021 13:05:02 -0600 Subject: [PATCH 33/42] Removing warnings from material editor viewport Signed-off-by: Guthrie Adams --- .../Code/Source/Viewport/MaterialViewportRenderer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp index 4ad87492e3..409674f0bc 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportRenderer.cpp @@ -306,7 +306,6 @@ namespace MaterialEditor { if (!preset) { - AZ_Warning("MaterialViewportRenderer", false, "Attempting to set invalid lighting preset."); return; } @@ -347,7 +346,6 @@ namespace MaterialEditor { if (!preset) { - AZ_Warning("MaterialViewportRenderer", false, "Attempting to set invalid model preset."); return; } From 50f094c51e39989964db0b1c0fbe3a8e6a6ccd72 Mon Sep 17 00:00:00 2001 From: Guthrie Adams Date: Thu, 2 Dec 2021 14:34:36 -0600 Subject: [PATCH 34/42] Fixing warnings caused by system components not added to serialize context ================================================================== 2021-11-30T20:21:23{000000000000395C}[Module Manager] Trace::Warning D:/projects/lyengine/git/ly-dev/o3de/Code/Framework/AzCore/AzCore/Module/ModuleManager.cpp(34): 'bool __cdecl AZ::ShouldUseSystemComponent(const class AZ::ComponentDescriptor &,const class AZStd::vector &,const class AZ::SerializeContext &)' 2021-11-30T20:21:23{000000000000395C}[Module Manager] Component type MultiplayerToolsSystemComponent not reflected to SerializeContext! 2021-11-30T20:21:23{000000000000395C}[Module Manager] ================================================================== 2021-11-30T20:21:23{000000000000395C}[Module Manager] ================================================================== 2021-11-30T20:21:23{000000000000395C}[Module Manager] Trace::Warning D:/projects/lyengine/git/ly-dev/o3de/Code/Framework/AzCore/AzCore/Module/ModuleManager.cpp(34): 'bool __cdecl AZ::ShouldUseSystemComponent(const class AZ::ComponentDescriptor &,const class AZStd::vector &,const class AZ::SerializeContext &)' 2021-11-30T20:21:23{000000000000395C}[Module Manager] Component type PythonEditorFuncs not reflected to SerializeContext! 2021-11-30T20:21:23{000000000000395C}[Module Manager] ================================================================== Signed-off-by: Guthrie Adams --- .../Code/Source/Editor/MultiplayerEditorSystemComponent.cpp | 6 ++++++ .../Code/Source/MultiplayerToolsSystemComponent.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp index ec783808a2..0657b2306e 100644 --- a/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Editor/MultiplayerEditorSystemComponent.cpp @@ -60,6 +60,12 @@ namespace Multiplayer void PythonEditorFuncs::Reflect(AZ::ReflectContext* context) { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(0); + } + if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { // This will create static python methods in the 'azlmbr.multiplayer' module diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp index 058517d5dc..c1e4d22b50 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp @@ -17,6 +17,12 @@ namespace Multiplayer void MultiplayerToolsSystemComponent::Reflect(AZ::ReflectContext* context) { + if (AZ::SerializeContext* serialize = azrtti_cast(context)) + { + serialize->Class() + ->Version(0); + } + NetworkPrefabProcessor::Reflect(context); } From 7a0282a5342a687477154f73d5a8fe7df706fa16 Mon Sep 17 00:00:00 2001 From: bosnichd Date: Thu, 2 Dec 2021 14:17:12 -0700 Subject: [PATCH 35/42] Fix debug ImGui asserts I introduced in [b2c13b2]. (#6104) Also allow different D3D12_ROOT_SIGNATURE flags to be set for each platform. Signed-off-by: bosnichd --- .../Common/Code/Source/ImGui/ImGuiPass.cpp | 54 ++++++++++++++++--- .../Common/Code/Source/ImGui/ImGuiPass.h | 36 +++++++++++-- .../Platform/Windows/RHI/DX12_Windows.h | 3 ++ .../DX12/Code/Source/RHI/PipelineLayout.cpp | 2 +- .../Code/Source/RHI/RayTracingShaderTable.cpp | 2 +- 5 files changed, 82 insertions(+), 15 deletions(-) diff --git a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp index 7197b95917..d3615bfaa9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.cpp @@ -68,6 +68,8 @@ namespace AZ : Base(descriptor) , AzFramework::InputChannelEventListener(AzFramework::InputChannelEventListener::GetPriorityDebugUI() - 1) // Give ImGui manager priority over the pass , AzFramework::InputTextEventListener(AzFramework::InputTextEventListener::GetPriorityDebugUI() - 1) // Give ImGui manager priority over the pass + , m_tickHandlerFrameStart(*this) + , m_tickHandlerFrameEnd(*this) { const ImGuiPassData* imguiPassData = RPI::PassUtils::GetPassData(descriptor); @@ -102,7 +104,6 @@ namespace AZ Init(); ImGui::NewFrame(); - TickBus::Handler::BusConnect(); AzFramework::InputChannelEventListener::Connect(); AzFramework::InputTextEventListener::Connect(); } @@ -127,7 +128,6 @@ namespace AZ AzFramework::InputTextEventListener::BusDisconnect(); AzFramework::InputChannelEventListener::BusDisconnect(); - TickBus::Handler::BusDisconnect(); } ImGuiContext* ImGuiPass::GetContext() @@ -140,23 +140,61 @@ namespace AZ m_drawData.push_back(drawData); } - int ImGuiPass::GetTickOrder() + ImGuiPass::TickHandlerFrameStart::TickHandlerFrameStart(ImGuiPass& imGuiPass) + : m_imGuiPass(imGuiPass) + { + TickBus::Handler::BusConnect(); + } + + int ImGuiPass::TickHandlerFrameStart::GetTickOrder() { - // We have to call ImGui::NewFrame (which happens in ImGuiPass::OnTick) after setting - // ImGui::GetIO().NavInputs (which happens in ImGuiPass::OnInputChannelEventFiltered), - // but before ImGui::Render (which happens in ImGuiPass::SetupFrameGraphDependencies). return AZ::ComponentTickBus::TICK_PRE_RENDER; } - void ImGuiPass::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) + void ImGuiPass::TickHandlerFrameStart::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) { - auto imguiContextScope = ImguiContextScope(m_imguiContext); + auto imguiContextScope = ImguiContextScope(m_imGuiPass.m_imguiContext); ImGui::NewFrame(); auto& io = ImGui::GetIO(); io.DeltaTime = deltaTime; } + ImGuiPass::TickHandlerFrameEnd::TickHandlerFrameEnd(ImGuiPass& imGuiPass) + : m_imGuiPass(imGuiPass) + { + TickBus::Handler::BusConnect(); + } + + int ImGuiPass::TickHandlerFrameEnd::GetTickOrder() + { + // ImGui::NewFrame() must be called (see ImGuiPass::TickHandlerFrameStart::OnTick) after populating + // ImGui::GetIO().NavInputs (see ImGuiPass::OnInputChannelEventFiltered), and paired with a call to + // ImGui::EndFrame() (see ImGuiPass::TickHandlerFrameEnd::OnTick); if this is not called explicitly + // then it will be called from inside ImGui::Render() (see ImGuiPass::SetupFrameGraphDependencies). + // + // ImGui::Render() gets called (indirectly) from OnSystemTick, so we cannot rely on it being paired + // with a matching call to ImGui::NewFrame() that gets called from OnTick, because OnSystemTick and + // OnTick can be called at different frequencies under some circumstances (namely from the editor). + // + // To account for this we must explicitly call ImGui::EndFrame() once a frame from OnTick to ensure + // that every call to ImGui::NewFrame() has been matched with a call to ImGui::EndFrame(), but only + // after ImGui::Render() has had the chance first (if so calling ImGui::EndFrame() again is benign). + // + // Because ImGui::Render() gets called (indirectly) from OnSystemTick, which usually happens at the + // start of every frame, we give TickHandlerFrameEnd::OnTick() the order of TICK_FIRST such that it + // will be called first on the regular tick bus, which is invoked immediately after the system tick. + // + // So while returning TICK_FIRST is incredibly counter-intuitive, hopefully that all explains why. + return AZ::ComponentTickBus::TICK_FIRST; + } + + void ImGuiPass::TickHandlerFrameEnd::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) + { + auto imguiContextScope = ImguiContextScope(m_imGuiPass.m_imguiContext); + ImGui::EndFrame(); + } + bool ImGuiPass::OnInputTextEventFiltered(const AZStd::string& textUTF8) { auto imguiContextScope = ImguiContextScope(m_imguiContext); diff --git a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h index 6c9dd11914..b774144ba3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ImGui/ImGuiPass.h @@ -54,7 +54,6 @@ namespace AZ //! This pass owns and manages activation of an Imgui context. class ImGuiPass : public RPI::RenderPass - , private TickBus::Handler , private AzFramework::InputChannelEventListener , private AzFramework::InputTextEventListener { @@ -76,10 +75,6 @@ namespace AZ //! Allows draw data from other imgui contexts to be rendered on this context. void RenderImguiDrawData(const ImDrawData& drawData); - // TickBus::Handler overrides... - int GetTickOrder() override; - void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; - // AzFramework::InputTextEventListener overrides... bool OnInputTextEventFiltered(const AZStd::string& textUTF8) override; @@ -99,6 +94,35 @@ namespace AZ void BuildCommandListInternal(const RHI::FrameGraphExecuteContext& context) override; private: + //! Class which connects to the tick handler using the tick order required at the start of an ImGui frame. + class TickHandlerFrameStart : protected TickBus::Handler + { + public: + TickHandlerFrameStart(ImGuiPass& imGuiPass); + + protected: + // TickBus::Handler overrides... + int GetTickOrder() override; + void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; + + private: + ImGuiPass& m_imGuiPass; + }; + + //! Class which connects to the tick handler using the tick order required at the end of an ImGui frame. + class TickHandlerFrameEnd : protected TickBus::Handler + { + public: + TickHandlerFrameEnd(ImGuiPass& imGuiPass); + + protected: + // TickBus::Handler overrides... + int GetTickOrder() override; + void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; + + private: + ImGuiPass& m_imGuiPass; + }; struct DrawInfo { @@ -112,6 +136,8 @@ namespace AZ void Init(); ImGuiContext* m_imguiContext = nullptr; + TickHandlerFrameStart m_tickHandlerFrameStart; + TickHandlerFrameEnd m_tickHandlerFrameEnd; RHI::Ptr m_pipelineState; Data::Instance m_shader; diff --git a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h index 2eef783932..225b039c66 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h +++ b/Gems/Atom/RHI/DX12/Code/Source/Platform/Windows/RHI/DX12_Windows.h @@ -56,6 +56,9 @@ AZ_POP_DISABLE_WARNING // This define controls whether DXR ray tracing support is available on the platform. #define AZ_DX12_DXR_SUPPORT +// This define is used to initialize the D3D12_ROOT_SIGNATURE_DESC::Flags property. +#define AZ_DX12_ROOT_SIGNATURE_FLAGS D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT + using ID3D12CommandAllocatorX = ID3D12CommandAllocator; using ID3D12CommandQueueX = ID3D12CommandQueue; using ID3D12DeviceX = ID3D12Device5; diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp index 3fdeec1c51..5a54282e70 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/PipelineLayout.cpp @@ -417,7 +417,7 @@ namespace AZ } D3D12_ROOT_SIGNATURE_DESC rootSignatureDesc; - rootSignatureDesc.Flags = D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT; + rootSignatureDesc.Flags = AZ_DX12_ROOT_SIGNATURE_FLAGS; rootSignatureDesc.NumParameters = static_cast(parameters.size()); rootSignatureDesc.pParameters = parameters.data(); rootSignatureDesc.NumStaticSamplers = static_cast(staticSamplers.size()); diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp index 0a9ea63d2f..c84c440c92 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp @@ -86,7 +86,7 @@ namespace AZ AZStd::wstring shaderExportNameWstring; AZStd::to_wstring(shaderExportNameWstring, record.m_shaderExportName.GetStringView()); - void* shaderIdentifier = stateObjectProperties->GetShaderIdentifier(shaderExportNameWstring.c_str()); + const void* shaderIdentifier = stateObjectProperties->GetShaderIdentifier(shaderExportNameWstring.c_str()); memcpy(mappedData, shaderIdentifier, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES); mappedData += D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES; From 0498e4a9c3f77b2900c82735b35d79046ff48bd3 Mon Sep 17 00:00:00 2001 From: LesaelR <89800757+LesaelR@users.noreply.github.com> Date: Thu, 2 Dec 2021 13:48:30 -0800 Subject: [PATCH 36/42] Added an assert to verify AP and AP Batch close on teardown. (#5891) * Added an assert to verify AP and AP Batch close on teardown. Signed-off-by: Rosario Cox * Removed ".exe" from assert to ensure it works on any platform Fixed missing set of parenthesis in the assert Added "AssetBuilder" to the assert to ensure assetbuilders have closed correctly Signed-off-by: Rosario Cox * Moving the helper function from asset_processor_fixture to asset_processor_utils. Changed individual process_utils calls into a single call with a list. Signed-off-by: Rosario Cox * Added the missing references. Signed-off-by: Rosario Cox --- .../ap_fixtures/asset_processor_fixture.py | 4 ++++ .../o3de/asset_processor_utils.py | 22 +++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py index 674862443e..885b4c2959 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/asset_processor_fixture.py @@ -15,6 +15,7 @@ import logging # Import LyTestTools import ly_test_tools.o3de.asset_processor as asset_processor_commands +import ly_test_tools.o3de.asset_processor_utils logger = logging.getLogger(__name__) @@ -36,5 +37,8 @@ def asset_processor(request: pytest.fixture, workspace: pytest.fixture) -> asset ap.stop() request.addfinalizer(teardown) + for n in ly_test_tools.o3de.asset_processor_utils.processList: + assert not ly_test_tools.o3de.asset_processor_utils.check_ap_running(n), f"{n} process did not shutdown correctly." + return ap diff --git a/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py b/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py index f30ed2f233..8551e5c0ef 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/asset_processor_utils.py @@ -8,11 +8,12 @@ SPDX-License-Identifier: Apache-2.0 OR MIT import logging import os import subprocess +import psutil import ly_test_tools.environment.process_utils as process_utils logger = logging.getLogger(__name__) - +processList = ["AssetProcessor_tmp","AssetProcessor","AssetProcessorBatch","AssetBuilder","rc","Lua Editor"] def start_asset_processor(bin_dir): """ @@ -39,9 +40,16 @@ def kill_asset_processor(): :return: None """ - process_utils.kill_processes_named('AssetProcessor_tmp', ignore_extensions=True) - process_utils.kill_processes_named('AssetProcessor', ignore_extensions=True) - process_utils.kill_processes_named('AssetProcessorBatch', ignore_extensions=True) - process_utils.kill_processes_named('AssetBuilder', ignore_extensions=True) - process_utils.kill_processes_named('rc', ignore_extensions=True) - process_utils.kill_processes_named('Lua Editor', ignore_extensions=True) + for n in processList: + process_utils.kill_processes_named(n, ignore_extensions=True) + + +# Uses psutil to check if a specified process is running. +def check_ap_running(processName): + for proc in psutil.process_iter(): + try: + if processName.lower() in proc.name().lower(): + return True + except (psutil.AccessDenied, psutil.NoSuchProcess, psutil.ZombieProcess): + pass + return False From e407191b644aadecfaee7fd0c33cc88c64f2ed29 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Thu, 2 Dec 2021 14:15:27 -0800 Subject: [PATCH 37/42] Update AWS package version for MacOS (#6058) Signed-off-by: amzn-sj --- cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake index 3f2dc8cedf..a7dcf115eb 100644 --- a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake +++ b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake @@ -26,7 +26,7 @@ ly_associate_package(PACKAGE_NAME DirectXShaderCompilerDxc-1.6.2104-o3de-rev3-ma ly_associate_package(PACKAGE_NAME SPIRVCross-2021.04.29-rev1-mac TARGETS SPIRVCross PACKAGE_HASH 78c6376ed2fd195b9b1f5fb2b56e5267a32c3aa21fb399e905308de470eb4515) ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-mac TARGETS TIFF PACKAGE_HASH c2615ccdadcc0e1d6c5ed61e5965c4d3a82193d206591b79b805c3b3ff35a4bf) ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-mac TARGETS freetype PACKAGE_HASH f159b346ac3251fb29cb8dd5f805c99b0015ed7fdb3887f656945ca701a61d0d) -ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev5-mac TARGETS AWSNativeSDK PACKAGE_HASH ffb890bd9cf23afb429b9214ad9bac1bf04696f07a0ebb93c42058c482ab2f01) +ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev6-mac TARGETS AWSNativeSDK PACKAGE_HASH 9b058376dec042ace98e198e902b399739adeb9e9398a6c210171fb530164577) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev6-mac TARGETS Lua PACKAGE_HASH b9079fd35634774c9269028447562c6b712dbc83b9c64975c095fd423ff04c08) ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev5-mac TARGETS PhysX PACKAGE_HASH 83940b3876115db82cd8ffcb9e902278e75846d6ad94a41e135b155cee1ee186) ly_associate_package(PACKAGE_NAME mcpp-2.7.2_az.2-rev1-mac TARGETS mcpp PACKAGE_HASH be9558905c9c49179ef3d7d84f0a5472415acdf7fe2d76eb060d9431723ddf2e) From 28f38ca0095ac5db8d47d79ad8bdf2a23eaefc82 Mon Sep 17 00:00:00 2001 From: Roman <69218254+amzn-rhhong@users.noreply.github.com> Date: Thu, 2 Dec 2021 14:15:59 -0800 Subject: [PATCH 38/42] Update the deformer in the atom debug draw (#6095) Signed-off-by: rhhong --- .../EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp index 82ee19b6a5..421e5828b1 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp @@ -46,6 +46,14 @@ namespace AZ::Render return; } + // Update the mesh deformers (perform cpu skinning and morphing) when needed. + if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_AABB] || renderFlags[EMotionFX::ActorRenderFlag::RENDER_FACENORMALS] || + renderFlags[EMotionFX::ActorRenderFlag::RENDER_TANGENTS] || renderFlags[EMotionFX::ActorRenderFlag::RENDER_VERTEXNORMALS] || + renderFlags[EMotionFX::ActorRenderFlag::RENDER_WIREFRAME]) + { + instance->UpdateMeshDeformers(0.0f, true); + } + const RPI::Scene* scene = RPI::Scene::GetSceneForEntityId(m_entityId); const RPI::ViewportContextPtr viewport = AZ::Interface::Get()->GetViewportContextByScene(scene); AzFramework::DebugDisplayRequests* debugDisplay = GetDebugDisplay(viewport->GetId()); From 4d5aad13d16102c9dd4ea36fd984bc73ad163b15 Mon Sep 17 00:00:00 2001 From: michabr <82236305+michabr@users.noreply.github.com> Date: Thu, 2 Dec 2021 14:47:32 -0800 Subject: [PATCH 39/42] Remove legacy renderer dependencies in LyShine and move LyShine headers to gem (#6049) * Remove CryRenderer dependencies Signed-off-by: abrmich * Fix non-unity compile error Signed-off-by: abrmich * Remove ITexture.h reference Signed-off-by: abrmich * Simple file moves from CryCommon to LyShine Gem Signed-off-by: abrmich * More simple file moves from CryCommon to LyShine Gem Signed-off-by: abrmich * Move more headers from CryCommon to LyShine Gem Signed-off-by: abrmich * Add LyShine gem module as a build dependency to fix compile error in some gems Signed-off-by: abrmich --- Code/Editor/GameEngine.cpp | 8 -- .../EditorCommon/editorcommon_files.cmake | 1 - Code/Legacy/CryCommon/crycommon_files.cmake | 77 ------------------ .../CrySystem/LevelSystem/LevelSystem.cpp | 7 -- .../LevelSystem/SpawnableLevelSystem.cpp | 7 -- Code/Legacy/CrySystem/System.cpp | 8 -- Code/Legacy/CrySystem/SystemInit.cpp | 7 -- .../Editor/Animation/UiAnimViewAnimNode.cpp | 2 +- .../Animation/UiAnimViewSequenceManager.cpp | 2 +- Gems/LyShine/Code/Editor/EditorWindow.h | 2 +- .../Editor/LyShineEditorSystemComponent.cpp | 12 +++ .../Editor/LyShineEditorSystemComponent.h | 7 ++ .../Code/Editor/SpriteBorderEditorCommon.h | 1 - Gems/LyShine/Code/Editor/ViewportWidget.cpp | 30 ------- .../Include}/LyShine/Animation/IUiAnimation.h | 0 .../Include}/LyShine/Bus/Sprite/UiSpriteBus.h | 0 .../LyShine/Bus/Tools/UiSystemToolsBus.h | 0 .../Include}/LyShine/Bus/UiAnimateEntityBus.h | 0 .../Include}/LyShine/Bus/UiAnimationBus.h | 0 .../Code/Include}/LyShine/Bus/UiButtonBus.h | 0 .../Code/Include}/LyShine/Bus/UiCanvasBus.h | 0 .../Include}/LyShine/Bus/UiCanvasManagerBus.h | 0 .../Bus/UiCanvasUpdateNotificationBus.h | 0 .../Code/Include}/LyShine/Bus/UiCheckboxBus.h | 0 .../Include}/LyShine/Bus/UiDraggableBus.h | 0 .../Include}/LyShine/Bus/UiDropTargetBus.h | 0 .../Code/Include}/LyShine/Bus/UiDropdownBus.h | 0 .../LyShine/Bus/UiDropdownOptionBus.h | 0 .../Include}/LyShine/Bus/UiDynamicLayoutBus.h | 0 .../LyShine/Bus/UiDynamicScrollBoxBus.h | 0 .../Code/Include}/LyShine/Bus/UiEditorBus.h | 0 .../Include}/LyShine/Bus/UiEditorCanvasBus.h | 0 .../Bus/UiEditorChangeNotificationBus.h | 0 .../Code/Include}/LyShine/Bus/UiElementBus.h | 0 .../Include}/LyShine/Bus/UiEntityContextBus.h | 0 .../Code/Include}/LyShine/Bus/UiFaderBus.h | 0 .../LyShine/Bus/UiFlipbookAnimationBus.h | 0 .../LyShine/Bus/UiGameEntityContextBus.h | 0 .../Code/Include}/LyShine/Bus/UiImageBus.h | 0 .../Include}/LyShine/Bus/UiImageSequenceBus.h | 0 .../LyShine/Bus/UiIndexableImageBus.h | 0 .../LyShine/Bus/UiInitializationBus.h | 0 .../LyShine/Bus/UiInteractableActionsBus.h | 0 .../Include}/LyShine/Bus/UiInteractableBus.h | 0 .../LyShine/Bus/UiInteractableStatesBus.h | 0 .../LyShine/Bus/UiInteractionMaskBus.h | 0 .../Code/Include}/LyShine/Bus/UiLayoutBus.h | 0 .../Include}/LyShine/Bus/UiLayoutCellBus.h | 0 .../LyShine/Bus/UiLayoutCellDefaultBus.h | 0 .../Include}/LyShine/Bus/UiLayoutColumnBus.h | 0 .../LyShine/Bus/UiLayoutControllerBus.h | 0 .../Include}/LyShine/Bus/UiLayoutFitterBus.h | 0 .../Include}/LyShine/Bus/UiLayoutGridBus.h | 0 .../Include}/LyShine/Bus/UiLayoutManagerBus.h | 0 .../Include}/LyShine/Bus/UiLayoutRowBus.h | 0 .../Include}/LyShine/Bus/UiMarkupButtonBus.h | 0 .../Code/Include}/LyShine/Bus/UiMaskBus.h | 0 .../Include}/LyShine/Bus/UiNavigationBus.h | 0 .../LyShine/Bus/UiParticleEmitterBus.h | 0 .../Include}/LyShine/Bus/UiRadioButtonBus.h | 0 .../Bus/UiRadioButtonCommunicationBus.h | 0 .../LyShine/Bus/UiRadioButtonGroupBus.h | 0 .../Bus/UiRadioButtonGroupCommunicationBus.h | 0 .../Code/Include}/LyShine/Bus/UiRenderBus.h | 0 .../Include}/LyShine/Bus/UiRenderControlBus.h | 0 .../Include}/LyShine/Bus/UiScrollBarBus.h | 0 .../Include}/LyShine/Bus/UiScrollBoxBus.h | 0 .../Include}/LyShine/Bus/UiScrollableBus.h | 0 .../Code/Include}/LyShine/Bus/UiScrollerBus.h | 0 .../Code/Include}/LyShine/Bus/UiSliderBus.h | 0 .../Code/Include}/LyShine/Bus/UiSpawnerBus.h | 0 .../Code/Include}/LyShine/Bus/UiSystemBus.h | 0 .../Code/Include}/LyShine/Bus/UiTextBus.h | 0 .../Include}/LyShine/Bus/UiTextInputBus.h | 0 .../Code/Include}/LyShine/Bus/UiTooltipBus.h | 0 .../LyShine/Bus/UiTooltipDataPopulatorBus.h | 0 .../LyShine/Bus/UiTooltipDisplayBus.h | 0 .../Include}/LyShine/Bus/UiTransform2dBus.h | 0 .../Include}/LyShine/Bus/UiTransformBus.h | 0 .../Code/Include}/LyShine/Bus/UiVisualBus.h | 0 .../LyShine/Bus/World/UiCanvasOnMeshBus.h | 0 .../LyShine/Bus/World/UiCanvasRefBus.h | 0 .../LyShine/Code/Include}/LyShine/IDraw2d.h | 0 .../LyShine/Code/Include}/LyShine/ILyShine.h | 0 .../Code/Include}/LyShine/IRenderGraph.h | 9 +-- .../LyShine/Code/Include}/LyShine/ISprite.h | 0 .../LyShine/Code/Include}/LyShine/UiBase.h | 0 .../Code/Include}/LyShine/UiComponentTypes.h | 0 .../Code/Include/LyShine}/UiEditorDLLBus.h | 0 .../Code/Include}/LyShine/UiEntityContext.h | 0 .../Code/Include}/LyShine/UiLayoutCellBase.h | 0 .../Code/Include/LyShine/UiRenderFormats.h | 53 +++++++++++++ .../Include}/LyShine/UiSerializeHelpers.h | 0 .../Source/Animation/UiAnimationSystem.cpp | 1 - Gems/LyShine/Code/Source/Draw2d.cpp | 35 ++++---- Gems/LyShine/Code/Source/LyShine.cpp | 6 -- Gems/LyShine/Code/Source/LyShine.h | 9 --- .../LyShine/Code/Source/LyShineLoadScreen.cpp | 2 - .../Code/Source/LyShineSystemComponent.cpp | 24 +++++- .../Code/Source/LyShineSystemComponent.h | 6 ++ .../Code/Source/Particle/UiParticle.cpp | 3 +- .../LyShine/Code/Source/Particle/UiParticle.h | 4 +- Gems/LyShine/Code/Source/RenderGraph.cpp | 35 ++++---- Gems/LyShine/Code/Source/RenderGraph.h | 24 +++--- Gems/LyShine/Code/Source/Sprite.cpp | 1 - .../LyShine/Code/Source/UiButtonComponent.cpp | 1 - .../LyShine/Code/Source/UiCanvasComponent.cpp | 1 - Gems/LyShine/Code/Source/UiCanvasManager.cpp | 1 - Gems/LyShine/Code/Source/UiFaderComponent.cpp | 4 +- Gems/LyShine/Code/Source/UiFaderComponent.h | 2 +- Gems/LyShine/Code/Source/UiImageComponent.cpp | 56 +++++++------ Gems/LyShine/Code/Source/UiImageComponent.h | 13 ++- .../Code/Source/UiImageSequenceComponent.cpp | 14 ++-- .../Code/Source/UiImageSequenceComponent.h | 6 +- .../Code/Source/UiInteractableState.cpp | 3 +- Gems/LyShine/Code/Source/UiMaskComponent.cpp | 5 +- Gems/LyShine/Code/Source/UiMaskComponent.h | 7 +- .../LyShine/Code/Source/UiNavigationHelpers.h | 2 +- .../Code/Source/UiNavigationSettings.h | 2 +- .../Source/UiParticleEmitterComponent.cpp | 4 +- .../Code/Source/UiParticleEmitterComponent.h | 4 +- Gems/LyShine/Code/Source/UiTextComponent.cpp | 40 ++++++++-- Gems/LyShine/Code/Source/UiTextComponent.h | 6 +- .../Code/Source/UiTextInputComponent.cpp | 1 - .../Code/Source/UiTransform2dComponent.cpp | 2 - .../World/UiCanvasAssetRefComponent.cpp | 2 +- Gems/LyShine/Code/lyshine_static_files.cmake | 79 +++++++++++++++++++ .../Code/Source/UiCustomImageComponent.cpp | 4 +- .../Code/Source/UiCustomImageComponent.h | 3 +- Gems/MessagePopup/Code/CMakeLists.txt | 1 + Gems/VirtualGamepad/Code/CMakeLists.txt | 1 + 131 files changed, 329 insertions(+), 318 deletions(-) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Animation/IUiAnimation.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/Sprite/UiSpriteBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/Tools/UiSystemToolsBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiAnimateEntityBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiAnimationBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiButtonBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiCanvasBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiCanvasManagerBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiCanvasUpdateNotificationBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiCheckboxBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiDraggableBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiDropTargetBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiDropdownBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiDropdownOptionBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiDynamicLayoutBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiDynamicScrollBoxBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiEditorBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiEditorCanvasBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiEditorChangeNotificationBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiElementBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiEntityContextBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiFaderBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiFlipbookAnimationBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiGameEntityContextBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiImageBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiImageSequenceBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiIndexableImageBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiInitializationBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiInteractableActionsBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiInteractableBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiInteractableStatesBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiInteractionMaskBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutCellBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutCellDefaultBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutColumnBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutControllerBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutFitterBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutGridBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutManagerBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiLayoutRowBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiMarkupButtonBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiMaskBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiNavigationBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiParticleEmitterBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiRadioButtonBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiRadioButtonCommunicationBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiRadioButtonGroupBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiRenderBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiRenderControlBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiScrollBarBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiScrollBoxBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiScrollableBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiScrollerBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiSliderBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiSpawnerBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiSystemBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiTextBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiTextInputBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiTooltipBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiTooltipDataPopulatorBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiTooltipDisplayBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiTransform2dBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiTransformBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/UiVisualBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/World/UiCanvasOnMeshBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/Bus/World/UiCanvasRefBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/IDraw2d.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/ILyShine.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/IRenderGraph.h (87%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/ISprite.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/UiBase.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/UiComponentTypes.h (100%) rename {Code/Editor/Plugins/EditorCommon => Gems/LyShine/Code/Include/LyShine}/UiEditorDLLBus.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/UiEntityContext.h (100%) rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/UiLayoutCellBase.h (100%) create mode 100644 Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h rename {Code/Legacy/CryCommon => Gems/LyShine/Code/Include}/LyShine/UiSerializeHelpers.h (100%) diff --git a/Code/Editor/GameEngine.cpp b/Code/Editor/GameEngine.cpp index ed8f30af93..e82832fc21 100644 --- a/Code/Editor/GameEngine.cpp +++ b/Code/Editor/GameEngine.cpp @@ -35,7 +35,6 @@ // CryCommon #include -#include #include // Editor @@ -595,13 +594,6 @@ void CGameEngine::SwitchToInEditor() // Enable accelerators. GetIEditor()->EnableAcceleratos(true); - - // reset UI system - if (gEnv->pLyShine) - { - gEnv->pLyShine->Reset(); - } - // [Anton] - order changed, see comments for CGameEngine::SetSimulationMode //! Send event to switch out of game. GetIEditor()->GetObjectManager()->SendEvent(EVENT_OUTOFGAME); diff --git a/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake b/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake index c1f1a531e8..1c6efbdf2c 100644 --- a/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake +++ b/Code/Editor/Plugins/EditorCommon/editorcommon_files.cmake @@ -13,7 +13,6 @@ set(FILES EditorCommonAPI.h ActionOutput.h ActionOutput.cpp - UiEditorDLLBus.h DockTitleBarWidget.cpp DockTitleBarWidget.h SaveUtilities/AsyncSaveRunner.h diff --git a/Code/Legacy/CryCommon/crycommon_files.cmake b/Code/Legacy/CryCommon/crycommon_files.cmake index 68cf579ca8..a4d87c207a 100644 --- a/Code/Legacy/CryCommon/crycommon_files.cmake +++ b/Code/Legacy/CryCommon/crycommon_files.cmake @@ -100,85 +100,8 @@ set(FILES platform_impl.cpp Win32specific.h Win64specific.h - LyShine/IDraw2d.h - LyShine/ILyShine.h - LyShine/ISprite.h - LyShine/IRenderGraph.h LyShine/UiAssetTypes.h - LyShine/UiComponentTypes.h - LyShine/UiBase.h - LyShine/UiEntityContext.h - LyShine/UiLayoutCellBase.h - LyShine/UiSerializeHelpers.h - LyShine/Animation/IUiAnimation.h - LyShine/Bus/UiAnimateEntityBus.h - LyShine/Bus/UiAnimationBus.h - LyShine/Bus/UiButtonBus.h - LyShine/Bus/UiCanvasBus.h - LyShine/Bus/UiCanvasManagerBus.h - LyShine/Bus/UiCanvasUpdateNotificationBus.h - LyShine/Bus/UiCheckboxBus.h LyShine/Bus/UiCursorBus.h - LyShine/Bus/UiDraggableBus.h - LyShine/Bus/UiDropdownBus.h - LyShine/Bus/UiDropdownOptionBus.h - LyShine/Bus/UiDropTargetBus.h - LyShine/Bus/UiDynamicLayoutBus.h - LyShine/Bus/UiDynamicScrollBoxBus.h - LyShine/Bus/UiEditorBus.h - LyShine/Bus/UiEditorCanvasBus.h - LyShine/Bus/UiEditorChangeNotificationBus.h - LyShine/Bus/UiElementBus.h - LyShine/Bus/UiEntityContextBus.h - LyShine/Bus/UiFaderBus.h - LyShine/Bus/UiFlipbookAnimationBus.h - LyShine/Bus/UiGameEntityContextBus.h - LyShine/Bus/UiImageBus.h - LyShine/Bus/UiImageSequenceBus.h - LyShine/Bus/UiIndexableImageBus.h - LyShine/Bus/UiInitializationBus.h - LyShine/Bus/UiInteractableActionsBus.h - LyShine/Bus/UiInteractableBus.h - LyShine/Bus/UiInteractableStatesBus.h - LyShine/Bus/UiInteractionMaskBus.h - LyShine/Bus/UiLayoutBus.h - LyShine/Bus/UiLayoutCellBus.h - LyShine/Bus/UiLayoutCellDefaultBus.h - LyShine/Bus/UiLayoutColumnBus.h - LyShine/Bus/UiLayoutControllerBus.h - LyShine/Bus/UiLayoutFitterBus.h - LyShine/Bus/UiLayoutGridBus.h - LyShine/Bus/UiLayoutManagerBus.h - LyShine/Bus/UiLayoutRowBus.h - LyShine/Bus/UiMarkupButtonBus.h - LyShine/Bus/UiMaskBus.h - LyShine/Bus/UiNavigationBus.h - LyShine/Bus/UiParticleEmitterBus.h - LyShine/Bus/UiRadioButtonBus.h - LyShine/Bus/UiRadioButtonCommunicationBus.h - LyShine/Bus/UiRadioButtonGroupBus.h - LyShine/Bus/UiRadioButtonGroupCommunicationBus.h - LyShine/Bus/UiRenderBus.h - LyShine/Bus/UiRenderControlBus.h - LyShine/Bus/UiScrollableBus.h - LyShine/Bus/UiScrollBarBus.h - LyShine/Bus/UiScrollBoxBus.h - LyShine/Bus/UiScrollerBus.h - LyShine/Bus/UiSliderBus.h - LyShine/Bus/UiSpawnerBus.h - LyShine/Bus/UiSystemBus.h - LyShine/Bus/UiTextBus.h - LyShine/Bus/UiTextInputBus.h - LyShine/Bus/UiTooltipBus.h - LyShine/Bus/UiTooltipDataPopulatorBus.h - LyShine/Bus/UiTooltipDisplayBus.h - LyShine/Bus/UiTransform2dBus.h - LyShine/Bus/UiTransformBus.h - LyShine/Bus/UiVisualBus.h - LyShine/Bus/Sprite/UiSpriteBus.h - LyShine/Bus/World/UiCanvasOnMeshBus.h - LyShine/Bus/World/UiCanvasRefBus.h - LyShine/Bus/Tools/UiSystemToolsBus.h Maestro/Bus/EditorSequenceAgentComponentBus.h Maestro/Bus/EditorSequenceBus.h Maestro/Bus/EditorSequenceComponentBus.h diff --git a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp index 8945761184..6027e9c474 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp @@ -27,7 +27,6 @@ #include #include "MainThreadRenderRequestBus.h" -#include #include #include #include @@ -882,12 +881,6 @@ void CLevelSystem::UnloadLevel() // Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event). EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect); - // Perform level unload procedures for the LyShine UI system - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->OnLevelUnload(); - } - m_bLevelLoaded = false; [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index b91c8f2ca9..69e0b0c2a6 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -19,7 +19,6 @@ #include #include "MainThreadRenderRequestBus.h" -#include #include #include #include @@ -558,12 +557,6 @@ namespace LegacyLevelSystem // Normally the GC step is triggered at the end of this method (by the ESYSTEM_EVENT_LEVEL_POST_UNLOAD event). EBUS_EVENT(AZ::ScriptSystemRequestBus, GarbageCollect); - // Perform level unload procedures for the LyShine UI system - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->OnLevelUnload(); - } - m_bLevelLoaded = false; [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; diff --git a/Code/Legacy/CrySystem/System.cpp b/Code/Legacy/CrySystem/System.cpp index 6b985a3f6f..c1ef60414f 100644 --- a/Code/Legacy/CrySystem/System.cpp +++ b/Code/Legacy/CrySystem/System.cpp @@ -116,7 +116,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) #include #include #include -#include #include @@ -373,14 +372,7 @@ void CSystem::ShutDown() m_pSystemEventDispatcher->OnSystemEvent(ESYSTEM_EVENT_FULL_SHUTDOWN, 0, 0); } - if (gEnv && gEnv->pLyShine) - { - gEnv->pLyShine->Release(); - gEnv->pLyShine = nullptr; - } - SAFE_RELEASE(m_env.pMovieSystem); - SAFE_RELEASE(m_env.pLyShine); SAFE_RELEASE(m_env.pCryFont); if (m_env.pConsole) { diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index e0986d3ec9..f612972a1a 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -52,7 +52,6 @@ #include #include -#include #include #include #include @@ -77,7 +76,6 @@ #include #include #include -#include #include #include "XConsole.h" @@ -1105,11 +1103,6 @@ AZ_POP_DISABLE_WARNING InlineInitializationProcessing("CSystem::Init Level System"); - if (m_env.pLyShine) - { - m_env.pLyShine->PostInit(); - } - InlineInitializationProcessing("CSystem::Init InitLmbrAWS"); // Az to Cry console binding diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp index 5d62f88310..9aee4b10cd 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewAnimNode.cpp @@ -8,7 +8,7 @@ #include "UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiAnimViewAnimNode.h" #include "UiAnimViewTrack.h" #include "UiAnimViewSequence.h" diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp index 4cfeeaff6a..2a6c607b24 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimViewSequenceManager.cpp @@ -8,7 +8,7 @@ #include "UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiAnimViewSequenceManager.h" #include "UiAnimViewUndo.h" #include "AnimationContext.h" diff --git a/Gems/LyShine/Code/Editor/EditorWindow.h b/Gems/LyShine/Code/Editor/EditorWindow.h index d9b3e60c32..538e565b7a 100644 --- a/Gems/LyShine/Code/Editor/EditorWindow.h +++ b/Gems/LyShine/Code/Editor/EditorWindow.h @@ -11,7 +11,7 @@ #include "EditorCommon.h" #include "Animation/UiEditorAnimationBus.h" -#include "UiEditorDLLBus.h" +#include #include "UiEditorInternalBus.h" #include "UiEditorEntityContext.h" #include "UiSliceManager.h" diff --git a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp index f32ba1dbd5..229101d4c0 100644 --- a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp +++ b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.cpp @@ -103,6 +103,7 @@ namespace LyShineEditor void LyShineEditorSystemComponent::Activate() { AzToolsFramework::EditorEventsBus::Handler::BusConnect(); + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); LyShine::LyShineRequestBus::Handler::BusConnect(); } @@ -118,6 +119,7 @@ namespace LyShineEditor } LyShine::LyShineRequestBus::Handler::BusDisconnect(); AzToolsFramework::EditorEventsBus::Handler::BusDisconnect(); + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -204,4 +206,14 @@ namespace LyShineEditor UiEditorDLLBus::Broadcast(&UiEditorDLLInterface::OpenSourceCanvasFile, absoluteName); } } + + //////////////////////////////////////////////////////////////////////////////////////////////// + void LyShineEditorSystemComponent::OnStopPlayInEditor() + { + // reset UI system + if (gEnv->pLyShine) + { + gEnv->pLyShine->Reset(); + } + } } diff --git a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h index 340c40cc5e..f355f18c3d 100644 --- a/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h +++ b/Gems/LyShine/Code/Editor/LyShineEditorSystemComponent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace LyShineEditor @@ -18,6 +19,7 @@ namespace LyShineEditor class LyShineEditorSystemComponent : public AZ::Component , protected AzToolsFramework::EditorEvents::Bus::Handler + , protected AzToolsFramework::EditorEntityContextNotificationBus::Handler , protected AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler , protected LyShine::LyShineRequestBus::Handler { @@ -58,5 +60,10 @@ namespace LyShineEditor // LyShineRequestBus interface implementation void EditUICanvas(const AZStd::string_view& canvasPath) override; //////////////////////////////////////////////////////////////////////// + + //////////////////////////////////////////////////////////////////////// + // EditorEntityContextNotificationBus + void OnStopPlayInEditor() override; + //////////////////////////////////////////////////////////////////////// }; } diff --git a/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h b/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h index 3f4d6b25b9..95e3256160 100644 --- a/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h +++ b/Gems/LyShine/Code/Editor/SpriteBorderEditorCommon.h @@ -10,7 +10,6 @@ #include // required to be included before platform.h #include #include -#include #include #include diff --git a/Gems/LyShine/Code/Editor/ViewportWidget.cpp b/Gems/LyShine/Code/Editor/ViewportWidget.cpp index bf7447585c..0746a5213f 100644 --- a/Gems/LyShine/Code/Editor/ViewportWidget.cpp +++ b/Gems/LyShine/Code/Editor/ViewportWidget.cpp @@ -454,29 +454,6 @@ void ViewportWidget::contextMenuEvent(QContextMenuEvent* e) RenderViewportWidget::contextMenuEvent(e); } -#ifdef LYSHINE_ATOM_TODO // check if still needed -void ViewportWidget::HandleSignalRender([[maybe_unused]] const SRenderContext& context) -{ - // Called from QViewport when redrawing the viewport. - // Triggered from a QViewport resize event or from our call to QViewport::Update - if (m_canvasRenderIsEnabled) - { - gEnv->pRenderer->SetSrgbWrite(true); - - UiEditorMode editorMode = m_editorWindow->GetEditorMode(); - - if (editorMode == UiEditorMode::Edit) - { - RenderEditMode(); - } - else // if (editorMode == UiEditorMode::Preview) - { - RenderPreviewMode(); - } - } -} -#endif - void ViewportWidget::UserSelectionChanged(HierarchyItemRawPtrList* items) { Refresh(); @@ -999,13 +976,6 @@ void ViewportWidget::RenderEditMode() m_viewportInteraction->GetCanvasToViewportScale(), m_viewportInteraction->GetCanvasToViewportTranslation()); -#ifdef LYSHINE_ATOM_TODO - // clear the stencil buffer before rendering each canvas - required for masking - // NOTE: the FRT_CLEAR_IMMEDIATE is required since we will not be setting the render target - ColorF viewportBackgroundColor(0, 0, 0, 0); // if clearing color we want to set alpha to zero also - gEnv->pRenderer->ClearTargetsImmediately(FRT_CLEAR_STENCIL, viewportBackgroundColor); -#endif - // Set the target size of the canvas EBUS_EVENT_ID(canvasEntityId, UiCanvasBus, SetTargetCanvasSize, false, canvasSize); diff --git a/Code/Legacy/CryCommon/LyShine/Animation/IUiAnimation.h b/Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Animation/IUiAnimation.h rename to Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/Sprite/UiSpriteBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/Sprite/UiSpriteBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/Sprite/UiSpriteBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/Sprite/UiSpriteBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/Tools/UiSystemToolsBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/Tools/UiSystemToolsBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/Tools/UiSystemToolsBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/Tools/UiSystemToolsBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiAnimateEntityBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiAnimateEntityBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiAnimateEntityBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiAnimateEntityBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiAnimationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiAnimationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiAnimationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiAnimationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasManagerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasManagerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasManagerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasManagerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCanvasUpdateNotificationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCanvasUpdateNotificationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiCheckboxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiCheckboxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiCheckboxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiCheckboxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDraggableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDraggableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDraggableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDraggableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropTargetBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropTargetBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropTargetBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropTargetBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropdownBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropdownBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDropdownOptionBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownOptionBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDropdownOptionBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDropdownOptionBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDynamicLayoutBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicLayoutBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDynamicLayoutBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicLayoutBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiDynamicScrollBoxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicScrollBoxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiDynamicScrollBoxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiDynamicScrollBoxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorCanvasBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorCanvasBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorCanvasBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorCanvasBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEditorChangeNotificationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEditorChangeNotificationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEditorChangeNotificationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEditorChangeNotificationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiElementBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiElementBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiElementBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiElementBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiEntityContextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiEntityContextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiEntityContextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiEntityContextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiFaderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiFaderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiFaderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiFaderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiFlipbookAnimationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiFlipbookAnimationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiFlipbookAnimationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiFlipbookAnimationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiGameEntityContextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiGameEntityContextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiGameEntityContextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiGameEntityContextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiImageBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiImageBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiImageBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiImageBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiImageSequenceBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiImageSequenceBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiImageSequenceBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiImageSequenceBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiIndexableImageBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiIndexableImageBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiIndexableImageBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiIndexableImageBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInitializationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInitializationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInitializationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInitializationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableActionsBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableActionsBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableActionsBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableActionsBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractableStatesBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableStatesBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractableStatesBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractableStatesBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiInteractionMaskBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiInteractionMaskBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiInteractionMaskBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiInteractionMaskBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellDefaultBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellDefaultBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutCellDefaultBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutCellDefaultBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutColumnBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutColumnBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutColumnBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutColumnBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutControllerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutControllerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutControllerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutControllerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutFitterBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutFitterBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutFitterBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutFitterBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutGridBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutGridBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutGridBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutGridBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutManagerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutManagerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutManagerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutManagerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiLayoutRowBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutRowBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiLayoutRowBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiLayoutRowBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiMarkupButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiMarkupButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiMarkupButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiMarkupButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiMaskBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiMaskBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiMaskBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiMaskBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiNavigationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiNavigationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiNavigationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiNavigationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiParticleEmitterBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiParticleEmitterBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiParticleEmitterBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiParticleEmitterBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonCommunicationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonCommunicationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonCommunicationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonCommunicationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRenderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRenderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRenderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRenderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiRenderControlBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiRenderControlBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiRenderControlBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiRenderControlBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollBarBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBarBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollBarBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBarBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollBoxBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBoxBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollBoxBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollBoxBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollableBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollableBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollableBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollableBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiScrollerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiScrollerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiScrollerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiScrollerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSliderBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSliderBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSliderBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSliderBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSpawnerBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSpawnerBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSpawnerBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSpawnerBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiSystemBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiSystemBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiSystemBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiSystemBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTextBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTextBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTextBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTextBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTextInputBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTextInputBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTextInputBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTextInputBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDataPopulatorBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDataPopulatorBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDataPopulatorBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDataPopulatorBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDisplayBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDisplayBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTooltipDisplayBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTooltipDisplayBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTransform2dBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTransform2dBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTransform2dBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTransform2dBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiTransformBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiTransformBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiTransformBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiTransformBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/UiVisualBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/UiVisualBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/UiVisualBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/UiVisualBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasOnMeshBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasOnMeshBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasOnMeshBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasOnMeshBus.h diff --git a/Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasRefBus.h b/Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasRefBus.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/Bus/World/UiCanvasRefBus.h rename to Gems/LyShine/Code/Include/LyShine/Bus/World/UiCanvasRefBus.h diff --git a/Code/Legacy/CryCommon/LyShine/IDraw2d.h b/Gems/LyShine/Code/Include/LyShine/IDraw2d.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/IDraw2d.h rename to Gems/LyShine/Code/Include/LyShine/IDraw2d.h diff --git a/Code/Legacy/CryCommon/LyShine/ILyShine.h b/Gems/LyShine/Code/Include/LyShine/ILyShine.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/ILyShine.h rename to Gems/LyShine/Code/Include/LyShine/ILyShine.h diff --git a/Code/Legacy/CryCommon/LyShine/IRenderGraph.h b/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h similarity index 87% rename from Code/Legacy/CryCommon/LyShine/IRenderGraph.h rename to Gems/LyShine/Code/Include/LyShine/IRenderGraph.h index 716e0f7417..0e7c127677 100644 --- a/Code/Legacy/CryCommon/LyShine/IRenderGraph.h +++ b/Gems/LyShine/Code/Include/LyShine/IRenderGraph.h @@ -7,9 +7,8 @@ */ #pragma once -#include -#include #include +#include namespace AZ { @@ -42,10 +41,6 @@ namespace LyShine //! End the setup of a mask render node, this marks the end of adding child primitives virtual void EndMask() = 0; - //! Begin rendering to a texture - virtual void BeginRenderToTexture(int renderTargetHandle, SDepthTexture* renderTargetDepthSurface, - const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) = 0; - //! End rendering to a texture virtual void EndRenderToTexture() = 0; @@ -53,7 +48,7 @@ namespace LyShine //! The graph handles the allocation of this DynUiPrimitive and deletes it when the graph is reset //! This can be used if the UI component doesn't want to own the storage of the primitive. Used infrequently, //! e.g. for the selection rect on a text component. - virtual DynUiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0; + virtual LyShine::UiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) = 0; //---- Functions for supporting masking (used during creation of the graph, not rendering ) ---- diff --git a/Code/Legacy/CryCommon/LyShine/ISprite.h b/Gems/LyShine/Code/Include/LyShine/ISprite.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/ISprite.h rename to Gems/LyShine/Code/Include/LyShine/ISprite.h diff --git a/Code/Legacy/CryCommon/LyShine/UiBase.h b/Gems/LyShine/Code/Include/LyShine/UiBase.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiBase.h rename to Gems/LyShine/Code/Include/LyShine/UiBase.h diff --git a/Code/Legacy/CryCommon/LyShine/UiComponentTypes.h b/Gems/LyShine/Code/Include/LyShine/UiComponentTypes.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiComponentTypes.h rename to Gems/LyShine/Code/Include/LyShine/UiComponentTypes.h diff --git a/Code/Editor/Plugins/EditorCommon/UiEditorDLLBus.h b/Gems/LyShine/Code/Include/LyShine/UiEditorDLLBus.h similarity index 100% rename from Code/Editor/Plugins/EditorCommon/UiEditorDLLBus.h rename to Gems/LyShine/Code/Include/LyShine/UiEditorDLLBus.h diff --git a/Code/Legacy/CryCommon/LyShine/UiEntityContext.h b/Gems/LyShine/Code/Include/LyShine/UiEntityContext.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiEntityContext.h rename to Gems/LyShine/Code/Include/LyShine/UiEntityContext.h diff --git a/Code/Legacy/CryCommon/LyShine/UiLayoutCellBase.h b/Gems/LyShine/Code/Include/LyShine/UiLayoutCellBase.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiLayoutCellBase.h rename to Gems/LyShine/Code/Include/LyShine/UiLayoutCellBase.h diff --git a/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h b/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h new file mode 100644 index 0000000000..632642856e --- /dev/null +++ b/Gems/LyShine/Code/Include/LyShine/UiRenderFormats.h @@ -0,0 +1,53 @@ +/* + * 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 + * + */ +#pragma once + +#include + +namespace LyShine +{ + struct UCol + { + union + { + uint32 dcolor; + uint8 bcolor[4]; + + struct + { + uint8 b, g, r, a; + }; + struct + { + uint8 z, y, x, w; + }; + }; + }; + + struct UiPrimitiveVertex + { + Vec2 xy; + UCol color; + Vec2 st; + uint8 texIndex; + uint8 texHasColorChannel; + uint8 texIndex2; + uint8 pad; + }; + + using UiIndice = AZ::u16; + + struct UiPrimitive : public AZStd::intrusive_slist_node + { + UiPrimitiveVertex* m_vertices = nullptr; + uint16* m_indices = nullptr; + int m_numVertices = 0; + int m_numIndices = 0; + }; + using UiPrimitiveList = AZStd::intrusive_slist>; +}; diff --git a/Code/Legacy/CryCommon/LyShine/UiSerializeHelpers.h b/Gems/LyShine/Code/Include/LyShine/UiSerializeHelpers.h similarity index 100% rename from Code/Legacy/CryCommon/LyShine/UiSerializeHelpers.h rename to Gems/LyShine/Code/Include/LyShine/UiSerializeHelpers.h diff --git a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp index 13a4ddb425..c8818836d6 100644 --- a/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp +++ b/Gems/LyShine/Code/Source/Animation/UiAnimationSystem.cpp @@ -22,7 +22,6 @@ #include #include #include -#include ////////////////////////////////////////////////////////////////////////// namespace diff --git a/Gems/LyShine/Code/Source/Draw2d.cpp b/Gems/LyShine/Code/Source/Draw2d.cpp index 9a97f27592..f2c7c360d2 100644 --- a/Gems/LyShine/Code/Source/Draw2d.cpp +++ b/Gems/LyShine/Code/Source/Draw2d.cpp @@ -5,9 +5,9 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#include // for SVF_P3F_C4B_T2F which will be removed in a coming PR #include +#include #include "LyShinePassDataBus.h" #include @@ -22,15 +22,23 @@ #include #include -//////////////////////////////////////////////////////////////////////////////////////////////////// -// LOCAL STATIC FUNCTIONS -//////////////////////////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// Color to u32 => 0xAARRGGBB -static AZ::u32 PackARGB8888(const AZ::Color& color) +namespace { - return (color.GetA8() << 24) | (color.GetR8() << 16) | (color.GetG8() << 8) | color.GetB8(); + //////////////////////////////////////////////////////////////////////////////////////////////////// + // Color to u32 => 0xAARRGGBB + AZ::u32 PackARGB8888(const AZ::Color& color) + { + return (color.GetA8() << 24) | (color.GetR8() << 16) | (color.GetG8() << 8) | color.GetB8(); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////// + // Vertex format for Dynamic Draw Context + struct Draw2dVertex + { + Vec3 xyz; + LyShine::UCol color; + Vec2 st; + }; } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -739,7 +747,7 @@ void CDraw2d::DeferredQuad::Draw(AZ::RHI::Ptr dynam const float z = 1.0f; // depth test disabled, if writing Z this will write at far plane - SVF_P3F_C4B_T2F vertices[NUM_VERTS]; + Draw2dVertex vertices[NUM_VERTS]; const int vertIndex[NUM_VERTS] = { 0, 1, 3, 3, 1, 2 }; @@ -804,7 +812,7 @@ void CDraw2d::DeferredLine::Draw(AZ::RHI::Ptr dynam const int32 NUM_VERTS = 2; - SVF_P3F_C4B_T2F vertices[NUM_VERTS]; + Draw2dVertex vertices[NUM_VERTS]; for (int i = 0; i < NUM_VERTS; ++i) { @@ -857,9 +865,9 @@ void CDraw2d::DeferredRectOutline::Draw(AZ::RHI::PtrSetPrimitiveType(AZ::RHI::PrimitiveTopology::TriangleList); dynamicDraw->DrawIndexed(vertices, NUM_VERTS, indices, NUM_INDICES, AZ::RHI::IndexFormat::Uint16, drawSrg); - } //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Gems/LyShine/Code/Source/LyShine.cpp b/Gems/LyShine/Code/Source/LyShine.cpp index 19c6e4281e..d19bc3f92d 100644 --- a/Gems/LyShine/Code/Source/LyShine.cpp +++ b/Gems/LyShine/Code/Source/LyShine.cpp @@ -520,12 +520,6 @@ void CLyShine::OnLoadScreenUnloaded() m_uiCanvasManager->OnLoadScreenUnloaded(); } -//////////////////////////////////////////////////////////////////////////////////////////////////// -void CLyShine::OnDebugDraw() -{ - LyShineDebug::RenderDebug(); -} - //////////////////////////////////////////////////////////////////////////////////////////////////// void CLyShine::IncrementVisibleCounter() { diff --git a/Gems/LyShine/Code/Source/LyShine.h b/Gems/LyShine/Code/Source/LyShine.h index 065ad59f80..82f902a9f8 100644 --- a/Gems/LyShine/Code/Source/LyShine.h +++ b/Gems/LyShine/Code/Source/LyShine.h @@ -7,7 +7,6 @@ */ #pragma once -#include #include #include #include @@ -38,7 +37,6 @@ struct IConsoleCmdArgs; //! CLyShine is the full implementation of the ILyShine interface class CLyShine : public ILyShine - , public IRenderDebugListener , public UiCursorBus::Handler , public AzFramework::InputChannelEventListener , public AzFramework::InputTextEventListener @@ -88,13 +86,6 @@ public: // ~ILyShine - // IRenderDebugListener - - //! Renders any debug displays currently enabled for the UI system - void OnDebugDraw() override; - - // ~IRenderDebugListener - // UiCursorInterface void IncrementVisibleCounter() override; void DecrementVisibleCounter() override; diff --git a/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp b/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp index 831bdb048a..c59cb5cb34 100644 --- a/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp +++ b/Gems/LyShine/Code/Source/LyShineLoadScreen.cpp @@ -10,8 +10,6 @@ #if AZ_LOADSCREENCOMPONENT_ENABLED -#include - #include #include #include diff --git a/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp b/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp index f815e2ddbd..787797e462 100644 --- a/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp +++ b/Gems/LyShine/Code/Source/LyShineSystemComponent.cpp @@ -377,7 +377,7 @@ namespace LyShine } /////////////////////////////////////////////////////////////////////////////////////////////// - void LyShineSystemComponent::OnCrySystemInitialized([[maybe_unused]] ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams) + void LyShineSystemComponent::OnCrySystemInitialized(ISystem& system, [[maybe_unused]] const SSystemInitParams& startupParams) { #if !defined(AZ_MONOLITHIC_BUILD) // When module is linked dynamically, we must set our gEnv pointer. @@ -387,16 +387,36 @@ namespace LyShine m_pLyShine = new CLyShine(gEnv->pSystem); gEnv->pLyShine = m_pLyShine; + system.GetILevelSystem()->AddListener(this); + BroadcastCursorImagePathname(); + + if (gEnv->pLyShine) + { + gEnv->pLyShine->PostInit(); + } } - void LyShineSystemComponent::OnCrySystemShutdown([[maybe_unused]] ISystem& system) + /////////////////////////////////////////////////////////////////////////////////////////////// + void LyShineSystemComponent::OnCrySystemShutdown(ISystem& system) { + system.GetILevelSystem()->RemoveListener(this); + gEnv->pLyShine = nullptr; delete m_pLyShine; m_pLyShine = nullptr; } + //////////////////////////////////////////////////////////////////////// + void LyShineSystemComponent::OnUnloadComplete([[maybe_unused]] const char* levelName) + { + // Perform level unload procedures for the LyShine UI system + if (gEnv && gEnv->pLyShine) + { + gEnv->pLyShine->OnLevelUnload(); + } + } + //////////////////////////////////////////////////////////////////////////////////////////////////// void LyShineSystemComponent::BroadcastCursorImagePathname() { diff --git a/Gems/LyShine/Code/Source/LyShineSystemComponent.h b/Gems/LyShine/Code/Source/LyShineSystemComponent.h index 5b4086007b..d2cdcf6761 100644 --- a/Gems/LyShine/Code/Source/LyShineSystemComponent.h +++ b/Gems/LyShine/Code/Source/LyShineSystemComponent.h @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -37,6 +38,7 @@ namespace LyShine , protected LyShineAllocatorScope , protected UiFrameworkBus::Handler , protected CrySystemEventBus::Handler + , public ILevelSystemListener { public: AZ_COMPONENT(LyShineSystemComponent, lyShineSystemComponentUuid); @@ -92,6 +94,10 @@ namespace LyShine void OnCrySystemShutdown(ISystem&) override; //////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////// + // ILevelSystemListener interface implementation + void OnUnloadComplete(const char* levelName) override; + void BroadcastCursorImagePathname(); #if !defined(LYSHINE_BUILDER) && !defined(LYSHINE_TESTS) diff --git a/Gems/LyShine/Code/Source/Particle/UiParticle.cpp b/Gems/LyShine/Code/Source/Particle/UiParticle.cpp index 077e83a696..5354e52724 100644 --- a/Gems/LyShine/Code/Source/Particle/UiParticle.cpp +++ b/Gems/LyShine/Code/Source/Particle/UiParticle.cpp @@ -10,7 +10,6 @@ #include "UiParticleEmitterComponent.h" #include -#include //////////////////////////////////////////////////////////////////////////////////////////////////// void UiParticle::Init(UiParticle::UiParticleInitialParameters* initialParams) @@ -99,7 +98,7 @@ void UiParticle::Update(float deltaTime, const UiParticleUpdateParameters& updat } //////////////////////////////////////////////////////////////////////////////////////////////////// -bool UiParticle::FillVertices(SVF_P2F_C4B_T2F_F4B* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform) +bool UiParticle::FillVertices(LyShine::UiPrimitiveVertex* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform) { float particleLifetimePercentage = (renderParameters.isParticleInfinite ? 0.0f : m_particleAge / m_particleLifetime); float alphaStrength = 1.0f; diff --git a/Gems/LyShine/Code/Source/Particle/UiParticle.h b/Gems/LyShine/Code/Source/Particle/UiParticle.h index 24509634e1..2b8f83c63b 100644 --- a/Gems/LyShine/Code/Source/Particle/UiParticle.h +++ b/Gems/LyShine/Code/Source/Particle/UiParticle.h @@ -16,7 +16,7 @@ #include #include -#include +#include class UiParticle { @@ -81,7 +81,7 @@ public: //! Fill out the four vertices for the particle. //! Returns false if the vertex was not added because it was fully transparent. - bool FillVertices(SVF_P2F_C4B_T2F_F4B* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform); + bool FillVertices(LyShine::UiPrimitiveVertex* outputVertices, const UiParticleRenderParameters& renderParameters, const AZ::Matrix4x4& transform); bool IsActive(bool infiniteLifetime) const; diff --git a/Gems/LyShine/Code/Source/RenderGraph.cpp b/Gems/LyShine/Code/Source/RenderGraph.cpp index 567c29eecd..c7baf82fc0 100644 --- a/Gems/LyShine/Code/Source/RenderGraph.cpp +++ b/Gems/LyShine/Code/Source/RenderGraph.cpp @@ -154,7 +154,7 @@ namespace LyShine // [LYSHINE_ATOM_TODO][ATOM-15073] - need to combine into a single DrawIndexed call to take advantage of the draw call // optimization done by this RenderGraph. This option will be added to DynamicDrawContext. For // now we could combine the vertices ourselves - for (const DynUiPrimitive& primitive : m_primitives) + for (const LyShine::UiPrimitive& primitive : m_primitives) { dynamicDraw->DrawIndexed(primitive.m_vertices, primitive.m_numVertices, primitive.m_indices, primitive.m_numIndices, AZ::RHI::IndexFormat::Uint16, drawSrg); } @@ -163,7 +163,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void PrimitiveListRenderNode::AddPrimitive(DynUiPrimitive* primitive) + void PrimitiveListRenderNode::AddPrimitive(LyShine::UiPrimitive* primitive) { // always clear the next pointer before adding to list primitive->m_next = nullptr; @@ -174,9 +174,9 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - DynUiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const + LyShine::UiPrimitiveList& PrimitiveListRenderNode::GetPrimitives() const { - return const_cast(m_primitives); + return const_cast(m_primitives); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -198,7 +198,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - bool PrimitiveListRenderNode::HasSpaceToAddPrimitive(DynUiPrimitive* primitive) const + bool PrimitiveListRenderNode::HasSpaceToAddPrimitive(LyShine::UiPrimitive* primitive) const { return primitive->m_numVertices + m_totalNumVertices < std::numeric_limits::max(); } @@ -222,9 +222,9 @@ namespace LyShine { size_t numPrims = m_primitives.size(); size_t primCount = 0; - const DynUiPrimitive* lastPrim = nullptr; + const LyShine::UiPrimitive* lastPrim = nullptr; int highestTexUnit = 0; - for (const DynUiPrimitive& primitive : m_primitives) + for (const LyShine::UiPrimitive& primitive : m_primitives) { if (primCount > numPrims) { @@ -665,13 +665,6 @@ namespace LyShine } } - //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::BeginRenderToTexture([[maybe_unused]] int renderTargetHandle, [[maybe_unused]] SDepthTexture* renderTargetDepthSurface, - [[maybe_unused]] const AZ::Vector2& viewportTopLeft, [[maybe_unused]] const AZ::Vector2& viewportSize, [[maybe_unused]] const AZ::Color& clearColor) - { - // LYSHINE_ATOM_TODO - this function will be removed when all IRenderer references are gone from UI components - } - //////////////////////////////////////////////////////////////////////////////////////////////////// void RenderGraph::BeginRenderToTexture(AZ::Data::Instance attachmentImage, const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) @@ -705,7 +698,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::AddPrimitiveAtom(DynUiPrimitive* primitive, const AZ::Data::Instance& texture, + void RenderGraph::AddPrimitiveAtom(LyShine::UiPrimitive* primitive, const AZ::Data::Instance& texture, bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode) { AZStd::vector* renderNodeList = m_renderNodeListStack.top(); @@ -778,7 +771,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - void RenderGraph::AddAlphaMaskPrimitiveAtom(DynUiPrimitive* primitive, + void RenderGraph::AddAlphaMaskPrimitiveAtom(LyShine::UiPrimitive* primitive, AZ::Data::Instance contentAttachmentImage, AZ::Data::Instance maskAttachmentImage, bool isClampTextureMode, @@ -862,7 +855,7 @@ namespace LyShine } //////////////////////////////////////////////////////////////////////////////////////////////////// - DynUiPrimitive* RenderGraph::GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) + LyShine::UiPrimitive* RenderGraph::GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) { const int numVertsInQuad = 4; const int numIndicesInQuad = 6; @@ -1154,10 +1147,10 @@ namespace LyShine const PrimitiveListRenderNode* primListRenderNode = static_cast(renderNode); - DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); + LyShine::UiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); info.m_numPrimitives += static_cast(primitives.size()); { - for (const DynUiPrimitive& primitive : primitives) + for (const LyShine::UiPrimitive& primitive : primitives) { info.m_numTriangles += primitive.m_numIndices / 3; } @@ -1338,10 +1331,10 @@ namespace LyShine previousNodeAlreadyCounted = false; } - DynUiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); + LyShine::UiPrimitiveList& primitives = primListRenderNode->GetPrimitives(); int numPrimitives = static_cast(primitives.size()); int numTriangles = 0; - for (const DynUiPrimitive& primitive : primitives) + for (const LyShine::UiPrimitive& primitive : primitives) { numTriangles += primitive.m_numIndices / 3; } diff --git a/Gems/LyShine/Code/Source/RenderGraph.h b/Gems/LyShine/Code/Source/RenderGraph.h index 9edc1f50e8..36a9e63c5f 100644 --- a/Gems/LyShine/Code/Source/RenderGraph.h +++ b/Gems/LyShine/Code/Source/RenderGraph.h @@ -8,8 +8,8 @@ #pragma once -#include #include +#include #include #include #include @@ -79,8 +79,8 @@ namespace LyShine , const AZ::Matrix4x4& modelViewProjMat , AZ::RHI::Ptr dynamicDraw) override; - void AddPrimitive(DynUiPrimitive* primitive); - DynUiPrimitiveList& GetPrimitives() const; + void AddPrimitive(LyShine::UiPrimitive* primitive); + LyShine::UiPrimitiveList& GetPrimitives() const; int GetOrAddTexture(const AZ::Data::Instance& texture, bool isClampTextureMode); int GetNumTextures() const { return m_numTextures; } @@ -92,7 +92,7 @@ namespace LyShine bool GetIsPremultiplyAlpha() const { return m_preMultiplyAlpha; } AlphaMaskType GetAlphaMaskType() const { return m_alphaMaskType; } - bool HasSpaceToAddPrimitive(DynUiPrimitive* primitive) const; + bool HasSpaceToAddPrimitive(LyShine::UiPrimitive* primitive) const; // Search to see if this texture is already used by this texture unit, returns -1 if not used int FindTexture(const AZ::Data::Instance& texture, bool isClampTextureMode) const; @@ -122,7 +122,7 @@ namespace LyShine int m_totalNumVertices; int m_totalNumIndices; - DynUiPrimitiveList m_primitives; + LyShine::UiPrimitiveList m_primitives; }; // A mask render node handles using one set of render nodes to mask another set of render nodes @@ -262,13 +262,9 @@ namespace LyShine void StartChildrenForMask() override; void EndMask() override; - //! Begin rendering to a texture - void BeginRenderToTexture(int renderTargetHandle, SDepthTexture* renderTargetDepthSurface, - const AZ::Vector2& viewportTopLeft, const AZ::Vector2& viewportSize, const AZ::Color& clearColor) override; - void EndRenderToTexture() override; - DynUiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) override; + LyShine::UiPrimitive* GetDynamicQuadPrimitive(const AZ::Vector2* positions, uint32 packedColor) override; bool IsRenderingToMask() const override; void SetIsRenderingToMask(bool isRenderingToMask) override; @@ -280,11 +276,11 @@ namespace LyShine // ~IRenderGraph // LYSHINE_ATOM_TODO - this can be renamed back to AddPrimitive after removal of IRenderer from all UI components - void AddPrimitiveAtom(DynUiPrimitive* primitive, const AZ::Data::Instance& texture, + void AddPrimitiveAtom(LyShine::UiPrimitive* primitive, const AZ::Data::Instance& texture, bool isClampTextureMode, bool isTextureSRGB, bool isTexturePremultipliedAlpha, BlendMode blendMode); //! Add an indexed triangle list primitive to the render graph which will use maskTexture as an alpha (gradient) mask - void AddAlphaMaskPrimitiveAtom(DynUiPrimitive* primitive, + void AddAlphaMaskPrimitiveAtom(LyShine::UiPrimitive* primitive, AZ::Data::Instance contentAttachmentImage, AZ::Data::Instance maskAttachmentImage, bool isClampTextureMode, @@ -333,8 +329,8 @@ namespace LyShine struct DynamicQuad { - SVF_P2F_C4B_T2F_F4B m_quadVerts[4]; - DynUiPrimitive m_primitive; + LyShine::UiPrimitiveVertex m_quadVerts[4]; + LyShine::UiPrimitive m_primitive; }; protected: // member functions diff --git a/Gems/LyShine/Code/Source/Sprite.cpp b/Gems/LyShine/Code/Source/Sprite.cpp index d9a0775cc1..65da7fa159 100644 --- a/Gems/LyShine/Code/Source/Sprite.cpp +++ b/Gems/LyShine/Code/Source/Sprite.cpp @@ -7,7 +7,6 @@ */ #include "Sprite.h" #include -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiButtonComponent.cpp b/Gems/LyShine/Code/Source/UiButtonComponent.cpp index 11bb088400..06444cebe4 100644 --- a/Gems/LyShine/Code/Source/UiButtonComponent.cpp +++ b/Gems/LyShine/Code/Source/UiButtonComponent.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiCanvasComponent.cpp b/Gems/LyShine/Code/Source/UiCanvasComponent.cpp index d967b88610..964ce1d0fa 100644 --- a/Gems/LyShine/Code/Source/UiCanvasComponent.cpp +++ b/Gems/LyShine/Code/Source/UiCanvasComponent.cpp @@ -16,7 +16,6 @@ #include "UiRenderer.h" #include "LyShine.h" -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiCanvasManager.cpp b/Gems/LyShine/Code/Source/UiCanvasManager.cpp index f2397248b6..d17b868bbc 100644 --- a/Gems/LyShine/Code/Source/UiCanvasManager.cpp +++ b/Gems/LyShine/Code/Source/UiCanvasManager.cpp @@ -12,7 +12,6 @@ #include "UiCanvasComponent.h" #include "UiGameEntityContext.h" -#include #include #include diff --git a/Gems/LyShine/Code/Source/UiFaderComponent.cpp b/Gems/LyShine/Code/Source/UiFaderComponent.cpp index cfca774612..62acbc30ef 100644 --- a/Gems/LyShine/Code/Source/UiFaderComponent.cpp +++ b/Gems/LyShine/Code/Source/UiFaderComponent.cpp @@ -503,7 +503,7 @@ void UiFaderComponent::UpdateCachedPrimitive(const AZ::Vector2& pixelAlignedTopL { // verts not yet allocated, allocate them now const int numIndices = 6; - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; static uint16 indices[numIndices] = { 0, 1, 2, 2, 3, 0 }; @@ -602,7 +602,7 @@ void UiFaderComponent::RenderRttFader(LyShine::IRenderGraph* renderGraph, UiElem if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { diff --git a/Gems/LyShine/Code/Source/UiFaderComponent.h b/Gems/LyShine/Code/Source/UiFaderComponent.h index 218eab3794..3de1514023 100644 --- a/Gems/LyShine/Code/Source/UiFaderComponent.h +++ b/Gems/LyShine/Code/Source/UiFaderComponent.h @@ -169,5 +169,5 @@ private: // data int m_renderTargetHeight = 0; //! cached rendering data for performance optimization of rendering the render target to screen - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; diff --git a/Gems/LyShine/Code/Source/UiImageComponent.cpp b/Gems/LyShine/Code/Source/UiImageComponent.cpp index fac8a83c71..c47d4b6ea1 100644 --- a/Gems/LyShine/Code/Source/UiImageComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageComponent.cpp @@ -13,8 +13,6 @@ #include #include -#include - #include #include #include @@ -188,7 +186,7 @@ namespace //! Set the values for an image vertex //! This helper function is used so that we only have to initialize textIndex and texHasColorChannel in one place - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const Vec2& pos, uint32 color, const Vec2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const Vec2& pos, uint32 color, const Vec2& uv) { vert.xy = pos; vert.color.dcolor = color; @@ -201,7 +199,7 @@ namespace //! Set the values for an image vertex //! This version of the helper function takes AZ vectors - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) { SetVertex(vert, Vec2(pos.GetX(), pos.GetY()), color, Vec2(uv.GetX(), uv.GetY())); } @@ -215,7 +213,7 @@ namespace //! \param packedColor The color value to be put in every vertex //! \param transform The transform to be applied to the points //! \param xValues The x-values for the edges and borders - void FillVerts(SVF_P2F_C4B_T2F_F4B* verts, [[maybe_unused]] uint32 numVerts, uint32 numX, uint32 numY, uint32 packedColor, const AZ::Matrix4x4& transform, + void FillVerts(LyShine::UiPrimitiveVertex* verts, [[maybe_unused]] uint32 numVerts, uint32 numX, uint32 numY, uint32 packedColor, const AZ::Matrix4x4& transform, float* xValues, float* yValues, float* sValues, float* tValues, bool isPixelAligned) { @@ -463,7 +461,7 @@ void UiImageComponent::Render(LyShine::IRenderGraph* renderGraph) if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -1535,7 +1533,7 @@ void UiImageComponent::RenderSingleQuad(const AZ::Vector2* positions, const AZ:: // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding); @@ -1594,7 +1592,7 @@ void UiImageComponent::RenderLinearFilledQuad(const AZ::Vector2* positions, cons // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { @@ -1653,7 +1651,7 @@ void UiImageComponent::RenderRadialFilledQuad(const AZ::Vector2* positions, cons // Fill vertices (rotated based on startingEdge). const int numVertices = 7; // The maximum amount of vertices that can be used - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; for (int i = 1; i < 5; ++i) { int srcIndex = (4 + i + startingEdge) % 4; @@ -1701,7 +1699,7 @@ void UiImageComponent::RenderRadialCornerFilledQuad(const AZ::Vector2* positions { // This fills the vertices (rotating them based on the origin edge) similar to RenderSingleQuad, then edits a vertex based on m_fillAmount. const uint32 numVerts = 4; - SVF_P2F_C4B_T2F_F4B verts[numVerts]; + LyShine::UiPrimitiveVertex verts[numVerts]; int vertexOffset = 0; if (m_fillCornerOrigin == FillCornerOrigin::TopLeft) { @@ -1754,7 +1752,7 @@ void UiImageComponent::RenderRadialEdgeFilledQuad(const AZ::Vector2* positions, { // This fills the vertices (rotating them based on the origin edge) similar to RenderSingleQuad, then edits a vertex based on m_fillAmount. const uint32 numVertices = 5; // Need an extra vertex for the origin. - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; int vertexOffset = 0; if (m_fillEdgeOrigin == FillEdgeOrigin::Left) { @@ -1916,7 +1914,7 @@ template void UiImageComponent::RenderSlicedFillModeNoneSprite { // fill out the verts const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; FillVerts(vertices, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); int totalIndices = m_fillCenter ? numIndicesIn9Slice : numIndicesIn9SliceExcludingCenter; @@ -1932,7 +1930,7 @@ template void UiImageComponent::RenderSlicedLinearFilledSprite // 2. Fill vertices in the same way as a standard sliced sprite const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; ClipValuesForSlicedLinearFill(numValues, xValues, yValues, sValues, tValues); @@ -1950,7 +1948,7 @@ template void UiImageComponent::RenderSlicedRadialFilledSprite { // build the verts on the stack const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; // Fill the vertices with the generated xy and st values. FillVerts(verts, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); @@ -1968,7 +1966,7 @@ template void UiImageComponent::RenderSlicedRadialCornerOrEdge { // build the verts on the stack const uint32 numVertices = numValues * numValues; - SVF_P2F_C4B_T2F_F4B verts[numVertices]; + LyShine::UiPrimitiveVertex verts[numVertices]; // Fill the vertices with the generated xy and st values. FillVerts(verts, numVertices, numValues, numValues, packedColor, transform, xValues, yValues, sValues, tValues, IsPixelAligned()); @@ -2053,12 +2051,12 @@ void UiImageComponent::ClipValuesForSlicedLinearFill(uint32 numValues, float* xV } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices) +void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices) { // 1. Calculate two points of lines from the center to a point based on m_fillAmount and m_fillOrigin. // 2. Clip the triangles of the sprite against those lines based on the fill amount. - SVF_P2F_C4B_T2F_F4B renderVerts[numIndicesIn9Slice * 4]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. + LyShine::UiPrimitiveVertex renderVerts[numIndicesIn9Slice * 4]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. uint16 renderIndices[numIndicesIn9Slice * 4] = { 0 }; float fillOffset = AZ::DegToRad(m_fillStartAngle); @@ -2102,7 +2100,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, // Clips against first half line and then rotating line and adds results to render list. for (uint32 currentIndex = 0; currentIndex < totalIndices; currentIndex += 3) { - SVF_P2F_C4B_T2F_F4B intermediateVerts[maxTemporaryVerts]; + LyShine::UiPrimitiveVertex intermediateVerts[maxTemporaryVerts]; uint16 intermediateIndices[maxTemporaryIndices]; int intermedateVertexOffset = 0; int intermediateIndicesUsed = ClipToLine(verts, &indices[currentIndex], intermediateVerts, intermediateIndices, intermedateVertexOffset, 0, lineOrigin, firstHalfFixedLineEnd); @@ -2118,7 +2116,7 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, // Clips against first half line and adds results to render list then clips against the second half line and rotating line and also adds those results to render list. for (uint32 currentIndex = 0; currentIndex < totalIndices; currentIndex += 3) { - SVF_P2F_C4B_T2F_F4B intermediateVerts[maxTemporaryVerts]; + LyShine::UiPrimitiveVertex intermediateVerts[maxTemporaryVerts]; uint16 intermediateIndices[maxTemporaryIndices]; indicesUsed = ClipToLine(verts, &indices[currentIndex], renderVerts, renderIndices, vertexOffset, numIndicesToRender, lineOrigin, firstHalfFixedLineEnd); numIndicesToRender += indicesUsed; @@ -2137,12 +2135,12 @@ void UiImageComponent::ClipAndRenderForSlicedRadialFill(uint32 numVertsPerSide, } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerSide, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices) +void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerSide, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices) { // 1. Calculate two points of a line from either the corner or center of an edge to a point based on m_fillAmount. // 2. Clip the triangles of the sprite against that line. - SVF_P2F_C4B_T2F_F4B renderVerts[numIndicesIn9Slice * 2]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. + LyShine::UiPrimitiveVertex renderVerts[numIndicesIn9Slice * 2]; // ClipToLine doesn't check for duplicate vertices for speed, so this is the maximum we'll need. uint16 renderIndices[numIndicesIn9Slice * 2] = { 0 }; // Generate the start and direction of the line to clip against based on the fill origin and fill amount. @@ -2209,11 +2207,11 @@ void UiImageComponent::ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVe } //////////////////////////////////////////////////////////////////////////////////////////////////// -int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, SVF_P2F_C4B_T2F_F4B* renderVertices, uint16* renderIndices, int& vertexOffset, int renderIndexOffset, const Vec2& lineOrigin, const Vec2& lineEnd) +int UiImageComponent::ClipToLine(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, LyShine::UiPrimitiveVertex* renderVertices, uint16* renderIndices, int& vertexOffset, int renderIndexOffset, const Vec2& lineOrigin, const Vec2& lineEnd) { Vec2 lineVector = lineEnd - lineOrigin; - SVF_P2F_C4B_T2F_F4B lastVertex = vertices[indices[2]]; - SVF_P2F_C4B_T2F_F4B currentVertex; + LyShine::UiPrimitiveVertex lastVertex = vertices[indices[2]]; + LyShine::UiPrimitiveVertex currentVertex; int verticesAdded = 0; for (int i = 0; i < 3; ++i) @@ -2235,7 +2233,7 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint { //add calculated intersection float intersectionDistance = (vertexToLine.x * perpendicularLineVector.x + vertexToLine.y * perpendicularLineVector.y) / (triangleEdgeDirection.x * perpendicularLineVector.x + triangleEdgeDirection.y * perpendicularLineVector.y); - SVF_P2F_C4B_T2F_F4B intersectPoint; + LyShine::UiPrimitiveVertex intersectPoint; SetVertex(intersectPoint, lastVertex.xy + triangleEdgeDirection * intersectionDistance, lastVertex.color.dcolor, lastVertex.st + (currentVertex.st - lastVertex.st) * intersectionDistance); @@ -2252,7 +2250,7 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint { //add calculated intersection float intersectionDistance = (vertexToLine.x * perpendicularLineVector.x + vertexToLine.y * perpendicularLineVector.y) / (triangleEdgeDirection.x * perpendicularLineVector.x + triangleEdgeDirection.y * perpendicularLineVector.y); - SVF_P2F_C4B_T2F_F4B intersectPoint; + LyShine::UiPrimitiveVertex intersectPoint; SetVertex(intersectPoint, lastVertex.xy + triangleEdgeDirection * intersectionDistance, lastVertex.color.dcolor, lastVertex.st + (currentVertex.st - lastVertex.st) * intersectionDistance); @@ -2288,12 +2286,12 @@ int UiImageComponent::ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices) +void UiImageComponent::RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices) { if (numVertices != m_cachedPrimitive.m_numVertices) { ClearCachedVertices(); - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } @@ -2304,7 +2302,7 @@ void UiImageComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, c m_cachedPrimitive.m_numIndices = numIndices; } - memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(SVF_P2F_C4B_T2F_F4B) * numVertices); + memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(LyShine::UiPrimitiveVertex) * numVertices); memcpy(m_cachedPrimitive.m_indices, indices, sizeof(uint16) * numIndices); m_isRenderCacheDirty = false; diff --git a/Gems/LyShine/Code/Source/UiImageComponent.h b/Gems/LyShine/Code/Source/UiImageComponent.h index 0b93d5f8e5..bac8d8e455 100644 --- a/Gems/LyShine/Code/Source/UiImageComponent.h +++ b/Gems/LyShine/Code/Source/UiImageComponent.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -26,8 +27,6 @@ #include -#include - class ITexture; class ISprite; @@ -200,12 +199,12 @@ private: // member functions template void RenderSlicedRadialCornerOrEdgeFilledSprite(uint32 packedColor, const AZ::Matrix4x4& transform, float* xValues, float* yValues, float* sValues, float* tValues); void ClipValuesForSlicedLinearFill(uint32 numValues, float* xValues, float* yValues, float* sValues, float* tValues); - void ClipAndRenderForSlicedRadialFill(uint32 numVertsPerside, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices); - void ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerside, uint32 numVerts, const SVF_P2F_C4B_T2F_F4B* verts, uint32 totalIndices, const uint16* indices); + void ClipAndRenderForSlicedRadialFill(uint32 numVertsPerside, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices); + void ClipAndRenderForSlicedRadialCornerOrEdgeFill(uint32 numVertsPerside, uint32 numVerts, const LyShine::UiPrimitiveVertex* verts, uint32 totalIndices, const uint16* indices); - int ClipToLine(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, SVF_P2F_C4B_T2F_F4B* newVertex, uint16* renderIndices, int& vertexOffset, int idxOffset, const Vec2& lineOrigin, const Vec2& lineEnd); + int ClipToLine(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, LyShine::UiPrimitiveVertex* newVertex, uint16* renderIndices, int& vertexOffset, int idxOffset, const Vec2& lineOrigin, const Vec2& lineEnd); - void RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices); + void RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices); void ClearCachedVertices(); void ClearCachedIndices(); void MarkRenderCacheDirty(); @@ -294,6 +293,6 @@ private: // data bool m_isAlphaOverridden; // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; diff --git a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp index d954cf2747..554a0383c1 100644 --- a/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp +++ b/Gems/LyShine/Code/Source/UiImageSequenceComponent.cpp @@ -26,7 +26,7 @@ namespace { //! Set the values for an image vertex //! This helper function is used so that we only have to initialize textIndex and texHasColorChannel in one place - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const Vec2& pos, uint32 color, const Vec2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const Vec2& pos, uint32 color, const Vec2& uv) { vert.xy = pos; vert.color.dcolor = color; @@ -39,7 +39,7 @@ namespace //! Set the values for an image vertex //! This version of the helper function takes AZ vectors - void SetVertex(SVF_P2F_C4B_T2F_F4B& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) + void SetVertex(LyShine::UiPrimitiveVertex& vert, const AZ::Vector2& pos, uint32 color, const AZ::Vector2& uv) { SetVertex(vert, Vec2(pos.GetX(), pos.GetY()), color, Vec2(uv.GetX(), uv.GetY())); } @@ -146,7 +146,7 @@ void UiImageSequenceComponent::Render(LyShine::IRenderGraph* renderGraph) if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = desiredPackedAlpha; for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { @@ -540,7 +540,7 @@ void UiImageSequenceComponent::RenderSingleQuad(const AZ::Vector2* positions, co // points are a clockwise quad IDraw2d::Rounding pixelRounding = IsPixelAligned() ? IDraw2d::Rounding::Nearest : IDraw2d::Rounding::None; const uint32 numVertices = 4; - SVF_P2F_C4B_T2F_F4B vertices[numVertices]; + LyShine::UiPrimitiveVertex vertices[numVertices]; for (int i = 0; i < numVertices; ++i) { AZ::Vector2 roundedPoint = Draw2dHelper::RoundXY(positions[i], pixelRounding); @@ -554,12 +554,12 @@ void UiImageSequenceComponent::RenderSingleQuad(const AZ::Vector2* positions, co } //////////////////////////////////////////////////////////////////////////////////////////////////// -void UiImageSequenceComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices) +void UiImageSequenceComponent::RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices) { if (numVertices != m_cachedPrimitive.m_numVertices) { ClearCachedVertices(); - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } @@ -570,7 +570,7 @@ void UiImageSequenceComponent::RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* ver m_cachedPrimitive.m_numIndices = numIndices; } - memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(SVF_P2F_C4B_T2F_F4B) * numVertices); + memcpy(m_cachedPrimitive.m_vertices, vertices, sizeof(LyShine::UiPrimitiveVertex) * numVertices); memcpy(m_cachedPrimitive.m_indices, indices, sizeof(uint16) * numIndices); m_isRenderCacheDirty = false; diff --git a/Gems/LyShine/Code/Source/UiImageSequenceComponent.h b/Gems/LyShine/Code/Source/UiImageSequenceComponent.h index 84be0021f4..063bd836ff 100644 --- a/Gems/LyShine/Code/Source/UiImageSequenceComponent.h +++ b/Gems/LyShine/Code/Source/UiImageSequenceComponent.h @@ -17,12 +17,12 @@ #include #include #include +#include #include #include #include -#include //! \brief Image component capable of indexing and displaying from multiple image files in a directory. //! @@ -137,7 +137,7 @@ private: // member functions void RenderStretchedToFitOrFillSprite(ISprite* sprite, int cellIndex, uint32 packedColor, bool toFit); void RenderSingleQuad(const AZ::Vector2* positions, const AZ::Vector2* uvs, uint32 packedColor); bool IsPixelAligned(); - void RenderTriangleList(const SVF_P2F_C4B_T2F_F4B* vertices, const uint16* indices, int numVertices, int numIndices); + void RenderTriangleList(const LyShine::UiPrimitiveVertex* vertices, const uint16* indices, int numVertices, int numIndices); void ClearCachedVertices(); void ClearCachedIndices(); void MarkRenderCacheDirty(); @@ -157,6 +157,6 @@ private: // data ImageType m_imageType = ImageType::Fixed; //!< Affects how the texture/sprite is mapped to the image rectangle // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; diff --git a/Gems/LyShine/Code/Source/UiInteractableState.cpp b/Gems/LyShine/Code/Source/UiInteractableState.cpp index 6027ecf3d7..d2c09201c6 100644 --- a/Gems/LyShine/Code/Source/UiInteractableState.cpp +++ b/Gems/LyShine/Code/Source/UiInteractableState.cpp @@ -21,9 +21,8 @@ #include #include #include -#include +#include -#include #include "EditorPropertyTypes.h" #include "Sprite.h" diff --git a/Gems/LyShine/Code/Source/UiMaskComponent.cpp b/Gems/LyShine/Code/Source/UiMaskComponent.cpp index b6ffc2ae89..ebe611d547 100644 --- a/Gems/LyShine/Code/Source/UiMaskComponent.cpp +++ b/Gems/LyShine/Code/Source/UiMaskComponent.cpp @@ -13,7 +13,6 @@ #include #include -#include "IRenderer.h" #include "RenderToTextureBus.h" #include "RenderGraph.h" #include @@ -624,7 +623,7 @@ void UiMaskComponent::UpdateCachedPrimitive(const AZ::Vector2& pixelAlignedTopLe { // verts not yet allocated, allocate them now const int numIndices = 6; - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; static uint16 indices[numIndices] = { 0, 1, 2, 2, 3, 0 }; @@ -761,7 +760,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph if (m_cachedPrimitive.m_vertices[0].color.a != desiredPackedAlpha) { // go through all the cached vertices and update the alpha values - UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; + LyShine::UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color; desiredPackedColor.a = static_cast(desiredPackedAlpha); for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i) { diff --git a/Gems/LyShine/Code/Source/UiMaskComponent.h b/Gems/LyShine/Code/Source/UiMaskComponent.h index 8e04fa0b4f..33f7f93124 100644 --- a/Gems/LyShine/Code/Source/UiMaskComponent.h +++ b/Gems/LyShine/Code/Source/UiMaskComponent.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -187,10 +188,6 @@ private: // data //! When rendering to a texture this is the attachment image for the render target AZ::RHI::AttachmentId m_contentAttachmentImageId; - - //! When rendering to a texture this is our depth surface, we use the same one for rendering the mask elements - //! and the content elements - it is cleared in between. - SDepthTexture* m_renderTargetDepthSurface = nullptr; //! When rendering to a texture this is the texture ID of the render target //! When rendering to a texture this is the attachment image for the render target @@ -205,7 +202,7 @@ private: // data int m_renderTargetHeight = 0; //! cached rendering data for performance optimization of rendering the render target to screen - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; #ifndef _RELEASE //! This variable is only used to prevent spamming a warning message each frame (for nested stencil masks) diff --git a/Gems/LyShine/Code/Source/UiNavigationHelpers.h b/Gems/LyShine/Code/Source/UiNavigationHelpers.h index 5b655b531f..98191b3da4 100644 --- a/Gems/LyShine/Code/Source/UiNavigationHelpers.h +++ b/Gems/LyShine/Code/Source/UiNavigationHelpers.h @@ -9,7 +9,7 @@ #include #include -#include +#include namespace AzFramework { diff --git a/Gems/LyShine/Code/Source/UiNavigationSettings.h b/Gems/LyShine/Code/Source/UiNavigationSettings.h index 829ff8d817..09a327f9c2 100644 --- a/Gems/LyShine/Code/Source/UiNavigationSettings.h +++ b/Gems/LyShine/Code/Source/UiNavigationSettings.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include /////////////////////////////////////////////////////////////////////////////////////////////////// class UiNavigationSettings diff --git a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp index 25498fc316..e55b310e4a 100644 --- a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp +++ b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.cpp @@ -833,7 +833,7 @@ void UiParticleEmitterComponent::Render(LyShine::IRenderGraph* renderGraph) // particlesToRender is the max particles we will render, we could render less if some have zero alpha for (AZ::u32 i = 0; i < particlesToRender; ++i) { - SVF_P2F_C4B_T2F_F4B* firstVertexOfParticle = &m_cachedPrimitive.m_vertices[totalVerticesInserted]; + LyShine::UiPrimitiveVertex* firstVertexOfParticle = &m_cachedPrimitive.m_vertices[totalVerticesInserted]; if (m_particleContainer[i].FillVertices(firstVertexOfParticle, renderParameters, transform)) { @@ -1845,7 +1845,7 @@ void UiParticleEmitterComponent::ResetParticleBuffers() { delete [] m_cachedPrimitive.m_vertices; } - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_particleContainer.clear(); m_particleContainer.reserve(m_particleBufferSize); diff --git a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h index 452e0ad01a..51db5cebef 100644 --- a/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h +++ b/Gems/LyShine/Code/Source/UiParticleEmitterComponent.h @@ -25,8 +25,6 @@ #include -#include - //////////////////////////////////////////////////////////////////////////////////////////////////// class UiParticleEmitterComponent : public AZ::Component @@ -349,5 +347,5 @@ protected: // data AZStd::vector m_particleContainer; AZ::u32 m_particleBufferSize = 0; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; diff --git a/Gems/LyShine/Code/Source/UiTextComponent.cpp b/Gems/LyShine/Code/Source/UiTextComponent.cpp index ec17e93529..825f3869fd 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextComponent.cpp @@ -1053,6 +1053,23 @@ namespace return maxLinesElementCanHold; } + //! Converts the vertex format used by FFont to the format being used by the dynamic draw context in LyShine. + //! + //! Note that the formats are currently identical, but this may change with the removal of more legacy code + void FontVertexToUiVertex(const SVF_P2F_C4B_T2F_F4B* fontVertices, LyShine::UiPrimitiveVertex* uiVertices, int numVertices) + { + for (int i = 0; i < numVertices; ++i) + { + uiVertices[i].xy = fontVertices[i].xy; + uiVertices[i].color.dcolor = fontVertices[i].color.dcolor; + uiVertices[i].st = fontVertices[i].st; + uiVertices[i].texIndex = fontVertices[i].texIndex; + uiVertices[i].texHasColorChannel = fontVertices[i].texHasColorChannel; + uiVertices[i].texIndex2 = fontVertices[i].texIndex2; + uiVertices[i].pad = fontVertices[i].pad; + } + } + } // anonymous namespace //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1823,7 +1840,7 @@ void UiTextComponent::Render(LyShine::IRenderGraph* renderGraph) for (UiTransformInterface::RectPoints& rect : rectPoints) { - DynUiPrimitive* primitive = renderGraph->GetDynamicQuadPrimitive(rect.pt, packedColor); + LyShine::UiPrimitive* primitive = renderGraph->GetDynamicQuadPrimitive(rect.pt, packedColor); primitive->m_next = nullptr; LyShine::RenderGraph* lyRenderGraph = static_cast(renderGraph); // LYSHINE_ATOM_TODO - find a different solution from downcasting - GHI #3570 @@ -4078,16 +4095,19 @@ void UiTextComponent::RenderDrawBatchLines( cacheBatch->m_font = drawBatch.font; cacheBatch->m_color = batchColor; - cacheBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numQuads * 4]; + cacheBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numQuads * 4]; cacheBatch->m_cachedPrimitive.m_indices = new uint16[numQuads * 6]; + AZStd::vector vertices(numQuads * 4); uint32 numQuadsWritten = cacheBatch->m_font->WriteTextQuadsToBuffers( - cacheBatch->m_cachedPrimitive.m_vertices, cacheBatch->m_cachedPrimitive.m_indices, numQuads, + vertices.data(), cacheBatch->m_cachedPrimitive.m_indices, numQuads, cacheBatch->m_position.GetX(), cacheBatch->m_position.GetY(), 1.0f, cacheBatch->m_text.c_str(), true, fontContext); AZ_Assert(numQuadsWritten <= numQuads, "value returned from WriteTextQuadsToBuffers is larger than size allocated"); - cacheBatch->m_cachedPrimitive.m_numVertices = numQuadsWritten * 4; + int numVertices = numQuadsWritten * 4; + FontVertexToUiVertex(vertices.data(), cacheBatch->m_cachedPrimitive.m_vertices, numVertices); + cacheBatch->m_cachedPrimitive.m_numVertices = numVertices; cacheBatch->m_cachedPrimitive.m_numIndices = numQuadsWritten * 6; cacheBatch->m_fontTextureVersion = drawBatch.font->GetFontTextureVersion(); @@ -4148,7 +4168,7 @@ void UiTextComponent::RenderDrawBatchLines( cacheImageBatch->m_texture = drawBatch.image->m_texture; - cacheImageBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[4]; + cacheImageBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[4]; for (int i = 0; i < 4; ++i) { cacheImageBatch->m_cachedPrimitive.m_vertices[i].xy = Vec2(imageQuad[i].GetX(), imageQuad[i].GetY()); @@ -4197,15 +4217,19 @@ void UiTextComponent::UpdateTextRenderBatchesForFontTextureChange() delete [] cacheBatch->m_cachedPrimitive.m_vertices; delete [] cacheBatch->m_cachedPrimitive.m_indices; - cacheBatch->m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numQuads * 4]; + cacheBatch->m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numQuads * 4]; cacheBatch->m_cachedPrimitive.m_indices = new uint16[numQuads * 6]; } + AZStd::vector vertices(numQuads * 4); uint32 numQuadsWritten = cacheBatch->m_font->WriteTextQuadsToBuffers( - cacheBatch->m_cachedPrimitive.m_vertices, cacheBatch->m_cachedPrimitive.m_indices, numQuads, + vertices.data(), cacheBatch->m_cachedPrimitive.m_indices, numQuads, cacheBatch->m_position.GetX(), cacheBatch->m_position.GetY(), 1.0f, cacheBatch->m_text.c_str(), true, fontContext); - cacheBatch->m_cachedPrimitive.m_numVertices = numQuadsWritten * 4; + int numVertices = numQuadsWritten * 4; + FontVertexToUiVertex(vertices.data(), cacheBatch->m_cachedPrimitive.m_vertices, numVertices); + + cacheBatch->m_cachedPrimitive.m_numVertices = numVertices; cacheBatch->m_cachedPrimitive.m_numIndices = numQuadsWritten * 6; cacheBatch->m_fontTextureVersion = cacheBatch->m_font->GetFontTextureVersion(); diff --git a/Gems/LyShine/Code/Source/UiTextComponent.h b/Gems/LyShine/Code/Source/UiTextComponent.h index cc1f9bf393..6c75c13941 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.h +++ b/Gems/LyShine/Code/Source/UiTextComponent.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -31,7 +32,6 @@ #include #include -#include #include #include #include @@ -608,13 +608,13 @@ private: // types ColorB m_color; IFFont* m_font; uint32 m_fontTextureVersion; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; struct RenderCacheImageBatch { AZ::Data::Instance m_texture; - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; }; struct RenderCacheData diff --git a/Gems/LyShine/Code/Source/UiTextInputComponent.cpp b/Gems/LyShine/Code/Source/UiTextInputComponent.cpp index 9a55a3feeb..0e65256b92 100644 --- a/Gems/LyShine/Code/Source/UiTextInputComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextInputComponent.cpp @@ -17,7 +17,6 @@ #include -#include #include #include #include diff --git a/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp b/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp index 40839fac66..d169e4ee68 100644 --- a/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTransform2dComponent.cpp @@ -12,8 +12,6 @@ #include #include -#include - #include #include #include diff --git a/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp b/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp index 59d764f297..933cca424a 100644 --- a/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp +++ b/Gems/LyShine/Code/Source/World/UiCanvasAssetRefComponent.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include //////////////////////////////////////////////////////////////////////////////////////////////////// //! UiCanvasAssetRefNotificationBus Behavior context handler class diff --git a/Gems/LyShine/Code/lyshine_static_files.cmake b/Gems/LyShine/Code/lyshine_static_files.cmake index 0c934eb057..1adbe1b796 100644 --- a/Gems/LyShine/Code/lyshine_static_files.cmake +++ b/Gems/LyShine/Code/lyshine_static_files.cmake @@ -9,6 +9,85 @@ set(FILES Source/Draw2d.cpp Include/LyShine/Draw2d.h + Include/LyShine/IDraw2d.h + Include/LyShine/IRenderGraph.h + Include/LyShine/ISprite.h + Include/LyShine/ILyShine.h + Include/LyShine/UiBase.h + Include/LyShine/UiLayoutCellBase.h + Include/LyShine/UiSerializeHelpers.h + Include/LyShine/UiComponentTypes.h + Include/LyShine/UiEntityContext.h + Include/LyShine/UiEditorDLLBus.h + Include/LyShine/UiRenderFormats.h + Include/LyShine/Animation/IUiAnimation.h + Include/LyShine/Bus/UiAnimationBus.h + Include/LyShine/Bus/UiAnimateEntityBus.h + Include/LyShine/Bus/UiButtonBus.h + Include/LyShine/Bus/UiCanvasBus.h + Include/LyShine/Bus/UiCanvasManagerBus.h + Include/LyShine/Bus/UiCanvasUpdateNotificationBus.h + Include/LyShine/Bus/UiCheckboxBus.h + Include/LyShine/Bus/UiDraggableBus.h + Include/LyShine/Bus/UiDropdownBus.h + Include/LyShine/Bus/UiDropdownOptionBus.h + Include/LyShine/Bus/UiDropTargetBus.h + Include/LyShine/Bus/UiDynamicLayoutBus.h + Include/LyShine/Bus/UiDynamicScrollBoxBus.h + Include/LyShine/Bus/UiEditorBus.h + Include/LyShine/Bus/UiEditorCanvasBus.h + Include/LyShine/Bus/UiEditorChangeNotificationBus.h + Include/LyShine/Bus/UiElementBus.h + Include/LyShine/Bus/UiEntityContextBus.h + Include/LyShine/Bus/UiFaderBus.h + Include/LyShine/Bus/UiFlipbookAnimationBus.h + Include/LyShine/Bus/UiGameEntityContextBus.h + Include/LyShine/Bus/UiImageBus.h + Include/LyShine/Bus/UiImageSequenceBus.h + Include/LyShine/Bus/UiIndexableImageBus.h + Include/LyShine/Bus/UiInitializationBus.h + Include/LyShine/Bus/UiInteractableActionsBus.h + Include/LyShine/Bus/UiInteractableBus.h + Include/LyShine/Bus/UiInteractableStatesBus.h + Include/LyShine/Bus/UiInteractionMaskBus.h + Include/LyShine/Bus/UiLayoutBus.h + Include/LyShine/Bus/UiLayoutCellBus.h + Include/LyShine/Bus/UiLayoutCellDefaultBus.h + Include/LyShine/Bus/UiLayoutColumnBus.h + Include/LyShine/Bus/UiLayoutControllerBus.h + Include/LyShine/Bus/UiLayoutFitterBus.h + Include/LyShine/Bus/UiLayoutGridBus.h + Include/LyShine/Bus/UiLayoutManagerBus.h + Include/LyShine/Bus/UiLayoutRowBus.h + Include/LyShine/Bus/UiMarkupButtonBus.h + Include/LyShine/Bus/UiMaskBus.h + Include/LyShine/Bus/UiNavigationBus.h + Include/LyShine/Bus/UiParticleEmitterBus.h + Include/LyShine/Bus/UiRadioButtonBus.h + Include/LyShine/Bus/UiRadioButtonCommunicationBus.h + Include/LyShine/Bus/UiRadioButtonGroupBus.h + Include/LyShine/Bus/UiRadioButtonGroupCommunicationBus.h + Include/LyShine/Bus/UiRenderBus.h + Include/LyShine/Bus/UiRenderControlBus.h + Include/LyShine/Bus/UiScrollableBus.h + Include/LyShine/Bus/UiScrollBarBus.h + Include/LyShine/Bus/UiScrollBoxBus.h + Include/LyShine/Bus/UiScrollerBus.h + Include/LyShine/Bus/UiSliderBus.h + Include/LyShine/Bus/UiSpawnerBus.h + Include/LyShine/Bus/UiSystemBus.h + Include/LyShine/Bus/UiTextBus.h + Include/LyShine/Bus/UiTextInputBus.h + Include/LyShine/Bus/UiTooltipBus.h + Include/LyShine/Bus/UiTooltipDataPopulatorBus.h + Include/LyShine/Bus/UiTooltipDisplayBus.h + Include/LyShine/Bus/UiTransform2dBus.h + Include/LyShine/Bus/UiTransformBus.h + Include/LyShine/Bus/UiVisualBus.h + Include/LyShine/Bus/Sprite/UiSpriteBus.h + Include/LyShine/Bus/World/UiCanvasOnMeshBus.h + Include/LyShine/Bus/World/UiCanvasRefBus.h + Include/LyShine/Bus/Tools/UiSystemToolsBus.h Source/LyShine.cpp Source/LyShine.h Source/LyShinePassDataBus.h diff --git a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp index d5320d182e..2c8cb3df49 100644 --- a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp +++ b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.cpp @@ -14,8 +14,6 @@ #include #include -#include - #include #include #include @@ -371,7 +369,7 @@ namespace LyShineExamples delete [] m_cachedPrimitive.m_vertices; } - m_cachedPrimitive.m_vertices = new SVF_P2F_C4B_T2F_F4B[numVertices]; + m_cachedPrimitive.m_vertices = new LyShine::UiPrimitiveVertex[numVertices]; m_cachedPrimitive.m_numVertices = numVertices; } diff --git a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h index f696228f5a..774cdd1809 100644 --- a/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h +++ b/Gems/LyShineExamples/Code/Source/UiCustomImageComponent.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -136,7 +137,7 @@ namespace LyShineExamples float m_overrideAlpha; // cached rendering data for performance optimization - DynUiPrimitive m_cachedPrimitive; + LyShine::UiPrimitive m_cachedPrimitive; bool m_isRenderCacheDirty = true; }; } diff --git a/Gems/MessagePopup/Code/CMakeLists.txt b/Gems/MessagePopup/Code/CMakeLists.txt index 73cd7ce8d6..51ec1a3bd1 100644 --- a/Gems/MessagePopup/Code/CMakeLists.txt +++ b/Gems/MessagePopup/Code/CMakeLists.txt @@ -19,6 +19,7 @@ ly_add_target( BUILD_DEPENDENCIES PUBLIC Legacy::CryCommon + Gem::LyShine ) ly_add_target( diff --git a/Gems/VirtualGamepad/Code/CMakeLists.txt b/Gems/VirtualGamepad/Code/CMakeLists.txt index f493190071..d32834633f 100644 --- a/Gems/VirtualGamepad/Code/CMakeLists.txt +++ b/Gems/VirtualGamepad/Code/CMakeLists.txt @@ -21,6 +21,7 @@ ly_add_target( AZ::AzCore AZ::AzFramework Legacy::CryCommon + Gem::LyShine ) ly_add_target( From f56bbb96b05e98906fbd8cc5a004063a82ad3313 Mon Sep 17 00:00:00 2001 From: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com> Date: Thu, 2 Dec 2021 15:38:24 -0800 Subject: [PATCH 40/42] LYN-5843. Fixed an issue when exit from full screen game mode in Editor. (#6098) * LYN-5843. Fixed an issue when exit from full screen game mode. Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com> --- .../Code/Source/Viewport/RenderViewportWidget.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index f6efdc57b8..505ff70122 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -146,11 +146,17 @@ namespace AtomToolsFramework if (auto existingScene = scene->FindSubsystem()) { m_viewportContext->SetRenderScene(*existingScene); - if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor()) + + // If we have a render pipeline, use it and ensure an AuxGeom feature processor is installed. + // Otherwise, fall through and ensure a render pipeline is installed for this scene. + if (m_viewportContext->GetCurrentPipeline()) { - m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get()); + if (auto auxGeomFP = existingScene->get()->GetFeatureProcessor()) + { + m_auxGeom = auxGeomFP->GetOrCreateDrawQueueForView(m_defaultCamera.get()); + } + return; } - return; } AZ::RPI::ScenePtr atomScene; From 631ebacc0c5bd92e73197b8903204fdbcaea4006 Mon Sep 17 00:00:00 2001 From: tjmgd <92784061+tjmgd@users.noreply.github.com> Date: Thu, 2 Dec 2021 23:50:51 +0000 Subject: [PATCH 41/42] Fix for bug - switch association fails (#5947) * Fix for bug - switch association fails Signed-off-by: T.J. McGrath-Daly * Change message box button from 'Yes' to 'Ok' Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Changed message box button from 'Yes' to 'Ok' Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> Co-authored-by: Tobias Alexander Franke Co-authored-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> --- .../Code/Source/Editor/ATLControlsPanel.cpp | 15 +++++++++ .../Code/Source/Editor/AudioControl.cpp | 32 +++++++++++++++++++ .../Code/Source/Editor/AudioControl.h | 2 ++ .../Code/Source/Editor/QConnectionsWidget.cpp | 16 ++++++++++ 4 files changed, 65 insertions(+) diff --git a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp index f8505d94ea..0f22616536 100644 --- a/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/ATLControlsPanel.cpp @@ -808,6 +808,21 @@ namespace AudioControls { AZ::StringFunc::Path::StripExtension(sControlName); } + else if (eControlType == eACET_SWITCH_STATE) + { + if (!pATLParent->SwitchStateConnectionCheck(pAudioSystemControl)) + { + QMessageBox messageBox(this); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.setDefaultButton(QMessageBox::Ok); + messageBox.setWindowTitle("Audio Controls Editor"); + messageBox.setText("Not in the same switch group, connection failed."); + if (messageBox.exec() == QMessageBox::Ok) + { + return; + } + } + } CATLControl* pTargetControl2 = m_pTreeModel->CreateControl(eControlType, sControlName, pATLParent); if (pTargetControl2) { diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp index c0a8fb8dde..251cc808f9 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControl.cpp @@ -368,4 +368,36 @@ namespace AudioControls } } + bool CATLControl::SwitchStateConnectionCheck(IAudioSystemControl* middlewareControl) + { + if (IAudioSystemEditor* audioSystemImpl = CAudioControlsEditorPlugin::GetImplementationManager()->GetImplementation()) + { + CID parentID = middlewareControl->GetParent()->GetId(); + EACEControlType compatibleType = audioSystemImpl->ImplTypeToATLType(middlewareControl->GetType()); + if (compatibleType == EACEControlType::eACET_SWITCH_STATE && m_type == EACEControlType::eACET_SWITCH) + { + for (auto& child : m_children) + { + for (int j = 0; child && j < child->ConnectionCount(); ++j) + { + TConnectionPtr tmpConnection = child->GetConnectionAt(j); + if (tmpConnection) + { + IAudioSystemControl* tmpMiddlewareControl = audioSystemImpl->GetControl(tmpConnection->GetID()); + EACEControlType controlType = audioSystemImpl->ImplTypeToATLType(tmpMiddlewareControl->GetType()); + if (tmpMiddlewareControl && controlType == EACEControlType::eACET_SWITCH_STATE) + { + if (parentID != ACE_INVALID_CID && tmpMiddlewareControl->GetParent()->GetId() != parentID) + { + return false; + } + } + } + } + } + } + } + return true; + } + } // namespace AudioControls diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControl.h b/Gems/AudioSystem/Code/Source/Editor/AudioControl.h index 024e8eb6df..187ab757af 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControl.h +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControl.h @@ -144,6 +144,8 @@ namespace AudioControls void SignalConnectionAdded(IAudioSystemControl* middlewareControl); void SignalConnectionRemoved(IAudioSystemControl* middlewareControl); + bool SwitchStateConnectionCheck(IAudioSystemControl* middlewareControl); + private: void SetId(CID id); void SetType(EACEControlType type); diff --git a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp index 25981d2abd..ce7a49ae1e 100644 --- a/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/QConnectionsWidget.cpp @@ -128,6 +128,22 @@ namespace AudioControls } else { + if (m_control->GetType() == EACEControlType::eACET_SWITCH_STATE) + { + if (!m_control->GetParent()->SwitchStateConnectionCheck(middlewareControl)) + { + QMessageBox messageBox(this); + messageBox.setStandardButtons(QMessageBox::Ok); + messageBox.setDefaultButton(QMessageBox::Ok); + messageBox.setWindowTitle("Audio Controls Editor"); + messageBox.setText("Not in the same switch group, connection failed."); + if (messageBox.exec() == QMessageBox::Ok) + { + return; + } + } + } + connection = audioSystemImpl->CreateConnectionToControl(m_control->GetType(), middlewareControl); if (connection) { From cfb426b86c34be6474095433c10844610fcbd070 Mon Sep 17 00:00:00 2001 From: Mike Chang Date: Thu, 2 Dec 2021 17:05:42 -0800 Subject: [PATCH 42/42] Add conditional to pull O3DE_BUILD_VERSION through environment var (#6096) Signed-off-by: Mike Chang --- cmake/Version.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/Version.cmake b/cmake/Version.cmake index de93ebefef..c5504ec62a 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -16,3 +16,8 @@ if("$ENV{O3DE_VERSION}") # Overriding through environment set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") endif() + +if("$ENV{O3DE_BUILD_VERSION}") + # Overriding through environment + set(LY_VERSION_BUILD_NUMBER "$ENV{O3DE_BUILD_VERSION}") +endif()