From 7bb4e0562b1f33bc3b1e1b7d7cafce98b6ca580a Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Tue, 29 Jun 2021 15:45:12 +0100 Subject: [PATCH 01/67] Update AssetBrowserTreeView.cpp Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com> --- .../AssetBrowser/Views/AssetBrowserTreeView.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp index 8a676a8d00..b631908a9a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp @@ -210,6 +210,21 @@ namespace AzToolsFramework void AssetBrowserTreeView::UpdateAfterFilter(bool hasFilter, bool selectFirstValidEntry) { + const QModelIndexList& selectedIndexes = selectionModel()->selectedRows(); + + // If we've cleared the filter but had something selected, ensure it stays selected and visible. + if (!hasFilter && !selectedIndexes.isEmpty()) + { + QModelIndex curIndex = selectedIndexes[0]; + m_expandToEntriesByDefault = true; + m_treeStateSaver->ApplySnapshot(); + + setCurrentIndex(curIndex); + scrollTo(curIndex); + + return; + } + // Flag our default expansion state so that we expand down to source entries after filtering m_expandToEntriesByDefault = hasFilter; // Then ask our state saver to apply its current snapshot again, falling back on asking us if entries should be expanded or not From 20775b77454afce35f3c3e88f07e7e18896989a1 Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Wed, 30 Jun 2021 15:26:27 -0500 Subject: [PATCH 02/67] [LYN-3195] Fixed fancy docking restore state to only touch dock tab containers that it created Signed-off-by: Chris Galvan --- .../AzQtComponents/Components/FancyDocking.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 9fe4ac29fb..8470cedce1 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -3288,16 +3288,16 @@ namespace AzQtComponents } // Untab tabbed dock widgets before restoring, as the restore only works on dock widgets parented directly to the main window - const QList dockWidgets = m_mainWindow->findChildren(); - for (QDockWidget* dockWidget : dockWidgets) + for (QDockWidget* dockWidget : m_mainWindow->findChildren( + QRegularExpression(QString("%1.*").arg(m_tabContainerIdentifierPrefix)), Qt::FindChildrenRecursively)) { - if (QStackedWidget* stackedWidget = qobject_cast(dockWidget->parentWidget())) + DockTabWidget* tabWidget = qobject_cast(dockWidget->widget()); + if (!tabWidget) { - if (AzQtComponents::DockTabWidget* tabWidget = qobject_cast(stackedWidget->parentWidget())) - { - tabWidget->removeTab(dockWidget); - } + continue; } + + tabWidget->closeTabs(); } // Restore the floating windows From 59ff74f559034379420379a82a8558a63e221a31 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Thu, 1 Jul 2021 09:57:36 -0700 Subject: [PATCH 03/67] The Great ScriptCanvas Purge. Part I. Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../GraphCanvas/Editor/GraphModelBus.h | 13 - .../GraphModel/Integration/GraphController.h | 2 - .../Source/Integration/GraphController.cpp | 8 - .../Code/Editor/Components/EditorGraph.cpp | 63 -- .../Framework/ScriptCanvasTraceUtilities.h | 2 - .../EntityRefNodeDescriptorComponent.cpp | 126 --- .../EntityRefNodeDescriptorComponent.h | 48 - .../ScriptCanvas/Components/EditorGraph.h | 6 +- .../Code/Editor/Nodes/NodeCreateUtils.cpp | 1 - .../Code/Editor/Nodes/NodeDisplayUtils.cpp | 52 - .../Code/Editor/Nodes/NodeDisplayUtils.h | 1 - .../Code/Editor/Nodes/NodeUtils.cpp | 16 - .../Code/Editor/ScriptCanvasEditorGem.cpp | 2 - .../Widgets/NodePalette/NodePaletteModel.cpp | 7 - .../SpecializedNodePaletteTreeItemTypes.cpp | 1 - .../VariableNodePaletteTreeItemTypes.cpp | 1 - .../ScriptCanvasNodePaletteDockWidget.cpp | 1 - .../Include/ScriptCanvas/Core/Contracts.h | 1 - .../Contracts/ExclusivePureDataContract.cpp | 56 -- .../Contracts/ExclusivePureDataContract.h | 30 - .../Code/Include/ScriptCanvas/Core/Graph.cpp | 1 - .../ScriptCanvas/Core/NativeDatumNode.h | 133 --- .../Code/Include/ScriptCanvas/Core/Node.cpp | 30 +- .../ScriptCanvas/Core/NodeFunctionGeneric.h | 10 + .../Include/ScriptCanvas/Core/PureData.cpp | 230 ----- .../Code/Include/ScriptCanvas/Core/PureData.h | 111 --- .../Code/Include/ScriptCanvas/Core/Slot.cpp | 6 - .../ScriptCanvas/Libraries/Core/Assign.cpp | 88 -- .../ScriptCanvas/Libraries/Core/Assign.h | 39 - .../Core/BehaviorContextObjectNode.cpp | 216 ----- .../Core/BehaviorContextObjectNode.h | 73 -- .../Libraries/Core/BinaryOperator.h | 1 - .../ScriptCanvas/Libraries/Core/CoreNodes.cpp | 4 - .../ScriptCanvas/Libraries/Core/CoreNodes.h | 2 - .../Libraries/Core/ErrorHandler.cpp | 1 - .../Libraries/Core/ExtractProperty.cpp | 27 - .../Libraries/Core/ExtractProperty.h | 4 - .../ScriptCanvas/Libraries/Core/ForEach.cpp | 1 - .../ScriptCanvas/Libraries/Core/String.h | 47 - .../Libraries/Core/UnaryOperator.cpp | 30 - .../Libraries/Core/UnaryOperator.h | 19 +- .../ScriptCanvas/Libraries/Entity/Entity.cpp | 18 +- .../ScriptCanvas/Libraries/Entity/Entity.h | 3 - .../Libraries/Entity/EntityIDNode.h | 47 - .../ScriptCanvas/Libraries/Entity/EntityRef.h | 79 -- .../Entity/Rotate.ScriptCanvasGrammar.xml | 29 - .../ScriptCanvas/Libraries/Entity/Rotate.cpp | 56 -- .../ScriptCanvas/Libraries/Entity/Rotate.h | 44 - .../ScriptCanvas/Libraries/Logic/Boolean.h | 48 - .../ScriptCanvas/Libraries/Logic/Gate.cpp | 17 - .../ScriptCanvas/Libraries/Logic/Gate.h | 15 +- .../ScriptCanvas/Libraries/Logic/Logic.cpp | 2 - .../ScriptCanvas/Libraries/Logic/Logic.h | 1 - .../ScriptCanvas/Libraries/Logic/Not.h | 9 - .../ScriptCanvas/Libraries/Logic/Once.h | 5 +- .../ScriptCanvas/Libraries/Logic/While.h | 5 +- .../ScriptCanvas/Libraries/Math/AABBNode.h | 48 - .../ScriptCanvas/Libraries/Math/CRCNode.h | 48 - .../ScriptCanvas/Libraries/Math/ColorNode.h | 48 - .../ScriptCanvas/Libraries/Math/Math.cpp | 55 +- .../ScriptCanvas/Libraries/Math/Math.h | 12 - .../Libraries/Math/Matrix3x3Node.h | 49 - .../Libraries/Math/Matrix4x4Node.h | 48 - .../ScriptCanvas/Libraries/Math/Number.h | 46 - .../ScriptCanvas/Libraries/Math/OBBNode.h | 48 - .../ScriptCanvas/Libraries/Math/PlaneNode.h | 48 - .../Math/Random.ScriptCanvasGrammar.xml | 34 - .../ScriptCanvas/Libraries/Math/Random.cpp | 42 - .../ScriptCanvas/Libraries/Math/Random.h | 36 - .../ScriptCanvas/Libraries/Math/Rotation.h | 46 - .../ScriptCanvas/Libraries/Math/Transform.h | 45 - .../ScriptCanvas/Libraries/Math/Vector.h | 106 --- .../Code/Source/ScriptCanvasCommonGem.cpp | 2 - .../Code/scriptcanvasgem_common_files.cmake | 28 - .../Code/scriptcanvasgem_editor_files.cmake | 2 - .../Framework/ScriptCanvasTestUtilities.cpp | 95 -- .../Framework/ScriptCanvasTestUtilities.h | 1 - .../Tests/ScriptCanvas_BehaviorContext.cpp | 43 - .../Code/Tests/ScriptCanvas_Core.cpp | 157 +-- .../Code/Tests/ScriptCanvas_Math.cpp | 70 -- .../Code/Tests/ScriptCanvas_NodeGenerics.cpp | 901 ------------------ 81 files changed, 40 insertions(+), 3906 deletions(-) delete mode 100644 Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NativeDatumNode.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/String.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityRef.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Boolean.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNode.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNode.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNode.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Number.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNode.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNode.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Rotation.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Transform.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector.h diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphModelBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphModelBus.h index b59a4162d1..e7a05c5ee9 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphModelBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Editor/GraphModelBus.h @@ -90,19 +90,6 @@ namespace GraphCanvas return result; } - //! This is sent to confirm whether or not a variable assignment can take place. - virtual bool IsValidVariableAssignment(const AZ::EntityId& variableId, const Endpoint& targetPoint) const = 0; - - //! This will return the structure needed to display why a variable could not be assigned to a specific reference inside of GraphCanvas. - virtual ConnectionValidationTooltip GetVariableAssignmentValidityTooltip(const AZ::EntityId& variableId, const Endpoint& targetPoint) const - { - ConnectionValidationTooltip result; - - result.m_isValid = IsValidVariableAssignment(variableId, targetPoint); - - return result; - } - //! Get the Display Type name for the given AZ type virtual AZStd::string GetDataTypeString(const AZ::Uuid& typeId) = 0; diff --git a/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h b/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h index 84e54ea6bf..817b709b70 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphController.h @@ -147,8 +147,6 @@ namespace GraphModelIntegration bool CreateConnection(const AZ::EntityId& connectionUiId, const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) override; bool IsValidConnection(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const override; - bool IsValidVariableAssignment(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const override; - //////////////////////////////////////////////////////////////////////////////////// // GraphCanvas::GraphModelRequestBus, undo diff --git a/Gems/GraphModel/Code/Source/Integration/GraphController.cpp b/Gems/GraphModel/Code/Source/Integration/GraphController.cpp index dff224b03d..e61cd7671e 100644 --- a/Gems/GraphModel/Code/Source/Integration/GraphController.cpp +++ b/Gems/GraphModel/Code/Source/Integration/GraphController.cpp @@ -1187,14 +1187,6 @@ namespace GraphModelIntegration return dataTypesMatch && !CheckForLoopback(sourceSlot->GetParentNode(), targetSlot->GetParentNode()); } - - bool GraphController::IsValidVariableAssignment([[maybe_unused]] const AZ::EntityId& variableId, [[maybe_unused]] const GraphCanvas::Endpoint& targetPoint) const - { - AZ_Assert(false, "This Graph Canvas does not support graph variables"); - return false; - } - - //! Helper function to create a GraphCanvas::NodePropertyDisplay and a data interface for editing input pin values //! \typename DataInterfaceType One of the data interface types. Ex: BooleanDataInterface //! \typename CreateDisplayFunctionType Function pointer type should be filled automatically diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp index f1b4af88d8..a8dd5904fc 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp @@ -38,9 +38,6 @@ AZ_POP_DISABLE_WARNING #include #include #include - -#include - #include #include #include @@ -1087,66 +1084,6 @@ namespace ScriptCanvasEditor return CanCreateConnectionBetween(scSourceEndpoint, scTargetEndpoint).IsSuccess(); } - GraphCanvas::ConnectionValidationTooltip Graph::GetConnectionValidityTooltip(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const - { - ScriptCanvas::Endpoint scSourceEndpoint = ConvertToScriptCanvasEndpoint(sourcePoint); - ScriptCanvas::Endpoint scTargetEndpoint = ConvertToScriptCanvasEndpoint(targetPoint); - - AZ::Outcome connectionResult = CanCreateConnectionBetween(scSourceEndpoint, scTargetEndpoint); - - GraphCanvas::ConnectionValidationTooltip validationTooltip; - - validationTooltip.m_isValid = connectionResult.IsSuccess(); - - if (!connectionResult) - { - validationTooltip.m_failureReason = connectionResult.GetError(); - } - - return validationTooltip; - } - - bool Graph::IsValidVariableAssignment(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const - { - AZStd::any* userData = nullptr; - GraphCanvas::NodeRequestBus::EventResult(userData, variableId, &GraphCanvas::NodeRequests::GetUserData); - AZ::EntityId variableNodeId = (userData && userData->is()) ? *AZStd::any_cast(userData) : AZ::EntityId(); - - ScriptCanvas::SlotId variableSlotId; - ScriptCanvas::NodeRequestBus::EventResult(variableSlotId, variableNodeId, &ScriptCanvas::NodeRequests::GetSlotId, ScriptCanvas::PureData::k_getThis); - - ScriptCanvas::Endpoint variableSourceEndpoint(variableNodeId, variableSlotId); - ScriptCanvas::Endpoint targetEndpoint = ConvertToScriptCanvasEndpoint(targetPoint); - - return CanCreateConnectionBetween(variableSourceEndpoint, targetEndpoint).IsSuccess(); - } - - GraphCanvas::ConnectionValidationTooltip Graph::GetVariableAssignmentValidityTooltip(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const - { - AZStd::any* userData = nullptr; - GraphCanvas::NodeRequestBus::EventResult(userData, variableId, &GraphCanvas::NodeRequests::GetUserData); - AZ::EntityId variableNodeId = (userData && userData->is()) ? *AZStd::any_cast(userData) : AZ::EntityId(); - - ScriptCanvas::SlotId variableSlotId; - ScriptCanvas::NodeRequestBus::EventResult(variableSlotId, variableNodeId, &ScriptCanvas::NodeRequests::GetSlotId, ScriptCanvas::PureData::k_getThis); - - ScriptCanvas::Endpoint variableSourceEndpoint(variableNodeId, variableSlotId); - ScriptCanvas::Endpoint targetEndpoint = ConvertToScriptCanvasEndpoint(targetPoint); - - AZ::Outcome connectionResult = CanCreateConnectionBetween(variableSourceEndpoint, targetEndpoint); - - GraphCanvas::ConnectionValidationTooltip validationTooltip; - - validationTooltip.m_isValid = connectionResult.IsSuccess(); - - if (!connectionResult) - { - validationTooltip.m_failureReason = connectionResult.GetError(); - } - - return validationTooltip; - } - AZStd::string Graph::GetDataTypeString(const AZ::Uuid& typeId) { return TranslationHelper::GetSafeTypeName(ScriptCanvas::Data::FromAZType(typeId)); diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index 381e7c78ea..62050980b6 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -20,10 +20,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp deleted file mode 100644 index d49b776963..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "precompiled.h" - -#include - -#include "EntityRefNodeDescriptorComponent.h" - -#include "ScriptCanvas/Core/Datum.h" -#include "ScriptCanvas/Core/PureData.h" -#include "ScriptCanvas/Core/Slot.h" - -namespace ScriptCanvasEditor -{ - ///////////////////////////////////// - // EntityRefNodeDescriptorComponent - ///////////////////////////////////// - - void EntityRefNodeDescriptorComponent::Reflect(AZ::ReflectContext* reflectContext) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - } - } - - EntityRefNodeDescriptorComponent::EntityRefNodeDescriptorComponent() - : NodeDescriptorComponent(NodeDescriptorType::EntityRef) - { - } - - void EntityRefNodeDescriptorComponent::OnEntityNameChanged([[maybe_unused]] const AZStd::string& name) - { - UpdateNodeTitle(); - } - - void EntityRefNodeDescriptorComponent::OnSlotInputChanged(const ScriptCanvas::SlotId& slotId) - { - if (slotId == m_endpoint.GetSlotId()) - { - AZ::EntityBus::Handler::BusDisconnect(); - - AZ::EntityId referencedId = GetReferencedEntityId(); - - if (referencedId.IsValid()) - { - AZ::EntityBus::Handler::BusConnect(referencedId); - } - - UpdateNodeTitle(); - } - } - - void EntityRefNodeDescriptorComponent::OnAddedToGraphCanvasGraph([[maybe_unused]] const GraphCanvas::GraphId& sceneId, const AZ::EntityId& scriptCanvasNodeId) - { - ScriptCanvas::SlotId scriptCanvasSlotId; - ScriptCanvas::NodeRequestBus::EventResult(scriptCanvasSlotId, scriptCanvasNodeId, &ScriptCanvas::NodeRequests::GetSlotId, ScriptCanvas::PureData::k_setThis); - - m_endpoint = ScriptCanvas::Endpoint(scriptCanvasNodeId, scriptCanvasSlotId); - - if (m_endpoint.IsValid()) - { - AZ::EntityId referencedId = GetReferencedEntityId(); - - if (referencedId.IsValid()) - { - AZ::EntityBus::Handler::BusConnect(referencedId); - } - } - - UpdateNodeTitle(); - } - - AZ::EntityId EntityRefNodeDescriptorComponent::GetReferencedEntityId() const - { - AZ::EntityId retVal; - - const ScriptCanvas::Datum* object = nullptr; - ScriptCanvas::NodeRequestBus::EventResult(object, m_endpoint.GetNodeId(), &ScriptCanvas::NodeRequests::FindDatum, m_endpoint.GetSlotId()); - - if (object && object->IS_A()) - { - retVal = (*object->GetAs()); - } - - return retVal; - } - - void EntityRefNodeDescriptorComponent::UpdateNodeTitle() - { - bool needsTitle = true; - - if (m_endpoint.IsValid()) - { - AZ::EntityId referencedId = GetReferencedEntityId(); - - AZStd::string entityName; - AZ::ComponentApplicationBus::BroadcastResult(entityName, &AZ::ComponentApplicationRequests::GetEntityName, referencedId); - - if (!entityName.empty()) - { - needsTitle = false; - GraphCanvas::NodeTitleRequestBus::Event(GetEntityId(), &GraphCanvas::NodeTitleRequests::SetTitle, entityName.c_str()); - } - else if (referencedId.IsValid()) - { - needsTitle = false; - GraphCanvas::NodeTitleRequestBus::Event(GetEntityId(), &GraphCanvas::NodeTitleRequests::SetTitle, referencedId.ToString().c_str()); - } - } - - if (needsTitle) - { - GraphCanvas::NodeTitleRequestBus::Event(GetEntityId(), &GraphCanvas::NodeTitleRequests::SetTitle, ""); - } - - GraphCanvas::NodeTitleRequestBus::Event(GetEntityId(), &GraphCanvas::NodeTitleRequests::SetSubTitle, "EntityRef"); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h deleted file mode 100644 index af8b55a69d..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -#include - -#include "Editor/GraphCanvas/Components/NodeDescriptors/NodeDescriptorComponent.h" - -#include "ScriptCanvas/Core/NodeBus.h" -#include "ScriptCanvas/Core/Endpoint.h" - -namespace ScriptCanvasEditor -{ - class EntityRefNodeDescriptorComponent - : public NodeDescriptorComponent - , public AZ::EntityBus::Handler - { - public: - AZ_COMPONENT(EntityRefNodeDescriptorComponent, "{887AE9AC-C793-4FE5-BAE2-AF6A7F70A374}", NodeDescriptorComponent); - static void Reflect(AZ::ReflectContext* reflectContext); - - EntityRefNodeDescriptorComponent(); - ~EntityRefNodeDescriptorComponent() = default; - - // AZ::EntityBus - void OnEntityNameChanged(const AZStd::string& name) override; - //// - - // ScriptCanvas::NodeNotificationsBus - void OnSlotInputChanged(const ScriptCanvas::SlotId& slotId) override; - //// - - private: - - void OnAddedToGraphCanvasGraph(const GraphCanvas::GraphId& graphId, const AZ::EntityId& scriptCanvasNodeId) override; - - AZ::EntityId GetReferencedEntityId() const; - void UpdateNodeTitle(); - - ScriptCanvas::Endpoint m_endpoint; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h index a32333e5ce..777a84c4fa 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h @@ -160,11 +160,7 @@ namespace ScriptCanvasEditor bool CreateConnection(const GraphCanvas::ConnectionId& connectionId, const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) override; bool IsValidConnection(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const override; - GraphCanvas::ConnectionValidationTooltip GetConnectionValidityTooltip(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const override; - - bool IsValidVariableAssignment(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const override; - GraphCanvas::ConnectionValidationTooltip GetVariableAssignmentValidityTooltip(const AZ::EntityId& variableId, const GraphCanvas::Endpoint& targetPoint) const override; - + AZStd::string GetDataTypeString(const AZ::Uuid& typeId) override; void OnRemoveUnusedNodes() override; diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp index a7282f85b0..1ad27566d9 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp @@ -26,7 +26,6 @@ #include #include #include -#include namespace ScriptCanvasEditor::Nodes { diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp index ba87796161..0c210441fe 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -231,57 +230,6 @@ namespace ScriptCanvasEditor::Nodes return DisplayGeneralScriptCanvasNode(graphCanvasGraphId, node, nodeConfiguration); } - AZ::EntityId DisplayEntityNode(AZ::EntityId, const ScriptCanvas::Nodes::Entity::EntityRef* entityNode) - { - AZ::EntityId graphCanvasNodeId; - - AZ::Entity* graphCanvasEntity = nullptr; - GraphCanvas::GraphCanvasRequestBus::BroadcastResult(graphCanvasEntity, &GraphCanvas::GraphCanvasRequests::CreateGeneralNode, ".entity"); - AZ_Assert(graphCanvasEntity, "Unable to create GraphCanvas Bus Node"); - - graphCanvasNodeId = graphCanvasEntity->GetId(); - - // Add the icon component - graphCanvasEntity->CreateComponent(ScriptCanvas::Nodes::Entity::EntityRef::RTTI_Type()); - graphCanvasEntity->CreateComponent(); - graphCanvasEntity->CreateComponent(entityNode->GetEntityId()); - graphCanvasEntity->CreateComponent(entityNode->GetEntityId()); - - graphCanvasEntity->Init(); - graphCanvasEntity->Activate(); - - // Set the user data on the GraphCanvas node to be the EntityId of the ScriptCanvas node - AZStd::any* graphCanvasUserData = nullptr; - GraphCanvas::NodeRequestBus::EventResult(graphCanvasUserData, graphCanvasNodeId, &GraphCanvas::NodeRequests::GetUserData); - if (graphCanvasUserData) - { - *graphCanvasUserData = entityNode->GetEntityId(); - } - - // Create the GraphCanvas slots - for (const auto& slot : entityNode->GetSlots()) - { - if (slot.GetDescriptor() == ScriptCanvas::SlotDescriptors::DataOut() && slot.IsVisible()) - { - DisplayScriptCanvasSlot(graphCanvasNodeId, slot); - } - } - - AZ::Entity* sourceEntity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(sourceEntity, &AZ::ComponentApplicationRequests::FindEntity, entityNode->GetEntityRef()); - - if (sourceEntity) - { - graphCanvasEntity->SetName(AZStd::string::format("GC-EntityRef(%s)", sourceEntity->GetName().data())); - } - else - { - graphCanvasEntity->SetName(AZStd::string::format("GC-EntityRef(%s)", entityNode->GetEntityRef().ToString().c_str())); - } - - return graphCanvasNodeId; - } - static void ConfigureGeneralScriptCanvasEntity(const ScriptCanvas::Node* node, AZ::Entity* graphCanvasEntity, const GraphCanvas::SlotGroup& slotGroup = GraphCanvas::SlotGroups::Invalid) { if (node->RequiresDynamicSlotOrdering()) diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h index 2ac38d86ed..59c69ea662 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h @@ -45,7 +45,6 @@ namespace ScriptCanvasEditor::Nodes AZ::EntityId DisplayScriptCanvasNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Node* node); // Core Node - AZ::EntityId DisplayEntityNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Entity::EntityRef* entityNode); AZ::EntityId DisplayEbusEventNode(AZ::EntityId graphCanvasGraphId, const AZStd::string& busName, const AZStd::string& eventName, const ScriptCanvas::EBusEventId& eventId); AZ::EntityId DisplayEbusWrapperNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Core::EBusEventHandler* busNode); AZ::EntityId DisplayGetVariableNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Core::GetVariableNode* variableNode); diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp index a0d79f28a3..b3feb37671 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeUtils.cpp @@ -11,26 +11,10 @@ #include #include -#include #include namespace { - void CopyTranslationKeyedNameToDatumLabel(ScriptCanvas::PureData* node, - const GraphCanvas::TranslationKeyedString& name) - { - ScriptCanvas::SlotId slotId = node->GetSlotId(ScriptCanvas::PureData::k_setThis); - if (!slotId.IsValid()) - { - return; - } - - ScriptCanvas::ModifiableDatumView datumView; - node->FindModifiableDatumView(slotId, datumView); - - datumView.RelabelDatum(name.GetDisplayString()); - } - ScriptCanvas::ConnectionType ToScriptCanvasConnectionType(GraphCanvas::ConnectionType connectionType) { ScriptCanvas::ConnectionType scriptCanvasConnectionType = ScriptCanvas::ConnectionType::Unknown; diff --git a/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp b/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp index 7a9d917c52..a9aa8cd0e9 100644 --- a/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -108,7 +107,6 @@ namespace ScriptCanvas ScriptCanvasEditor::ScriptEventReceiverNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::ScriptEventSenderNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::EBusSenderNodeDescriptorComponent::CreateDescriptor(), - ScriptCanvasEditor::EntityRefNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::VariableNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::GetVariableNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::SetVariableNodeDescriptorComponent::CreateDescriptor(), diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index 787d881318..9c9a19cd9c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -23,7 +23,6 @@ #include #include -#include #include #include #include @@ -342,12 +341,6 @@ namespace continue; } - // Detect primitive types os we avoid making nodes out of them. - // Or anything that is 'pure data' and should be populated through a different mechanism. - if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf()) - { - continue; - } // Skip over some of our more dynamic nodes that we want to populate using different means else if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf()) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp index f0290eef10..a214bb7ab8 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp @@ -24,7 +24,6 @@ #include "Editor/GraphCanvas/GraphCanvasEditorNotificationBusId.h" #include -#include namespace ScriptCanvasEditor { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp index 3c37de8386..c7649174bb 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp index cfe719114f..3d6c9012cc 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts.h index 8e2a748f0f..77ec030fec 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts.h @@ -11,7 +11,6 @@ #include "Contracts/DisallowReentrantExecutionContract.h" #include "Contracts/DisplayGroupConnectedSlotLimitContract.h" #include "Contracts/DynamicTypeContract.h" -#include "Contracts/ExclusivePureDataContract.h" #include "Contracts/IsReferenceTypeContract.h" #include "Contracts/MathOperatorContract.h" #include "Contracts/MethodOverloadContract.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp deleted file mode 100644 index b546a4364d..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ExclusivePureDataContract.h" -#include -#include -#include -#include -#include - -namespace ScriptCanvas -{ - AZ::Outcome ExclusivePureDataContract::HasNoPureDataConnection(const Slot& dataInputSlot) const - { - bool isOnPureDataThread(true); - NodeRequestBus::EventResult(isOnPureDataThread, dataInputSlot.GetNodeId(), &NodeRequests::IsOnPureDataThread, dataInputSlot.GetId()); - - if (!isOnPureDataThread) - { - return AZ::Success(); - } - - return AZ::Failure(AZStd::string("There is already a pure data input into this slot")); - } - - AZ::Outcome ExclusivePureDataContract::OnEvaluate(const Slot& sourceSlot, const Slot& targetSlot) const - { - if (sourceSlot.GetDescriptor().CanConnectTo(targetSlot.GetDescriptor())) - { - if (sourceSlot.GetDescriptor().IsInput()) - { - return HasNoPureDataConnection(sourceSlot); - } - else if (targetSlot.GetDescriptor().IsInput()) - { - return HasNoPureDataConnection(targetSlot); - } - } - - return AZ::Failure(AZStd::string("invalid data connection attempted")); - } - - void ExclusivePureDataContract::Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h deleted file mode 100644 index 5e5865fb06..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace ScriptCanvas -{ - class ExclusivePureDataContract - : public Contract - { - public: - AZ_CLASS_ALLOCATOR(ExclusivePureDataContract, AZ::SystemAllocator, 0); - AZ_RTTI(ExclusivePureDataContract, "{E48A0B26-B6B7-4AF3-9341-9E5C5C1F0DE8}", Contract); - - // no multiple literals, variables, defaults, gets, or any other new form of data that can be routed without getting pushed by execution - ~ExclusivePureDataContract() override = default; - - static void Reflect(AZ::ReflectContext* reflection); - - protected: - AZ::Outcome OnEvaluate(const Slot& sourceSlot, const Slot& targetSlot) const override; - - AZ::Outcome HasNoPureDataConnection(const Slot& dataInputSlot) const; - }; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index a1791509b0..16edeaff5d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NativeDatumNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NativeDatumNode.h deleted file mode 100644 index 70c30198d5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NativeDatumNode.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - template - class NativeDatumNode - : public PureData - { - public: - using t_ThisType = NativeDatumNode; - - AZ_RTTI(((NativeDatumNode), "{B7D8D8D6-B2F1-481A-A712-B07D1C19555F}", t_Node, t_Datum), PureData, AZ::Component); - AZ_COMPONENT_INTRUSIVE_DESCRIPTOR_TYPE(NativeDatumNode); - AZ_COMPONENT_BASE(NativeDatumNode, PureData); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("NativeDatumNode", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ; - } - } - } - - ~NativeDatumNode() override = default; - - protected: - virtual void ConfigureSetters() - { - Data::SetterContainer setterWrappers = Data::ExplodeToSetters(Data::FromAZType(Data::Traits::GetAZType())); - for (const auto& setterWrapperPair : setterWrappers) - { - SlotId setterSlotId; - const Data::SetterWrapper& setterWrapper = setterWrapperPair.second; - const AZStd::string argName = AZStd::string::format("%s: %s", Data::GetName(setterWrapper.m_propertyType).data(), setterWrapper.m_propertyName.data()); - AZStd::string_view argumentTooltip; - // Add the slot if it doesn't exist - setterSlotId = FindSlotIdForDescriptor(argName, SlotDescriptors::DataIn()); - - if (!setterSlotId.IsValid()) - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = argName; - slotConfiguration.m_toolTip = argumentTooltip; - slotConfiguration.SetType(setterWrapper.m_propertyType); - slotConfiguration.SetConnectionType(ConnectionType::Input); - - setterSlotId = AddSlot(slotConfiguration); - } - - if (setterSlotId.IsValid()) - { - m_propertyAccount.m_getterSetterIdPairs[setterWrapperPair.first].second = setterSlotId; - m_propertyAccount.m_settersByInputSlot.emplace(setterSlotId, setterWrapperPair.second); - } - } - } - - virtual void ConfigureGetters() - { - Data::GetterContainer getterWrappers = Data::ExplodeToGetters(Data::FromAZType(Data::Traits::GetAZType())); - for (const auto& getterWrapperPair : getterWrappers) - { - SlotId getterSlotId; - - const Data::GetterWrapper& getterWrapper = getterWrapperPair.second; - const AZStd::string resultSlotName(AZStd::string::format("%s: %s", getterWrapper.m_propertyName.data(), Data::GetName(getterWrapper.m_propertyType).data())); - // Add the slot if it doesn't exist - - getterSlotId = FindSlotIdForDescriptor(resultSlotName, SlotDescriptors::DataOut()); - - if (!getterSlotId.IsValid()) - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = resultSlotName; - slotConfiguration.SetType(getterWrapper.m_propertyType); - slotConfiguration.SetConnectionType(ConnectionType::Output); - - getterSlotId = AddSlot(slotConfiguration); - } - - if (getterSlotId.IsValid()) - { - m_propertyAccount.m_getterSetterIdPairs[getterWrapperPair.first].first = getterSlotId; - m_propertyAccount.m_gettersByInputSlot.emplace(getterSlotId, getterWrapperPair.second); - } - } - } - - virtual void ConfigureProperties() - { - if (IsConfigured()) - { - return; - } - - ConfigureGetters(); - ConfigureSetters(); - m_configured = true; - } - - void OnInit() override - { - AddInputAndOutputTypeSlot(Data::FromAZType()); - ConfigureProperties(); - } - }; - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp index f0faf324c1..8d61eef3a0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp @@ -19,11 +19,9 @@ #include #include #include -#include #include #include #include -#include #include #include #include @@ -48,9 +46,7 @@ namespace NodeCpp // add your named version above Current, - }; - - + }; } namespace ScriptCanvas @@ -397,7 +393,6 @@ namespace ScriptCanvas void Node::Reflect(AZ::ReflectContext* context) { Slot::Reflect(context); - ExclusivePureDataContract::Reflect(context); Nodes::NodeableNode::Reflect(context); // Version Conversion Reflection @@ -730,26 +725,11 @@ namespace ScriptCanvas // for each output slot... // for each connected node... // remove the ability to default it... - // ...and until a more viable solution is available, variable get input in another node must be exclusive - + EndpointsResolved connections = GetConnectedNodes(inputSlot); if (!connections.empty()) { - bool isConnectedToPureData = false; - - for (auto& nodePtrSlotId : connections) - { - if (azrtti_cast(nodePtrSlotId.first)) - { - isConnectedToPureData = true; - break; - } - } - - if (!isConnectedToPureData) - { - m_possiblyStaleInput.insert(slotId); - } + m_possiblyStaleInput.insert(slotId); } } } @@ -804,9 +784,7 @@ namespace ScriptCanvas bool Node::IsTargetInDataFlowPath(const Node* targetNode) const { AZStd::unordered_set path; - return azrtti_cast(this) - || azrtti_cast(targetNode) - || (targetNode && IsTargetInDataFlowPath(targetNode->GetEntityId(), path)); + return (targetNode && IsTargetInDataFlowPath(targetNode->GetEntityId(), path)); } bool Node::IsTargetInDataFlowPath(const ID& targetNodeId, AZStd::unordered_set& path) const diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index 95fc23c5d5..ca88c5179a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -316,6 +316,9 @@ namespace ScriptCanvas #define SCRIPT_CANVAS_GENERICS_TO_VM(GenericClass, ReflectClass, BehaviorContext, CategoryName)\ GenericClass::Reflect(BehaviorContext, ScriptCanvas::Translation::Context::GetCategoryLibraryName(CategoryName).c_str()); +#define SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(GenericClass, BehaviorContext, CategoryName)\ + GenericClass::Reflect(BehaviorContext, ScriptCanvas::Translation::Context::GetCategoryLibraryName(CategoryName).c_str()); + template class RegistrarGeneric { @@ -332,6 +335,13 @@ namespace ScriptCanvas SCRIPT_CANVAS_CALL_ON_INDEX_SEQUENCE(nodes.push_back({ azrtti_typeid(), AZ::AzTypeInfo::Name() })); } + static void Reflect(AZ::BehaviorContext* behaviorContext, const char* libraryName) + { + auto reflection = behaviorContext->Class>(libraryName); + reflection->Attribute(AZ::ScriptCanvasAttributes::VariableCreationForbidden, AZ::AttributeIsValid::IfPresent)->Attribute(AZ::ScriptCanvasAttributes::Internal::ImplementedAsNodeGeneric, true); + SCRIPT_CANVAS_CALL_ON_INDEX_SEQUENCE(reflection->Method(t_Node::GetNodeFunctionName(), t_Node::GetFunction())->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List | AZ::Script::Attributes::ExcludeFlags::Documentation)); + } + template static void Reflect(AZ::BehaviorContext* behaviorContext, const char* libraryName) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.cpp deleted file mode 100644 index 44d087e8a5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "PureData.h" - -namespace ScriptCanvas -{ - const char* PureData::k_getThis("Get"); - const char* PureData::k_setThis("Set"); - - PureData::~PureData() - { - - } - - const AZStd::unordered_map>& PureData::GetPropertyNameSlotMap() const - { - return m_propertyAccount.m_getterSetterIdPairs; - } - - void PureData::AddInputAndOutputTypeSlot(const Data::Type& type, const void* source) - { - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_setThis; - slotConfiguration.SetConnectionType(ConnectionType::Input); - slotConfiguration.ConfigureDatum(AZStd::move(Datum(type, Datum::eOriginality::Original, source, AZ::Uuid::CreateNull()))); - - AddSlot(slotConfiguration); - } - - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_getThis; - slotConfiguration.SetConnectionType(ConnectionType::Output); - slotConfiguration.SetType(type); - - AddSlot(slotConfiguration); - } - } - - void PureData::AddInputTypeAndOutputTypeSlot(const Data::Type& type) - { - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_setThis; - slotConfiguration.SetConnectionType(ConnectionType::Input); - slotConfiguration.SetType(type); - - AddSlot(slotConfiguration); - } - - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_getThis; - slotConfiguration.SetConnectionType(ConnectionType::Output); - slotConfiguration.SetType(type); - - AddSlot(slotConfiguration); - } - } - - void PureData::OnActivate() - { - PushThis(); - - for (const auto& propertySlotIdsPair : m_propertyAccount.m_getterSetterIdPairs) - { - const SlotId& getterSlotId = propertySlotIdsPair.second.first; - CallGetter(getterSlotId); - } - } - - void PureData::OnInputChanged(const Datum& input, [[maybe_unused]] const SlotId& id) - { - if (IsActivated()) - { - OnOutputChanged(input); - } - } - - AZStd::string_view PureData::GetInputDataName() const - { - return k_setThis; - } - - AZStd::string_view PureData::GetOutputDataName() const - { - return k_getThis; - } - - void PureData::CallGetter(const SlotId& getterSlotId) - { - auto getterFuncIt = m_propertyAccount.m_gettersByInputSlot.find(getterSlotId); - Slot* getterSlot = GetSlot(getterSlotId); - if (getterSlot && getterFuncIt != m_propertyAccount.m_gettersByInputSlot.end()) - { - AZStd::vector> outputNodes(ModConnectedNodes(*getterSlot)); - - if (!outputNodes.empty()) - { - auto getterOutcome = getterFuncIt->second.m_getterFunction((*FindDatum(GetSlotId(k_setThis)))); - if (!getterOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), getterOutcome.GetError().data()); - return; - } - - - for (auto& nodePtrSlot : outputNodes) - { - if (nodePtrSlot.first) - { - Node::SetInput(*nodePtrSlot.first, nodePtrSlot.second, getterOutcome.GetValue()); - } - } - } - } - } - - void PureData::SetInput(const Datum& input, const SlotId& id) - { - if (id == FindSlotIdForDescriptor(GetInputDataName(), SlotDescriptors::DataIn())) - { - // push this value, as usual - Node::SetInput(input, id); - - // now, call every getter, as every property has (presumably) been changed - for (const auto& propertyNameSlotIdsPair : m_propertyAccount.m_getterSetterIdPairs) - { - const SlotId& getterSlotId = propertyNameSlotIdsPair.second.first; - CallGetter(getterSlotId); - } - } - else - { - SetProperty(input, id); - } - } - - void PureData::SetInput(Datum&& input, const SlotId& id) - { - if (id == FindSlotIdForDescriptor(GetInputDataName(), SlotDescriptors::DataIn())) - { - // push this value, as usual - Node::SetInput(AZStd::move(input), id); - - if (IsActivated()) - { - // now, call every getter, as every property has (presumably) been changed - for (const auto& propertyNameSlotIdsPair : m_propertyAccount.m_getterSetterIdPairs) - { - const SlotId& getterSlotId = propertyNameSlotIdsPair.second.first; - CallGetter(getterSlotId); - } - } - } - else - { - SetProperty(AZStd::move(input), id); - } - } - - void PureData::SetProperty(const Datum& input, const SlotId& setterId) - { - auto methodBySlotIter = m_propertyAccount.m_settersByInputSlot.find(setterId); - if (methodBySlotIter == m_propertyAccount.m_settersByInputSlot.end()) - { - AZ_Error("Script Canvas", false, "BehaviorContextObject SlotId %s did not route to a setter", setterId.m_id.ToString().data()); - return; - } - if (!methodBySlotIter->second.m_setterFunction) - { - AZ_Error("Script Canvas", false, "BehaviorContextObject setter is not invocable for SlotId %s is nullptr", setterId.m_id.ToString().data()); - return; - } - - ModifiableDatumView datumView; - FindModifiableDatumView(GetSlotId(k_setThis), datumView); - - Datum* datum = datumView.ModifyDatum(); - - auto setterOutcome = methodBySlotIter->second.m_setterFunction((*datum), input); - - if (!setterOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), setterOutcome.TakeError().data()); - return; - } - - datumView.SignalModification(); - - PushThis(); - - auto getterSetterIt = m_propertyAccount.m_getterSetterIdPairs.find(methodBySlotIter->second.m_propertyName); - - if (getterSetterIt != m_propertyAccount.m_getterSetterIdPairs.end()) - { - CallGetter(getterSetterIt->second.first); - } - } - - - void PureData::Reflect(AZ::ReflectContext* reflectContext) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext); - if (serializeContext) - { - serializeContext->Class() - ->Version(0) - ; - - AZ::EditContext* editContext = serializeContext->GetEditContext(); - if (editContext) - { - editContext->Class("PureData", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ; - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.h deleted file mode 100644 index 01c52d7378..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/PureData.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include - -namespace AZ -{ - class BehaviorClass; - struct BehaviorValueParameter; - class ReflectContext; -} - -namespace ScriptCanvas -{ - struct PropertyAccount - { - AZStd::unordered_map m_gettersByInputSlot; - AZStd::unordered_map m_settersByInputSlot; - // The first slot id of the pair is the Getter SlotId, the second slot id of the pair is the Setter SlotID - AZStd::unordered_map> m_getterSetterIdPairs; - }; - - class PureData - : public Node - { - public: - AZ_COMPONENT(PureData, "{8B80FF54-0786-4FEE-B4A3-12907EBF8B75}", Node); - - static void Reflect(AZ::ReflectContext* reflectContext); - static const char* k_getThis; - static const char* k_setThis; - - const AZStd::unordered_map>& GetPropertyNameSlotMap() const; - - AZ_INLINE AZ::Outcome GetDependencies() const override { return AZ::Success(DependencyReport{}); } - - ~PureData() override; - - protected: - void AddInputAndOutputTypeSlot(const Data::Type& type, const void* defaultValue = nullptr); - template - void AddDefaultInputAndOutputTypeSlot(DatumType&& defaultValue); - void AddInputTypeAndOutputTypeSlot(const Data::Type& type); - - bool IsDeprecated() const override { return true; } - - void OnActivate() override; - void OnInputChanged(const Datum& input, const SlotId& id) override; - void MarkDefaultableInput() override {} - - AZ_INLINE void OnOutputChanged(const Datum& output) const - { - Slot* slot = GetSlotByName(GetOutputDataName()); - if (slot) - { - OnOutputChanged(output, (*slot)); - } - } - - AZ_INLINE void OnOutputChanged(const Datum& output, const Slot& outputSlot) const - { - PushOutput(output, outputSlot); - } - - // push data out - AZ_INLINE void PushThis() - { - auto slotId = GetSlotId(GetInputDataName()); - - if (auto setDatum = FindDatum(slotId)) - { - OnInputChanged(*setDatum, slotId); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), "No input datum in a PureData class %s. You must push your data manually in OnActivate() if no input is connected!"); - } - } - - AZStd::string_view GetInputDataName() const; - AZStd::string_view GetOutputDataName() const; - - void SetInput(const Datum& input, const SlotId& id) override; - void SetInput(Datum&& input, const SlotId& id) override; - void SetProperty(const Datum& input, const SlotId& id); - void CallGetter(const SlotId& getterSlotId); - bool IsConfigured() { return m_configured; } - - PropertyAccount m_propertyAccount; - bool m_configured = false; - }; - - template - void PureData::AddDefaultInputAndOutputTypeSlot(DatumType&& defaultValue) - { - AddInputDatumSlot(GetInputDataName(), "", Datum::eOriginality::Original, AZStd::forward(defaultValue)); - AddOutputTypeSlot(GetOutputDataName(), "", Data::FromAZType(azrtti_typeid>()), OutputStorage::Optional); - } - - template<> - void PureData::AddDefaultInputAndOutputTypeSlot(Data::Type&&) = delete; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp index 5b117dc4a9..2517c0c7ed 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp @@ -231,12 +231,6 @@ namespace ScriptCanvas // Add the slot type contract by default, It is used for filtering input/output slots and flow/data slots m_contracts.emplace_back(AZStd::make_unique()); - // Every DataIn slot has a contract validating that only 1 connection from any PureData node is allowed - if (IsData() && IsInput()) - { - AddContract({ []() { return aznew ExclusivePureDataContract(); } }); - } - for (const auto& contractDesc : slotConfiguration.m_contractDescs) { AddContract(contractDesc); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.cpp deleted file mode 100644 index 39faae9f0a..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "Assign.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - void Assign::OnInit() - { - AddSlot("In", "", SlotType::ExecutionIn); - AddSlot("Out", "", SlotType::ExecutionOut); - AddInputDatumDynamicTypedSlot("Source"); - AddSlot("Target", "", SlotType::DataOut); - } - - Data::Type Assign::GetSlotDataType(const SlotId& slotId) const - { - if (Slot* sourceSlot = GetSlot(GetSlotId("Source"))) - { - auto inputs = GetConnectedNodes(*sourceSlot); - // contracts should enforce this, but in case it breaks... - if (inputs.size() == 1) - { - auto input = *inputs.begin(); - return input.first->GetSlotDataType(input.second); - } - else - { - AZ_Error("ScriptCanvas", (inputs.size() == 0), "Multiple inputs to 'Assign' are forbidden"); - } - } - - return Data::Type::Invalid(); - } - - void Assign::OnInputSignal(const SlotId&) - { - if (auto input = GetDatumByIndex(k_sourceInputIndex)) - { - PushOutput(*input, *GetSlotByIndex(k_targetSlotIndex)); - } - - SignalOutput(GetSlotId("Out")); - } - - AZStd::Outcome Assign::SlotAcceptsType(const SlotId& slotID, const Data::Type& type) const - { - Slot* sourceSlot = GetSlot(GetSlotId("Source")); - Slot* targetSlot = GetSlot(GetSlotId("Target")); - - if (sourceSlot == nullptr - || targetSlot == nullptr) - { - return AZ::Failure(AZStd::string("Unable to find all necessary slots on node");) - } - - return DynamicSlotAcceptsType(slotID, type, Node::DynamicTypeArity::Single, *targetSlot, AZStd::vector{sourceSlot}); - } - - void Assign::Reflect(AZ::ReflectContext* reflectContext) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Assign", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) - ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Placeholder.png") - ; - } - } - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.h deleted file mode 100644 index 89d164f3d2..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Assign.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - class Assign - : public Node - { - public: - AZ_COMPONENT(Assign, "{E734ADCE-D822-4487-9681-5A80D8E4D263}", Node); - - static void Reflect(AZ::ReflectContext* reflectContext); - - protected: - static const int k_sourceInputIndex = 0; - static const int k_targetSlotIndex = 3; - - Data::Type GetSlotDataType(const SlotId& slotId) const override; - void OnInit() override; - void OnInputSignal(const SlotId&) override; - AZ::Outcome SlotAcceptsType(const SlotId&, const Data::Type&) const override; - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp deleted file mode 100644 index c4d3b6f302..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "BehaviorContextObjectNode.h" - -#include -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - namespace Internal - { - static const AZ::u32 k_thisParamIndex(0); - static const AZ::u32 k_setValueParamIndex(1); - static const AZ::u32 k_firstFirstPropertyDataSlotIndex(2); - static const AZ::u32 k_valueArgumentIndex(1); - static const char* k_setThis("Set"); - } - - AZStd::string BehaviorContextObjectNode::GetDebugName() const - { - if (auto input = FindDatum(GetSlotId(Internal::k_setThis))) - { - return Data::GetName(input->GetType()); - } - - return "Invalid"; - } - - void BehaviorContextObjectNode::InitializeObject(const AZ::Uuid& azType) - { - // \todo this works with basic types, and it probably shouldn't - if (auto bcClass = AZ::BehaviorContextHelper::GetClass(azType)) - { - InitializeObject(*bcClass); - } - else - { - const void* defaultValue = nullptr; - if (Data::IsEntityID(azType)) - { - defaultValue = &ScriptCanvas::GraphOwnerId; - } - AddInputAndOutputTypeSlot(Data::FromAZType(azType), defaultValue); - } - } - - void BehaviorContextObjectNode::InitializeObject(const AZStd::string& classNameString) - { - if (auto bcClass = AZ::BehaviorContextHelper::GetClass(classNameString)) - { - InitializeObject(*bcClass); - } - } - - void BehaviorContextObjectNode::InitializeObject(const AZ::BehaviorClass& behaviorClass) - { - m_className = behaviorClass.m_name; - const void* defaultValue = nullptr; - if (Data::IsEntityID(behaviorClass.m_typeId)) - { - defaultValue = &ScriptCanvas::GraphOwnerId; - } - AddInputAndOutputTypeSlot(Data::FromAZType(behaviorClass.m_typeId), defaultValue); - ConfigureProperties(behaviorClass); - } - - void BehaviorContextObjectNode::InitializeObject(const Data::Type& type) - { - if (auto bcClass = AZ::BehaviorContextHelper::GetClass(type.GetAZType())) - { - InitializeObject(*bcClass); - } - } - - void BehaviorContextObjectNode::ConfigureSetters(const AZ::BehaviorClass& behaviorClass) - { - Data::SetterContainer setterWrappers = Data::ExplodeToSetters(Data::FromAZType(behaviorClass.m_typeId)); - for (const auto& setterWrapperPair : setterWrappers) - { - SlotId setterSlotId; - auto propertyIt = behaviorClass.m_properties.find(setterWrapperPair.first); - if (propertyIt != behaviorClass.m_properties.end()) - { - const Data::SetterWrapper& setterWrapper = setterWrapperPair.second; - const AZStd::string argName = AZStd::string::format("%s: %s", Data::GetName(setterWrapper.m_propertyType).data(), setterWrapper.m_propertyName.data()); - const AZStd::string* argumentTooltipPtr = propertyIt->second->m_setter->GetArgumentToolTip(Internal::k_setValueParamIndex); - AZStd::string_view argumentTooltip = argumentTooltipPtr ? AZStd::string_view(*argumentTooltipPtr) : AZStd::string_view{}; - - // Add the slot if it doesn't exist - setterSlotId = FindSlotIdForDescriptor(argName, SlotDescriptors::DataIn()); - - if (!setterSlotId.IsValid()) - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = argName; - slotConfiguration.m_toolTip = argumentTooltip; - slotConfiguration.SetType(setterWrapper.m_propertyType); - slotConfiguration.SetConnectionType(ConnectionType::Input); - - setterSlotId = AddSlot(slotConfiguration); - } - - } - if (setterSlotId.IsValid()) - { - m_propertyAccount.m_getterSetterIdPairs[setterWrapperPair.first].second = setterSlotId; - m_propertyAccount.m_settersByInputSlot.emplace(setterSlotId, setterWrapperPair.second); - } - } - } - - void BehaviorContextObjectNode::ConfigureGetters(const AZ::BehaviorClass& behaviorClass) - { - Data::GetterContainer getterWrappers = Data::ExplodeToGetters(Data::FromAZType(behaviorClass.m_typeId)); - for (const auto& getterWrapperPair : getterWrappers) - { - SlotId getterSlotId; - auto propertyIt = behaviorClass.m_properties.find(getterWrapperPair.first); - if (propertyIt != behaviorClass.m_properties.end()) - { - const Data::GetterWrapper& getterWrapper = getterWrapperPair.second; - const AZStd::string resultSlotName(AZStd::string::format("%s: %s", getterWrapper.m_propertyName.data(), Data::GetName(getterWrapper.m_propertyType).data())); - - // Add the slot if it doesn't exist - getterSlotId = FindSlotIdForDescriptor(resultSlotName, SlotDescriptors::DataOut()); - - if (!getterSlotId.IsValid()) - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = resultSlotName; - slotConfiguration.SetType(getterWrapper.m_propertyType); - slotConfiguration.SetConnectionType(ConnectionType::Output); - - getterSlotId = AddSlot(slotConfiguration); - } - - } - if (getterSlotId.IsValid()) - { - m_propertyAccount.m_getterSetterIdPairs[getterWrapperPair.first].first = getterSlotId; - m_propertyAccount.m_gettersByInputSlot.emplace(getterSlotId, getterWrapperPair.second); - } - } - } - - void BehaviorContextObjectNode::ConfigureProperties(const AZ::BehaviorClass& behaviorClass) - { - if (IsConfigured()) - { - return; - } - - ConfigureGetters(behaviorClass); - ConfigureSetters(behaviorClass); - m_configured = true; - } - - void BehaviorContextObjectNode::OnInit() - { - if (auto input = FindDatum(GetSlotId(k_setThis))) - { - if (!input->Empty()) - { - AddInputTypeAndOutputTypeSlot(input->GetType()); - } - } - } - - void BehaviorContextObjectNode::OnWriteEnd() - { - AZStd::lock_guard lock(m_mutex); - - auto bcClass = !m_className.empty() ? AZ::BehaviorContextHelper::GetClass(m_className) : nullptr; - - if (bcClass) - { - ConfigureProperties(*bcClass); - } - } - - - void BehaviorContextObjectNode::Reflect(AZ::ReflectContext* reflectContext) - { - if (auto serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(1) - ->EventHandler>() - ->Field("m_className", &BehaviorContextObjectNode::m_className) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("BehaviorContextObjectNode", "BehaviorContextObjectNode") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List) - ; - } - } - } - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h deleted file mode 100644 index 88680fd0a3..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include - -namespace AZ -{ - class BehaviorClass; - struct BehaviorValueParameter; - class ReflectContext; -} - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - class BehaviorContextObjectNode - : public PureData - { - public: - //\todo move to behavior context - enum ParameterCount - { - Getter = 1, - Setter = 2, - }; - - AZ_COMPONENT(BehaviorContextObjectNode, "{4344869D-2543-4FA3-BCD0-B6DB1E815928}", PureData); - - static void Reflect(AZ::ReflectContext* reflectContext); - - BehaviorContextObjectNode() = default; - - ~BehaviorContextObjectNode() override = default; - - AZStd::string GetDebugName() const override; - - void InitializeObject(const AZ::Uuid& azType); - - void InitializeObject(const AZStd::string& classNameString); - - void InitializeObject(const Data::Type& type); - - void OnWriteEnd(); - - protected: - void InitializeObject(const AZ::BehaviorClass& behaviorClass); - void OnInit() override; - - virtual void ConfigureSetters(const AZ::BehaviorClass& behaviorClass); - virtual void ConfigureGetters(const AZ::BehaviorClass& behaviorClass); - void ConfigureProperties(const AZ::BehaviorClass& behaviorClass); - - private: - AZStd::recursive_mutex m_mutex; // post-serialization - AZStd::string m_className; - - BehaviorContextObjectNode(const BehaviorContextObjectNode&) = delete; - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h index 92890b2842..eb44ce5db1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace ScriptCanvas diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp index f5a9148231..3c02099403 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp @@ -103,9 +103,7 @@ namespace ScriptCanvas AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); @@ -128,9 +126,7 @@ namespace ScriptCanvas ScriptCanvas::Nodes::Core::ErrorHandler::CreateDescriptor(), ScriptCanvas::Nodes::Core::Method::CreateDescriptor(), ScriptCanvas::Nodes::Core::MethodOverloaded::CreateDescriptor(), - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode::CreateDescriptor(), ScriptCanvas::Nodes::Core::Start::CreateDescriptor(), - ScriptCanvas::Nodes::Core::String::CreateDescriptor(), ScriptCanvas::Nodes::Core::EBusEventHandler::CreateDescriptor(), ScriptCanvas::Nodes::Core::AzEventHandler::CreateDescriptor(), ScriptCanvas::Nodes::Core::ExtractProperty::CreateDescriptor(), diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h index 2551dfb4b1..567304ee37 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h @@ -10,7 +10,6 @@ // This header is only meant to include the nodes and should not contain // shared code -#include "BehaviorContextObjectNode.h" #include "EBusEventHandler.h" #include "Error.h" #include "ErrorHandler.h" @@ -28,4 +27,3 @@ #include "SendScriptEvent.h" #include "SetVariable.h" #include "Start.h" -#include "String.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp index a53eb18cbb..06485f5e0a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp @@ -9,7 +9,6 @@ #include #include -#include namespace ScriptCanvas { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp index c97654c1d8..574ccaeecb 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp @@ -5,8 +5,6 @@ * */ #include -#include - #include namespace ScriptCanvas @@ -64,31 +62,6 @@ namespace ScriptCanvas return m_dataType; } - void ExtractProperty::OnInputSignal(const SlotId& slotID) - { - if (slotID == GetSlotId(GetInputSlotName())) - { - if (auto input = FindDatum(ExtractPropertyProperty::GetSourceSlotId(this))) - { - for(auto&& propertyAccount : m_propertyAccounts) - { - Slot* propertySlot = GetSlot(propertyAccount.m_propertySlotId); - if (propertySlot && propertyAccount.m_getterFunction) - { - auto outputOutcome = propertyAccount.m_getterFunction(*input); - if (!outputOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), outputOutcome.TakeError().data()); - return; - } - PushOutput(outputOutcome.TakeValue(), *propertySlot); - } - } - } - SignalOutput(GetSlotId(GetOutputSlotName())); - } - } - void ExtractProperty::AddPropertySlots(const Data::Type& type) { AZStd::unordered_map versionedInfo; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h index eb255c8f09..7cde7401db 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h @@ -47,14 +47,10 @@ namespace ScriptCanvas protected: - bool IsPropertySlot(const SlotId& slotId) const; - void OnInit() override; UpdateResult OnUpdateNode() override; - void OnInputSignal(const SlotId&) override; - void OnSlotDisplayTypeChanged(const SlotId& slotId, const Data::Type& dataType) override; void AddPropertySlots(const Data::Type& type); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ForEach.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ForEach.cpp index 6584f795b8..496b164726 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ForEach.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ForEach.cpp @@ -6,7 +6,6 @@ */ #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/String.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/String.h deleted file mode 100644 index 712d3d808f..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/String.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - - class String - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(String, "{9C9B9D96-1838-4493-A14D-40C77B4DB5DD}", ParentType); - - static void Reflect(AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(3) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("String", "Holds a string value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/String.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp index 43d84f0e28..1695c1d4d3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp @@ -18,17 +18,6 @@ namespace ScriptCanvas const char* UnaryOperator::k_valueName = "Value"; const char* UnaryOperator::k_resultName = "Result"; - Datum UnaryOperator::Evaluate([[maybe_unused]] const Datum& value) - { - AZ_Assert(false, "Evaluate must be overridden"); - return Datum(); - }; - - void UnaryOperator::OnInputSignal([[maybe_unused]] const SlotId& slot) - { - AZ_Assert(false, "OnInputSignal must be overridden"); - } - void UnaryOperator::ConfigureSlots() { { @@ -68,25 +57,6 @@ namespace ScriptCanvas { } - void UnaryExpression::OnInputSignal(const SlotId&) - { - const Datum output = Evaluate(*FindDatumByIndex(k_datumIndex)); - if (auto slot = GetSlot(GetOutputSlotId())) - { - PushOutput(output, *slot); - } - - const bool* value = output.GetAs(); - if (value && *value) - { - SignalOutput(GetSlotId(k_onTrue)); - } - else - { - SignalOutput(GetSlotId(k_onFalse)); - } - } - void UnaryExpression::ConfigureSlots() { { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h index d2188f0b3c..9805c6d9ef 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace ScriptCanvas @@ -32,8 +31,6 @@ namespace ScriptCanvas static const char* k_onTrue; static const char* k_onFalse; - - protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot&, CombinedSlotType targetSlotType, const Slot*) const override { @@ -45,15 +42,7 @@ namespace ScriptCanvas void ConfigureSlots() override; - // must be overridden with the binary operations - virtual Datum Evaluate(const Datum& value); - - // Triggered by the execution signal - void OnInputSignal(const SlotId& slot) override; - - SlotId GetOutputSlotId() const; - - + SlotId GetOutputSlotId() const; }; class UnaryExpression : public UnaryOperator @@ -67,11 +56,7 @@ namespace ScriptCanvas void ConfigureSlots() override; - void OnInputSignal(const SlotId& slot) override; - - virtual void InitializeUnaryExpression(); - - + virtual void InitializeUnaryExpression(); }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp index 79a89ab1bf..d55de9be45 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp @@ -11,8 +11,6 @@ namespace ScriptCanvas { - - static bool OldEntityIdIsValidNodeVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& rootNodeElement) { int nodeElementIndex = rootNodeElement.FindElement(AZ_CRC("BaseClass1", 0xd4925735)); @@ -72,9 +70,7 @@ namespace ScriptCanvas } if (AZ::BehaviorContext* behaviorContext = azrtti_cast(reflection)) { - using namespace ScriptCanvas::Nodes::Entity; - SCRIPT_CANVAS_GENERICS_TO_VM(EntityIDNodes::Registrar, EntityID, behaviorContext, EntityIDNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(EntityNodes::Registrar, Entity, behaviorContext, EntityNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(EntityNodes::Registrar, behaviorContext, EntityNodes::k_categoryName); } ScriptCanvas::Entity::RotateMethod::Reflect(reflection); @@ -82,25 +78,15 @@ namespace ScriptCanvas void Entity::InitNodeRegistry(NodeRegistry& nodeRegistry) { - using namespace ScriptCanvas::Nodes::Entity; - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); EntityIDNodes::Registrar::AddToRegistry(nodeRegistry); EntityNodes::Registrar::AddToRegistry(nodeRegistry); } AZStd::vector Entity::GetComponentDescriptors() { - AZStd::vector descriptors = { - ScriptCanvas::Nodes::Entity::Rotate::CreateDescriptor(), - ScriptCanvas::Nodes::Entity::EntityID::CreateDescriptor(), - ScriptCanvas::Nodes::Entity::EntityRef::CreateDescriptor() - }; - + AZStd::vector descriptors; EntityIDNodes::Registrar::AddDescriptors(descriptors); EntityNodes::Registrar::AddDescriptors(descriptors); - return descriptors; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.h index 0bd54f4194..be746e65f0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.h @@ -10,9 +10,6 @@ // This header is only meant to include the nodes and should not contain // shared code -#include "Rotate.h" #include "RotateMethod.h" -#include "EntityIDNode.h" #include "EntityIDNodes.h" -#include "EntityRef.h" #include "EntityNodes.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h deleted file mode 100644 index 5b60c0cea8..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Entity - { - class EntityID - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(EntityID, "{37F26070-F29B-412A-9228-86D8D10F3C32}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("EntityID", "Stores a reference to an entity") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/EntityID.png") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityRef.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityRef.h deleted file mode 100644 index 720205a158..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/EntityRef.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Entity - { - class EntityRef - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(EntityRef, "{0EE5782F-B241-4127-AE53-E6746B00447F}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(2) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - // EntityRef node is special in that it's only created when we drag in an entity from the main scene. - // And is unmodifiable(essentially an external constant). As such, we hide it from the node palette. - editContext->Class("EntityID", "Stores a reference to an entity") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/EntityRef.png") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List) - ; - } - } - } - - AZ_INLINE void SetEntityRef(const AZ::EntityId& id) - { - ModifiableDatumView datumView; - FindModifiableDatumView(GetSlotId(k_setThis), datumView); - - if (datumView.IsValid()) - { - // only called on edit time creation, so no need to push out the data, consider cutting this function if possible - datumView.SetAs(id); - OnOutputChanged((*datumView.GetDatum())); - } - } - - AZ_INLINE AZ::EntityId GetEntityRef() const - { - AZ::EntityId retVal; - if (auto input = FindDatum(GetSlotId(k_setThis))) - { - const AZ::EntityId* inputId = input->GetAs(); - - if (inputId) - { - retVal = (*inputId); - } - } - - return retVal; - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml deleted file mode 100644 index 0b2c5714d7..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.cpp deleted file mode 100644 index b1df21ea52..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include - -#include - -#include -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Entity - { - void Rotate::OnInputSignal(const SlotId&) - { - AZ::EntityId targetEntity = RotateProperty::GetEntity(this); - - if (!targetEntity.IsValid()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Invalid entity specified"); - return; - } - - AZ::Entity* entity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, targetEntity); - if (entity) - { - AZ::Vector3 angles = AZ::Vector3::CreateZero(); - if (entity->GetState() == AZ::Entity::State::Active) - { - angles = RotateProperty::GetEulerAngles(this); - - AZ::Quaternion rotation = AZ::ConvertEulerDegreesToQuaternion(angles); - - AZ::Transform currentTransform = AZ::Transform::CreateIdentity(); - AZ::TransformBus::EventResult(currentTransform, targetEntity, &AZ::TransformInterface::GetWorldTM); - - currentTransform.SetRotation((rotation * currentTransform.GetRotation().GetNormalized())); - - AZ::TransformBus::Event(targetEntity, &AZ::TransformInterface::SetWorldTM, currentTransform); - } - } - - SignalOutput(RotateProperty::GetOutSlotId(this)); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.h deleted file mode 100644 index cf6c19c417..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Rotate.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -#include - -#include - -// LY-103055 Temporary workaround to fix compile error when building Android NDK 19 and above due to AzCodeGenerator -// not receiving the correct clang system includes -namespace AZ -{ - class EntityId; - class Vector3; -} - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Entity - { - //! Deprecated: see Entity Transform class' reflection of method "Rotate" - class Rotate - : public Node - { - - public: - - SCRIPTCANVAS_NODE(Rotate); - - void OnInputSignal(const SlotId&) override; - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Boolean.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Boolean.h deleted file mode 100644 index 5a118d9374..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Boolean.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Logic - { - class Boolean - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Boolean, "{263E8CAE-9F20-4198-A937-14761A46D996}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(4) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Boolean", "A boolean value (true/false)") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Boolean.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.cpp index 3a36a265c2..a0462ae69a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.cpp @@ -17,29 +17,12 @@ namespace ScriptCanvas { Gate::Gate() : Node() - , m_condition(false) {} AZ::Outcome Gate::GetDependencies() const { return AZ::Success(DependencyReport{}); } - - void Gate::OnInputSignal(const SlotId&) - { - SlotId trueSlot = GateProperty::GetTrueSlotId(this); - SlotId falseSlot = GateProperty::GetFalseSlotId(this); - - m_condition = GateProperty::GetCondition(this); - if (m_condition) - { - SignalOutput(trueSlot); - } - else - { - SignalOutput(falseSlot); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h index 0480db1f32..a8e04489d0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h @@ -9,7 +9,6 @@ #include #include -#include #include @@ -24,7 +23,6 @@ namespace ScriptCanvas : public Node { public: - SCRIPTCANVAS_NODE(Gate); Gate(); @@ -34,24 +32,13 @@ namespace ScriptCanvas AZ::Outcome GetDependencies() const override; - bool IsIfBranch() const override { return true; } - - + bool IsIfBranch() const override { return true; } protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override { return AZ::Success(GetSlotsByType(targetSlotType)); } - - ////////////////////////////////////////////////////////////////////////// - - void OnInputSignal(const SlotId&) override; - - private: - - bool m_condition; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp index 8bd587ee4b..444a312edc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp @@ -43,7 +43,6 @@ namespace ScriptCanvas using namespace ScriptCanvas::Nodes::Logic; AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); @@ -65,7 +64,6 @@ namespace ScriptCanvas return AZStd::vector({ ScriptCanvas::Nodes::Logic::And::CreateDescriptor(), ScriptCanvas::Nodes::Logic::Any::CreateDescriptor(), - ScriptCanvas::Nodes::Logic::Boolean::CreateDescriptor(), ScriptCanvas::Nodes::Logic::Break::CreateDescriptor(), ScriptCanvas::Nodes::Logic::Cycle::CreateDescriptor(), ScriptCanvas::Nodes::Logic::Gate::CreateDescriptor(), diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.h index a59a4e4a88..26fa846885 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.h @@ -12,7 +12,6 @@ #include "And.h" #include "Any.h" -#include "Boolean.h" #include "Break.h" #include "Cycle.h" #include "Gate.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h index 58e0d747c7..ee61c6637a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h @@ -8,7 +8,6 @@ #pragma once #include -#include namespace ScriptCanvas { @@ -64,14 +63,6 @@ namespace ScriptCanvas } // Translation ////////////////////////////////////////////////////////////////////////// - - protected: - - Datum Evaluate(const Datum& value) override - { - const bool* boolValue = value.GetAs(); - return Datum(boolValue && (!(*boolValue))); - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h index e216b7e793..31bcf9a158 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h @@ -9,7 +9,6 @@ #include #include -#include #include @@ -30,9 +29,7 @@ namespace ScriptCanvas Once(); - AZ::Outcome GetDependencies() const override; - - + AZ::Outcome GetDependencies() const override; protected: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h index 68a6b9fdfc..bb0ed3088b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h @@ -32,16 +32,13 @@ namespace ScriptCanvas SlotId GetLoopSlotId() const override; - bool IsFormalLoop() const override; - - + bool IsFormalLoop() const override; protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override { return AZ::Success(GetSlotsByType(targetSlotType)); } - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNode.h deleted file mode 100644 index fb138194c5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/AABBNode.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class AABB - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(AABB, "{AB0C2753-680E-47AD-8277-66B3AC01C659}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("AABB", "An axis-aligned bounding box value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/AABB.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNode.h deleted file mode 100644 index b1824d0e70..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/CRCNode.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class CRC - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(CRC, "{AC47D631-38C3-4B03-A987-425189D1D165}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("CRC", "A CRC value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/CRC.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNode.h deleted file mode 100644 index 84b9b38b69..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/ColorNode.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Color - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Color, "{26FBE6FF-C4B4-4D62-9474-3B2EE1B3E165}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Color", "A four channel color value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Color.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp index 6fa228c3b9..b287453f0f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp @@ -37,20 +37,22 @@ namespace ScriptCanvas if (AZ::BehaviorContext* behaviorContext = azrtti_cast(reflection)) { using namespace ScriptCanvas::Nodes::Math; - SCRIPT_CANVAS_GENERICS_TO_VM(AABBNodes::Registrar, AABB, behaviorContext, AABBNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(CRCNodes::Registrar, CRC, behaviorContext, CRCNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(ColorNodes::Registrar, Color, behaviorContext, ColorNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(MathNodes::Registrar, Math, behaviorContext, MathNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(Matrix3x3Nodes::Registrar, Matrix3x3, behaviorContext, Matrix3x3Nodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(Matrix4x4Nodes::Registrar, Matrix4x4, behaviorContext, Matrix4x4Nodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(OBBNodes::Registrar, OBB, behaviorContext, OBBNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(PlaneNodes::Registrar, Plane, behaviorContext, PlaneNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(QuaternionNodes::Registrar, Quaternion, behaviorContext, QuaternionNodes::k_categoryName); SCRIPT_CANVAS_GENERICS_TO_VM(RandomNodes::Registrar, Random, behaviorContext, RandomNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(TransformNodes::Registrar, Transform, behaviorContext, TransformNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(Vector2Nodes::Registrar, Vector2, behaviorContext, Vector2Nodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(Vector3Nodes::Registrar, Vector3, behaviorContext, Vector3Nodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM(Vector4Nodes::Registrar, Vector4, behaviorContext, Vector4Nodes::k_categoryName); + + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(AABBNodes::Registrar, behaviorContext, AABBNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(CRCNodes::Registrar, behaviorContext, CRCNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(ColorNodes::Registrar, behaviorContext, ColorNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Matrix3x3Nodes::Registrar, behaviorContext, Matrix3x3Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Matrix4x4Nodes::Registrar, behaviorContext, Matrix4x4Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(OBBNodes::Registrar, behaviorContext, OBBNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(PlaneNodes::Registrar, behaviorContext, PlaneNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(QuaternionNodes::Registrar, behaviorContext, QuaternionNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(TransformNodes::Registrar, behaviorContext, TransformNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Vector2Nodes::Registrar, behaviorContext, Vector2Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Vector3Nodes::Registrar, behaviorContext, Vector3Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Vector4Nodes::Registrar, behaviorContext, Vector4Nodes::k_categoryName); } Nodes::Internal::ExpressionNodeBase::Reflect(reflection); @@ -59,25 +61,12 @@ namespace ScriptCanvas void Math::InitNodeRegistry(NodeRegistry& nodeRegistry) { using namespace ScriptCanvas::Nodes::Math; - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); + AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AABBNodes::Registrar::AddToRegistry(nodeRegistry); ColorNodes::Registrar::AddToRegistry(nodeRegistry); @@ -98,25 +87,11 @@ namespace ScriptCanvas AZStd::vector Math::GetComponentDescriptors() { AZStd::vector descriptors = { - ScriptCanvas::Nodes::Math::AABB::CreateDescriptor(), - ScriptCanvas::Nodes::Math::CRC::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Color::CreateDescriptor(), ScriptCanvas::Nodes::Math::Divide::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Matrix3x3::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Matrix4x4::CreateDescriptor(), ScriptCanvas::Nodes::Math::MathExpression::CreateDescriptor(), ScriptCanvas::Nodes::Math::Multiply::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Number::CreateDescriptor(), - ScriptCanvas::Nodes::Math::OBB::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Plane::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Random::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Quaternion::CreateDescriptor(), ScriptCanvas::Nodes::Math::Subtract::CreateDescriptor(), ScriptCanvas::Nodes::Math::Sum::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Transform::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Vector2::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Vector3::CreateDescriptor(), - ScriptCanvas::Nodes::Math::Vector4::CreateDescriptor(), }; AABBNodes::Registrar::AddDescriptors(descriptors); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.h index e9b39c582f..cc4795498a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.h @@ -10,34 +10,22 @@ // This header is only meant to include the nodes and should not contain // shared code -#include "AABBNode.h" #include "AABBNodes.h" -#include "ColorNode.h" #include "ColorNodes.h" -#include "CRCNode.h" #include "CRCNodes.h" #include "Divide.h" #include "MathGenerics.h" #include "MathRandom.h" -#include "Matrix3x3Node.h" #include "Matrix3x3Nodes.h" -#include "Matrix4x4Node.h" #include "Matrix4x4Nodes.h" #include "MathExpression.h" #include "Multiply.h" -#include "Number.h" -#include "OBBNode.h" #include "OBBNodes.h" -#include "PlaneNode.h" #include "PlaneNodes.h" -#include "Random.h" -#include "Rotation.h" #include "RotationNodes.h" #include "Subtract.h" #include "Sum.h" -#include "Transform.h" #include "TransformNodes.h" -#include "Vector.h" #include "Vector2Nodes.h" #include "Vector3Nodes.h" #include "Vector4Nodes.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h deleted file mode 100644 index 4417413567..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Matrix3x3 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Matrix3x3, "{9FDA1949-A74F-4D27-BBD0-8E6F165291FE}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Matrix3x3", "A 3x3 matrix value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Matrix3x3.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h deleted file mode 100644 index da7d5983f4..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Matrix4x4 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Matrix4x4, "{CF059648-8BE5-4CC6-B909-4D3EBD945071}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Matrix4x4", "A 4x4 matrix value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Matrix4x4.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Number.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Number.h deleted file mode 100644 index 9639f1fce7..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Number.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Number - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Number, "{E1E746E9-2761-431E-9D06-717381F9822D}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(3) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Number", "A numeric value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Number.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNode.h deleted file mode 100644 index 24718c82f4..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/OBBNode.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class OBB - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(OBB, "{C63E8C27-412B-4CEE-959B-3D97E1D17370}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("OBB", "An oriented bounding box value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/OBB.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNode.h deleted file mode 100644 index c429eb1dc3..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/PlaneNode.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Plane - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Plane, "{A756E230-B4DC-42E7-A160-20A803CC8FA1}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Plane", "A plane value according to the equation: Ax + By + Cz + D = 0") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Plane.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml deleted file mode 100644 index d2f3aede03..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.cpp deleted file mode 100644 index dba370fa7c..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "Random.h" -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - - void Random::OnInputSignal(const SlotId& slotId) - { - if (slotId == RandomProperty::GetInSlotId(this)) - { - const SlotId resultSlotId = RandomProperty::GetResultSlotId(this); - - if (Slot* resultSlot = GetSlot(resultSlotId)) - { - float minValue = RandomProperty::GetMin(this); - float maxValue = RandomProperty::GetMax(this); - - auto randVal = MathNodeUtilities::GetRandom(minValue, maxValue); - - Datum o(Data::Type::Number(), Datum::eOriginality::Copy); - o.Set(randVal); - PushOutput(o, *resultSlot); - } - } - - SignalOutput(RandomProperty::GetOutSlotId(this)); - } - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.h deleted file mode 100644 index a5cc7d1aa9..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Random.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - - -#include - -#include - - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - //! Provides a random value within the specified range, uses std::uniform_real_distribution and std::mt19937 - class Random - : public Node - { - public: - - SCRIPTCANVAS_NODE(Random); - - void OnInputSignal(const SlotId& slotId); - - }; - } - } -} - diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Rotation.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Rotation.h deleted file mode 100644 index 9e23a206a1..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Rotation.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Quaternion - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Quaternion, "{E17FE11D-69F2-4746-B582-778B48D0BF47}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Quaternion", "imaginary(X, Y, Z), real W") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Quaternion.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Transform.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Transform.h deleted file mode 100644 index e4260966a9..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Transform.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Transform - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Transform, "{B74F127B-72E0-486B-86FF-2233767C2804}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Transform", "A 3D transform value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Transform.png") - ; - } - } - } - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector.h deleted file mode 100644 index af5054c45e..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Math - { - class Vector2 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Vector2, "{EB647398-7F56-4727-9C7C-277593DB1F11}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Vector2", "A 2D vector value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Vector.png") - ; - } - } - } - - }; - - class Vector3 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Vector3, "{95A12BDE-D4B4-47E8-A917-3E42F678E7FA}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Vector3", "A 3D vector value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Vector.png") - ; - } - } - } - - }; - - class Vector4 - : public NativeDatumNode - { - public: - using ParentType = NativeDatumNode; - AZ_COMPONENT(Vector4, "{9CAE50A1-C575-4DFC-95C5-FA0A12DABCBD}", ParentType); - - static void Reflect(AZ::ReflectContext* reflection) - { - ParentType::Reflect(reflection); - - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Vector4", "A 4D vector value") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Vector.png") - ; - } - } - } - - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp b/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp index 1c614dc5bc..792c72b3f6 100644 --- a/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp +++ b/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -43,7 +42,6 @@ namespace ScriptCanvas ScriptCanvas::Debugger::ServiceComponent::CreateDescriptor(), ScriptCanvas::Graph::CreateDescriptor(), ScriptCanvasEditor::ScriptCanvasFunctionDataComponent::CreateDescriptor(), - ScriptCanvas::PureData::CreateDescriptor(), ScriptCanvas::GraphVariableManagerComponent::CreateDescriptor(), ScriptCanvas::RuntimeComponent::CreateDescriptor(), diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index d1d7606b4f..8d5f43c3bc 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -66,7 +66,6 @@ set(FILES Include/ScriptCanvas/Core/MethodConfiguration.cpp Include/ScriptCanvas/Core/ModifiableDatumView.cpp Include/ScriptCanvas/Core/ModifiableDatumView.h - Include/ScriptCanvas/Core/NativeDatumNode.h Include/ScriptCanvas/Core/Node.cpp Include/ScriptCanvas/Core/Node.h Include/ScriptCanvas/Core/Nodeable.cpp @@ -76,8 +75,6 @@ set(FILES Include/ScriptCanvas/Core/NodeableNodeOverloaded.cpp Include/ScriptCanvas/Core/NodeableNodeOverloaded.h Include/ScriptCanvas/Core/NodeFunctionGeneric.h - Include/ScriptCanvas/Core/PureData.cpp - Include/ScriptCanvas/Core/PureData.h Include/ScriptCanvas/Core/Slot.cpp Include/ScriptCanvas/Core/Slot.h Include/ScriptCanvas/Core/SlotConfigurationDefaults.h @@ -131,8 +128,6 @@ set(FILES Include/ScriptCanvas/Core/Contracts/DisplayGroupConnectedSlotLimitContract.h Include/ScriptCanvas/Core/Contracts/DynamicTypeContract.cpp Include/ScriptCanvas/Core/Contracts/DynamicTypeContract.h - Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.cpp - Include/ScriptCanvas/Core/Contracts/ExclusivePureDataContract.h Include/ScriptCanvas/Core/Contracts/IsReferenceTypeContract.cpp Include/ScriptCanvas/Core/Contracts/IsReferenceTypeContract.h Include/ScriptCanvas/Core/Contracts/MathOperatorContract.cpp @@ -250,8 +245,6 @@ set(FILES Include/ScriptCanvas/Libraries/Core/AzEventHandler.cpp Include/ScriptCanvas/Libraries/Core/AzEventHandler.h Include/ScriptCanvas/Libraries/Core/AzEventHandler.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.cpp - Include/ScriptCanvas/Libraries/Core/BehaviorContextObjectNode.h Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp Include/ScriptCanvas/Libraries/Core/BinaryOperator.h Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp @@ -314,25 +307,18 @@ set(FILES Include/ScriptCanvas/Libraries/Core/Start.cpp Include/ScriptCanvas/Libraries/Core/Start.h Include/ScriptCanvas/Libraries/Core/Start.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/String.h Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp Include/ScriptCanvas/Libraries/Core/UnaryOperator.h Include/ScriptCanvas/Libraries/Entity/Entity.cpp Include/ScriptCanvas/Libraries/Entity/Entity.h - Include/ScriptCanvas/Libraries/Entity/EntityIDNode.h Include/ScriptCanvas/Libraries/Entity/EntityIDNodes.h Include/ScriptCanvas/Libraries/Entity/EntityNodes.h - Include/ScriptCanvas/Libraries/Entity/EntityRef.h - Include/ScriptCanvas/Libraries/Entity/Rotate.cpp - Include/ScriptCanvas/Libraries/Entity/Rotate.h - Include/ScriptCanvas/Libraries/Entity/Rotate.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Entity/RotateMethod.cpp Include/ScriptCanvas/Libraries/Entity/RotateMethod.h Include/ScriptCanvas/Libraries/Logic/And.h Include/ScriptCanvas/Libraries/Logic/Any.cpp Include/ScriptCanvas/Libraries/Logic/Any.h Include/ScriptCanvas/Libraries/Logic/Any.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Logic/Boolean.h Include/ScriptCanvas/Libraries/Logic/Break.h Include/ScriptCanvas/Libraries/Logic/Break.cpp Include/ScriptCanvas/Libraries/Logic/Break.ScriptCanvasGrammar.xml @@ -373,11 +359,8 @@ set(FILES Include/ScriptCanvas/Libraries/Logic/While.cpp Include/ScriptCanvas/Libraries/Logic/While.h Include/ScriptCanvas/Libraries/Logic/While.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Math/AABBNode.h Include/ScriptCanvas/Libraries/Math/AABBNodes.h - Include/ScriptCanvas/Libraries/Math/ColorNode.h Include/ScriptCanvas/Libraries/Math/ColorNodes.h - Include/ScriptCanvas/Libraries/Math/CRCNode.h Include/ScriptCanvas/Libraries/Math/CRCNodes.h Include/ScriptCanvas/Libraries/Math/Divide.h Include/ScriptCanvas/Libraries/Math/Math.cpp @@ -389,26 +372,15 @@ set(FILES Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h Include/ScriptCanvas/Libraries/Math/MathGenerics.h Include/ScriptCanvas/Libraries/Math/MathRandom.h - Include/ScriptCanvas/Libraries/Math/Matrix3x3Node.h Include/ScriptCanvas/Libraries/Math/Matrix3x3Nodes.h - Include/ScriptCanvas/Libraries/Math/Matrix4x4Node.h Include/ScriptCanvas/Libraries/Math/Matrix4x4Nodes.h Include/ScriptCanvas/Libraries/Math/Multiply.h - Include/ScriptCanvas/Libraries/Math/Number.h - Include/ScriptCanvas/Libraries/Math/OBBNode.h Include/ScriptCanvas/Libraries/Math/OBBNodes.h - Include/ScriptCanvas/Libraries/Math/PlaneNode.h Include/ScriptCanvas/Libraries/Math/PlaneNodes.h - Include/ScriptCanvas/Libraries/Math/Random.cpp - Include/ScriptCanvas/Libraries/Math/Random.h - Include/ScriptCanvas/Libraries/Math/Random.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Math/Rotation.h Include/ScriptCanvas/Libraries/Math/RotationNodes.h Include/ScriptCanvas/Libraries/Math/Subtract.h Include/ScriptCanvas/Libraries/Math/Sum.h - Include/ScriptCanvas/Libraries/Math/Transform.h Include/ScriptCanvas/Libraries/Math/TransformNodes.h - Include/ScriptCanvas/Libraries/Math/Vector.h Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake index daa2a599ce..ba84163d64 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake @@ -84,8 +84,6 @@ set(FILES Editor/GraphCanvas/Components/NodeDescriptors/EBusHandlerNodeDescriptorComponent.h Editor/GraphCanvas/Components/NodeDescriptors/EBusSenderNodeDescriptorComponent.cpp Editor/GraphCanvas/Components/NodeDescriptors/EBusSenderNodeDescriptorComponent.h - Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.cpp - Editor/GraphCanvas/Components/NodeDescriptors/EntityRefNodeDescriptorComponent.h Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h Editor/GraphCanvas/Components/NodeDescriptors/FunctionDefinitionNodeDescriptorComponent.h diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp index 8f769aefa4..03ecba29be 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.cpp @@ -470,14 +470,6 @@ namespace ScriptCanvasTests AZ::u32 TestBehaviorContextObject::s_createdCount = 0; AZ::u32 TestBehaviorContextObject::s_destroyedCount = 0; - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode* CreateTestObjectNode(const AZ::EntityId& graphUniqueId, AZ::EntityId& entityOut, const AZ::Uuid& objectTypeID) - { - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode* node = CreateTestNode(graphUniqueId, entityOut); - EXPECT_TRUE(node != nullptr); - node->InitializeObject(objectTypeID); - return node; - } - AZ::EntityId CreateClassFunctionNode(const ScriptCanvasId& scriptCanvasId, AZStd::string_view className, AZStd::string_view methodName) { using namespace ScriptCanvas; @@ -495,93 +487,6 @@ namespace ScriptCanvasTests return methodNodeID; } - ScriptCanvas::Node* CreateDataNodeByType(const ScriptCanvasId& scriptCanvasId, const ScriptCanvas::Data::Type& type, AZ::EntityId& nodeIDout) - { - using namespace ScriptCanvas; - - Node* node(nullptr); - - switch (type.GetType()) - { - case Data::eType::AABB: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::BehaviorContextObject: - { - auto objectNode = CreateTestNode(scriptCanvasId, nodeIDout); - objectNode->InitializeObject(type); - node = objectNode; - } - break; - - case Data::eType::Boolean: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Color: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::CRC: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::EntityID: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Matrix3x3: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Matrix4x4: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Number: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::OBB: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Plane: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Quaternion: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::String: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Transform: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Vector2: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Vector3: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - case Data::eType::Vector4: - node = CreateTestNode(scriptCanvasId, nodeIDout); - break; - - default: - AZ_Error("ScriptCanvas", false, "unsupported data type"); - } - - return node; - } - AZStd::string SlotDescriptorToString(ScriptCanvas::SlotDescriptor descriptor) { AZStd::string name; diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h index e1879f6038..dcc4d2eb3f 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h @@ -101,7 +101,6 @@ namespace ScriptCanvasTests return addVariableOutcome.TakeValue(); } - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode* CreateTestObjectNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId, AZ::EntityId& entityOut, const AZ::Uuid& objectTypeID); AZ::EntityId CreateClassFunctionNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId, AZStd::string_view className, AZStd::string_view methodName); AZStd::string SlotDescriptorToString(ScriptCanvas::SlotDescriptor type); void DumpSlots(const ScriptCanvas::Node& node); diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp index be0f57665a..c602bde1f2 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include @@ -20,48 +19,6 @@ using namespace ScriptCanvasTests; using namespace ScriptCanvasEditor; using namespace TestNodes; -TEST_F(ScriptCanvasTestFixture, BehaviorContextObjectGenericConstructor) -{ - using namespace ScriptCanvas; - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - - AZ::Entity* graphEntity = aznew AZ::Entity("Graph"); - graphEntity->Init(); - SystemRequestBus::Broadcast(&SystemRequests::CreateGraphOnEntity, graphEntity); - auto graph = graphEntity->FindComponent(); - EXPECT_NE(nullptr, graph); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - //Validates the GenericConstructorOverride attribute is being used to construct types that are normally not initialized in C++ - AZ::EntityId vector3IdA; - ScriptCanvas::Nodes::Core::BehaviorContextObjectNode* vector3NodeA = CreateTestNode(graphUniqueId, vector3IdA); - vector3NodeA->InitializeObject(azrtti_typeid()); - - ReportErrors(graph); - - if (auto result = vector3NodeA->GetInput_UNIT_TEST("Set")) - { - EXPECT_EQ(0, result->GetValue()); - } - else - { - ADD_FAILURE(); - } - - delete graphEntity; - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - // Tests the basic footprint of the ebus node both before and after graph activation to make sure all internal bookeeping is correct. TEST_F(ScriptCanvasTestFixture, BehaviorContext_BusHandlerNodeFootPrint) { diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp index b365a939e8..d5f4c221c8 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp @@ -407,38 +407,6 @@ TEST_F(ScriptCanvasTestFixture, ValueTypes) GTEST_SUCCEED(); } - -namespace -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - bool GraphHasVectorWithValue(const ScriptCanvas::Graph& graph, const AZ::Vector3& vector) - { - for (auto nodeId : graph.GetNodes()) - { - AZ::Entity* entity{}; - AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, nodeId); - - if (entity) - { - if (auto node = AZ::EntityUtils::FindFirstDerivedComponent(entity)) - { - if (auto candidate = node->GetInput_UNIT_TEST("Set")) - { - if (*candidate == vector) - { - return true; - } - } - } - } - } - - return false; - } -} - TEST_F(ScriptCanvasTestFixture, Contracts) { using namespace ScriptCanvas; @@ -666,126 +634,6 @@ TEST_F(ScriptCanvasTestFixture, Contracts) // m_behaviorContext->DisableRemoveReflection(); // } -TEST_F(ScriptCanvasTestFixture, EntityRefTest) -{ - - - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - // Fake "world" entities - AZ::Entity first("First"); - first.CreateComponent(); - first.Init(); - first.Activate(); - - AZ::Entity second("Second"); - second.CreateComponent(); - second.Init(); - second.Activate(); - - // Script Canvas ScriptCanvas::Graph - ScriptCanvas::Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - - m_entityContext.AddEntity(first.GetId()); - m_entityContext.AddEntity(second.GetId()); - m_entityContext.AddEntity(graph->GetEntityId()); - - graph->GetEntity()->SetName("ScriptCanvas::Graph Owner Entity"); - - graph->GetEntity()->CreateComponent(); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - // EntityRef node to some specific entity #1 - AZ::EntityId selfEntityIdNode; - auto selfEntityRef = CreateTestNode(graphUniqueId, selfEntityIdNode); - selfEntityRef->SetEntityRef(first.GetId()); - - // EntityRef node to some specific entity #2 - AZ::EntityId otherEntityIdNode; - auto otherEntityRef = CreateTestNode(graphUniqueId, otherEntityIdNode); - otherEntityRef->SetEntityRef(second.GetId()); - - // Explicitly set an EntityRef node with this graph's entity Id. - AZ::EntityId graphEntityIdNode; - auto graphEntityRef = CreateTestNode(graphUniqueId, graphEntityIdNode); - graphEntityRef->SetEntityRef(graph->GetEntity()->GetId()); - - // First test: directly set an entity Id on the EntityID: 0 slot - AZ::EntityId eventAid; - ScriptCanvas::Nodes::Core::Method* nodeA = CreateTestNode(graphUniqueId, eventAid); - nodeA->InitializeEvent({ {} }, "EntityRefTestEventBus", "TestEvent"); - if (auto entityId = nodeA->ModInput_UNIT_TEST("EntityID: 0")) - { - *entityId = first.GetId(); - } - - // Second test: Will connect the slot to an EntityRef node - AZ::EntityId eventBid; - ScriptCanvas::Nodes::Core::Method* nodeB = CreateTestNode(graphUniqueId, eventBid); - nodeB->InitializeEvent({ {} }, "EntityRefTestEventBus", "TestEvent"); - - // Third test: Set the slot's EntityId: 0 to SelfReferenceId, this should result in the same Id as graph->GetEntityId() - AZ::EntityId eventCid; - ScriptCanvas::Nodes::Core::Method* nodeC = CreateTestNode(graphUniqueId, eventCid); - nodeC->InitializeEvent({ {} }, "EntityRefTestEventBus", "TestEvent"); - if (auto entityId = nodeC->ModInput_UNIT_TEST("EntityID: 0")) - { - *entityId = ScriptCanvas::GraphOwnerId; - } - - // True - AZ::EntityId trueNodeId; - CreateDataNode(graphUniqueId, true, trueNodeId); - - // False - AZ::EntityId falseNodeId; - CreateDataNode(graphUniqueId, false, falseNodeId); - - // Start -> TestEvent - // O EntityId: 0 (not connected, it was set directly on the slot) - // EntityRef: first -O EntityId: 1 - // False -O Boolean: 2 - EXPECT_TRUE(Connect(*graph, startID, "Out", eventAid, "In")); - EXPECT_TRUE(Connect(*graph, eventAid, "EntityID: 1", selfEntityIdNode, "Get")); - EXPECT_TRUE(Connect(*graph, eventAid, "Boolean: 2", falseNodeId, "Get")); - - // Start -> TestEvent - // EntityRef: second -O EntityId: 0 - // EntityRef: second -O EntityId: 1 - // False -O Boolean: 2 - EXPECT_TRUE(Connect(*graph, startID, "Out", eventBid, "In")); - EXPECT_TRUE(Connect(*graph, eventBid, "EntityID: 0", otherEntityIdNode, "Get")); - EXPECT_TRUE(Connect(*graph, eventBid, "EntityID: 1", otherEntityIdNode, "Get")); - EXPECT_TRUE(Connect(*graph, eventBid, "Boolean: 2", falseNodeId, "Get")); - - // Start -> TestEvent - // -O EntityId: 0 (not connected, slot is set to SelfReferenceId) - // graphEntityIdNode -O EntityId: 1 - // True -O Boolean: 2 - EXPECT_TRUE(Connect(*graph, startID, "Out", eventCid, "In")); - EXPECT_TRUE(Connect(*graph, eventCid, "EntityID: 1", graphEntityIdNode, "Get")); - EXPECT_TRUE(Connect(*graph, eventCid, "Boolean: 2", trueNodeId, "Get")); - - // Execute the graph - - { - ScriptCanvasEditor::ScopedOutputSuppression suppressOutput; - graph->GetEntity()->Activate(); - } - - ReportErrors(graph); - delete graph->GetEntity(); - -} - const int k_executionCount = 998; TEST_F(ScriptCanvasTestFixture, ExecutionLength) @@ -828,10 +676,11 @@ TEST_F(ScriptCanvasTestFixture, ExecutionLength) TEST_F(ScriptCanvasTestFixture, While) { - RunUnitTestGraph("LY_SC_UnitTest_While", ExecutionMode::Interpreted); + + RunUnitTestGraph("LY_SC_UnitTest_While", ScriptCanvas::ExecutionMode::Interpreted); } TEST_F(ScriptCanvasTestFixture, WhileBreak) { - RunUnitTestGraph("LY_SC_UnitTest_WhileBreak", ExecutionMode::Interpreted); + RunUnitTestGraph("LY_SC_UnitTest_WhileBreak", ScriptCanvas::ExecutionMode::Interpreted); } diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Math.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Math.cpp index 65236a7c92..71f0a42b03 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Math.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Math.cpp @@ -17,76 +17,6 @@ using namespace ScriptCanvasTests; using namespace ScriptCanvas; -template -AZStd::vector TestMathFunction(std::initializer_list inputNamesList, std::initializer_list inputList, std::initializer_list outputNamesList, std::initializer_list outputList) -{ - AZStd::vector inputNames(inputNamesList); - AZStd::vector input(inputList); - AZStd::vector outputNames(outputNamesList); - AZStd::vector output(outputList); - - AZ_Assert(inputNames.size() == input.size(), "Size mismatch"); - AZ_Assert(outputNames.size() == output.size(), "Size mismatch"); - - AZ::Entity graphEntity("Graph"); - graphEntity.Init(); - SystemRequestBus::Broadcast(&SystemRequests::CreateGraphOnEntity, &graphEntity); - auto graph = graphEntity.FindComponent(); - EXPECT_NE(nullptr, graph); - - const AZ::EntityId& graphEntityId = graph->GetEntityId(); - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - AZ::EntityId functionID; - CreateTestNode(graphUniqueId, functionID); - EXPECT_TRUE(Connect(*graph, startID, "Out", functionID, "In")); - - AZStd::vector inputNodes; - AZStd::vector inputNodeIDs; - AZStd::vector outputNodes; - AZStd::vector outputNodeIDs; - - for (int i = 0; i < input.size(); ++i) - { - AZ::EntityId inputNodeID; - auto node = CreateDataNodeByType(graphUniqueId, input[i].GetType(), inputNodeID); - inputNodeIDs.push_back(inputNodeID); - inputNodes.push_back(node); - node->SetInput_UNIT_TEST(PureData::k_setThis, input[i]); - } - - for (int i = 0; i < output.size(); ++i) - { - AZ::EntityId outputNodeID; - auto node = CreateDataNodeByType(graphUniqueId, output[i].GetType(), outputNodeID); - outputNodeIDs.push_back(outputNodeID); - outputNodes.push_back(node); - } - - for (int i = 0; i < inputNames.size(); ++i) - { - EXPECT_TRUE(Connect(*graph, inputNodeIDs[i], "Get", functionID, inputNames[i].data())); - } - - for (int i = 0; i < output.size(); ++i) - { - EXPECT_TRUE(Connect(*graph, functionID, outputNames[i].data(), outputNodeIDs[i], PureData::k_setThis)); - } - - graph->GetEntity()->Activate(); - - for (int i = 0; i < output.size(); ++i) - { - output[i] = *outputNodes[i]->GetInput_UNIT_TEST(PureData::k_setThis); - } - - graph->GetEntity()->Deactivate(); - delete graph; - return output; -} - TEST_F(ScriptCanvasTestFixture, MathOperations_Graph) { RunUnitTestGraph("LY_SC_UnitTest_MathOperations", ExecutionMode::Interpreted); diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp index a1e48a4637..e74aa8e641 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_NodeGenerics.cpp @@ -163,906 +163,5 @@ TEST_F(ScriptCanvasTestFixture, NodeGenerics) delete graph->GetEntity(); } -TEST_F(ScriptCanvasTestFixture, NodeGenericsByValue) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointer) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - // execution - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByValueID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByReference) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByValueInteger) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const AZ::EntityId graphEntityId = graph->GetEntityId(); - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Node* valueNode1 = CreateDataNode(graphUniqueId, 1, valueID1); - EXPECT_EQ(1, *valueNode1->GetInput_UNIT_TEST("Set")); - - Node* valueNode2 = CreateDataNode(graphUniqueId, 2, valueID2); - EXPECT_EQ(2, *valueNode2->GetInput_UNIT_TEST("Set")); - - Node* valueNode3 = CreateDataNode(graphUniqueId, 3, valueID3); - EXPECT_EQ(3, *valueNode3->GetInput_UNIT_TEST("Set")); - - Node* valueNode4 = CreateDataNode(graphUniqueId, 4, valueID4); - EXPECT_EQ(4, *valueNode4->GetInput_UNIT_TEST("Set")); - - Node* valueNode5 = CreateDataNode(graphUniqueId, 5, valueID5); - EXPECT_EQ(5, *valueNode5->GetInput_UNIT_TEST("Set")); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID5, "Set")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointerInteger) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Node* valueNode1 = CreateDataNode(graphUniqueId, 1, valueID1); - EXPECT_EQ(1, *valueNode1->GetInput_UNIT_TEST("Set")); - - Node* valueNode2 = CreateDataNode(graphUniqueId, 2, valueID2); - EXPECT_EQ(2, *valueNode2->GetInput_UNIT_TEST("Set")); - - Node* valueNode3 = CreateDataNode(graphUniqueId, 3, valueID3); - EXPECT_EQ(3, *valueNode3->GetInput_UNIT_TEST("Set")); - - Node* valueNode4 = CreateDataNode(graphUniqueId, 4, valueID4); - EXPECT_EQ(4, *valueNode4->GetInput_UNIT_TEST("Set")); - - Node* valueNode5 = CreateDataNode(graphUniqueId, 5, valueID5); - EXPECT_EQ(5, *valueNode5->GetInput_UNIT_TEST("Set")); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByValueID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByReferenceInteger) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Node* valueNode1 = CreateDataNode(graphUniqueId, 1, valueID1); - EXPECT_EQ(1, *valueNode1->GetInput_UNIT_TEST("Set")); - - Node* valueNode2 = CreateDataNode(graphUniqueId, 2, valueID2); - EXPECT_EQ(2, *valueNode2->GetInput_UNIT_TEST("Set")); - - Node* valueNode3 = CreateDataNode(graphUniqueId, 3, valueID3); - EXPECT_EQ(3, *valueNode3->GetInput_UNIT_TEST("Set")); - - Node* valueNode4 = CreateDataNode(graphUniqueId, 4, valueID4); - EXPECT_EQ(4, *valueNode4->GetInput_UNIT_TEST("Set")); - - Node* valueNode5 = CreateDataNode(graphUniqueId, 5, valueID5); - EXPECT_EQ(5, *valueNode5->GetInput_UNIT_TEST("Set")); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByValueID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByValueMulti) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByValueID; - CreateTestNode(graphUniqueId, maxByValueID); - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - AZ::EntityId valueIntegerID1, valueIntegerID2, valueIntegerID3, valueIntegerID4, valueIntegerID5; - - Node* valueIntegerNode1 = CreateDataNode(graphUniqueId, 1, valueIntegerID1); - EXPECT_EQ(1, *valueIntegerNode1->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode2 = CreateDataNode(graphUniqueId, 2, valueIntegerID2); - EXPECT_EQ(2, *valueIntegerNode2->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode3 = CreateDataNode(graphUniqueId, 3, valueIntegerID3); - EXPECT_EQ(3, *valueIntegerNode3->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode4 = CreateDataNode(graphUniqueId, 4, valueIntegerID4); - EXPECT_EQ(4, *valueIntegerNode4->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode5 = CreateDataNode(graphUniqueId, 5, valueIntegerID5); - EXPECT_EQ(5, *valueIntegerNode5->GetInput_UNIT_TEST("Set")); - - auto valueInteger1 = valueIntegerNode1->GetInput_UNIT_TEST("Set"); - auto valueInteger2 = valueIntegerNode2->GetInput_UNIT_TEST("Set"); - auto valueInteger3 = valueIntegerNode3->GetInput_UNIT_TEST("Set"); - auto valueInteger4 = valueIntegerNode4->GetInput_UNIT_TEST("Set"); - auto valueInteger5 = valueIntegerNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(valueInteger1, valueInteger2); - EXPECT_NE(valueInteger1, valueInteger3); - EXPECT_NE(valueInteger1, valueInteger4); - EXPECT_NE(valueInteger1, valueInteger5); - EXPECT_NE(valueInteger2, valueInteger3); - EXPECT_NE(valueInteger2, valueInteger4); - EXPECT_NE(valueInteger2, valueInteger5); - EXPECT_NE(valueInteger3, valueInteger4); - EXPECT_NE(valueInteger3, valueInteger5); - EXPECT_NE(valueInteger4, valueInteger5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByValueID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByValueID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, valueIntegerID1, "Get", maxByValueID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueIntegerID2, "Get", maxByValueID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueIntegerID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueIntegerID3, "Get", valueIntegerID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByValueID, "Result: Number", valueIntegerID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByValueID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByReferenceMulti) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByReferenceID; - CreateTestNode(graphUniqueId, maxByReferenceID); - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - AZ::EntityId valueIntegerID1, valueIntegerID2, valueIntegerID3, valueIntegerID4, valueIntegerID5; - - Node* valueIntegerNode1 = CreateDataNode(graphUniqueId, 1, valueIntegerID1); - EXPECT_EQ(1, *valueIntegerNode1->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode2 = CreateDataNode(graphUniqueId, 2, valueIntegerID2); - EXPECT_EQ(2, *valueIntegerNode2->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode3 = CreateDataNode(graphUniqueId, 3, valueIntegerID3); - EXPECT_EQ(3, *valueIntegerNode3->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode4 = CreateDataNode(graphUniqueId, 4, valueIntegerID4); - EXPECT_EQ(4, *valueIntegerNode4->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode5 = CreateDataNode(graphUniqueId, 5, valueIntegerID5); - EXPECT_EQ(5, *valueIntegerNode5->GetInput_UNIT_TEST("Set")); - - auto valueInteger1 = valueIntegerNode1->GetInput_UNIT_TEST("Set"); - auto valueInteger2 = valueIntegerNode2->GetInput_UNIT_TEST("Set"); - auto valueInteger3 = valueIntegerNode3->GetInput_UNIT_TEST("Set"); - auto valueInteger4 = valueIntegerNode4->GetInput_UNIT_TEST("Set"); - auto valueInteger5 = valueIntegerNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(valueInteger1, valueInteger2); - EXPECT_NE(valueInteger1, valueInteger3); - EXPECT_NE(valueInteger1, valueInteger4); - EXPECT_NE(valueInteger1, valueInteger5); - EXPECT_NE(valueInteger2, valueInteger3); - EXPECT_NE(valueInteger2, valueInteger4); - EXPECT_NE(valueInteger2, valueInteger5); - EXPECT_NE(valueInteger3, valueInteger4); - EXPECT_NE(valueInteger3, valueInteger5); - EXPECT_NE(valueInteger4, valueInteger5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByReferenceID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByReferenceID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByReferenceID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByReferenceID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, valueIntegerID1, "Get", maxByReferenceID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueIntegerID2, "Get", maxByReferenceID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByReferenceID, "Result: Number", valueIntegerID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueIntegerID3, "Get", valueIntegerID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByReferenceID, "Result: Number", valueIntegerID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByReferenceID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - -TEST_F(ScriptCanvasTestFixture, NodeGenericsByPointerMulti) -{ - using namespace ScriptCanvas; - using namespace ScriptCanvas::Nodes; - - RegisterComponentDescriptor(); - - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - - TestBehaviorContextObject::ResetCounts(); - - UnitTestEventsHandler unitTestHandler; - unitTestHandler.BusConnect(); - - Graph* graph = nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId maxByPointerID; - CreateTestNode(graphUniqueId, maxByPointerID); - AZ::EntityId valueID1, valueID2, valueID3, valueID4, valueID5; - - Core::BehaviorContextObjectNode* valueNode1 = CreateTestNode(graphUniqueId, valueID1); - valueNode1->InitializeObject(azrtti_typeid()); - valueNode1->ModInput_UNIT_TEST("Set")->SetValue(1); - EXPECT_EQ(1, valueNode1->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode2 = CreateTestNode(graphUniqueId, valueID2); - valueNode2->InitializeObject(azrtti_typeid()); - valueNode2->ModInput_UNIT_TEST("Set")->SetValue(2); - EXPECT_EQ(2, valueNode2->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode3 = CreateTestNode(graphUniqueId, valueID3); - valueNode3->InitializeObject(azrtti_typeid()); - valueNode3->ModInput_UNIT_TEST("Set")->SetValue(3); - EXPECT_EQ(3, valueNode3->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode4 = CreateTestNode(graphUniqueId, valueID4); - valueNode4->InitializeObject(azrtti_typeid()); - valueNode4->ModInput_UNIT_TEST("Set")->SetValue(4); - EXPECT_EQ(4, valueNode4->GetInput_UNIT_TEST("Set")->GetValue()); - - Core::BehaviorContextObjectNode* valueNode5 = CreateTestNode(graphUniqueId, valueID5); - valueNode5->InitializeObject(azrtti_typeid()); - valueNode5->ModInput_UNIT_TEST("Set")->SetValue(5); - EXPECT_EQ(5, valueNode5->GetInput_UNIT_TEST("Set")->GetValue()); - - auto value1 = valueNode1->GetInput_UNIT_TEST("Set"); - auto value2 = valueNode2->GetInput_UNIT_TEST("Set"); - auto value3 = valueNode3->GetInput_UNIT_TEST("Set"); - auto value4 = valueNode4->GetInput_UNIT_TEST("Set"); - auto value5 = valueNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(value1, value2); - EXPECT_NE(value1, value3); - EXPECT_NE(value1, value4); - EXPECT_NE(value1, value5); - EXPECT_NE(value2, value3); - EXPECT_NE(value2, value4); - EXPECT_NE(value2, value5); - EXPECT_NE(value3, value4); - EXPECT_NE(value3, value5); - EXPECT_NE(value4, value5); - - AZ::EntityId valueIntegerID1, valueIntegerID2, valueIntegerID3, valueIntegerID4, valueIntegerID5; - - Node* valueIntegerNode1 = CreateDataNode(graphUniqueId, 1, valueIntegerID1); - EXPECT_EQ(1, *valueIntegerNode1->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode2 = CreateDataNode(graphUniqueId, 2, valueIntegerID2); - EXPECT_EQ(2, *valueIntegerNode2->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode3 = CreateDataNode(graphUniqueId, 3, valueIntegerID3); - EXPECT_EQ(3, *valueIntegerNode3->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode4 = CreateDataNode(graphUniqueId, 4, valueIntegerID4); - EXPECT_EQ(4, *valueIntegerNode4->GetInput_UNIT_TEST("Set")); - - Node* valueIntegerNode5 = CreateDataNode(graphUniqueId, 5, valueIntegerID5); - EXPECT_EQ(5, *valueIntegerNode5->GetInput_UNIT_TEST("Set")); - - auto valueInteger1 = valueIntegerNode1->GetInput_UNIT_TEST("Set"); - auto valueInteger2 = valueIntegerNode2->GetInput_UNIT_TEST("Set"); - auto valueInteger3 = valueIntegerNode3->GetInput_UNIT_TEST("Set"); - auto valueInteger4 = valueIntegerNode4->GetInput_UNIT_TEST("Set"); - auto valueInteger5 = valueIntegerNode5->GetInput_UNIT_TEST("Set"); - - EXPECT_NE(valueInteger1, valueInteger2); - EXPECT_NE(valueInteger1, valueInteger3); - EXPECT_NE(valueInteger1, valueInteger4); - EXPECT_NE(valueInteger1, valueInteger5); - EXPECT_NE(valueInteger2, valueInteger3); - EXPECT_NE(valueInteger2, valueInteger4); - EXPECT_NE(valueInteger2, valueInteger5); - EXPECT_NE(valueInteger3, valueInteger4); - EXPECT_NE(valueInteger3, valueInteger5); - EXPECT_NE(valueInteger4, valueInteger5); - - // data - EXPECT_TRUE(Connect(*graph, valueID1, "Get", maxByPointerID, "TestBehaviorContextObject: 0")); - EXPECT_TRUE(Connect(*graph, valueID2, "Get", maxByPointerID, "TestBehaviorContextObject: 1")); - EXPECT_TRUE(Connect(*graph, maxByPointerID, "Result: TestBehaviorContextObject", valueID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueID3, "Get", valueID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByPointerID, "Result: TestBehaviorContextObject", valueID5, "Set")); - - EXPECT_TRUE(Connect(*graph, valueIntegerID1, "Get", maxByPointerID, "Number: 0")); - EXPECT_TRUE(Connect(*graph, valueIntegerID2, "Get", maxByPointerID, "Number: 1")); - EXPECT_TRUE(Connect(*graph, maxByPointerID, "Result: Number", valueIntegerID3, "Set")); - EXPECT_TRUE(Connect(*graph, valueIntegerID3, "Get", valueIntegerID4, "Set")); - EXPECT_TRUE(Connect(*graph, maxByPointerID, "Result: Number", valueIntegerID5, "Set")); - - EXPECT_TRUE(Connect(*graph, startID, "Out", maxByPointerID, "In")); - - delete graph->GetEntity(); - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TestBehaviorContextObject::Reflect(m_serializeContext); - TestBehaviorContextObject::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} #pragma warning( pop ) From fea83b0b51990975b175196229d2d1fbe448fe62 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Thu, 1 Jul 2021 17:08:16 -0700 Subject: [PATCH 04/67] The Great ScriptCanvas Purge, Part II Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Framework/ScriptCanvasTraceUtilities.h | 8 +- .../GraphCanvas/NodeDescriptorBus.h | 2 +- .../Code/Editor/Nodes/NodeCreateUtils.cpp | 30 ------- .../Code/Editor/Nodes/NodeCreateUtils.h | 1 - .../Code/Editor/Nodes/NodeDisplayUtils.cpp | 6 -- .../Code/Editor/Nodes/NodeDisplayUtils.h | 4 - .../Code/Editor/ReflectComponent.cpp | 1 - .../SpecializedNodePaletteTreeItemTypes.cpp | 41 --------- .../SpecializedNodePaletteTreeItemTypes.h | 33 -------- .../VariableNodePaletteTreeItemTypes.cpp | 1 - .../View/Windows/ScriptCanvasContextMenus.cpp | 61 -------------- .../View/Windows/ScriptCanvasContextMenus.h | 18 ---- .../Code/Include/ScriptCanvas/Core/Graph.cpp | 2 - .../ScriptCanvas/Core/ModifiableDatumView.h | 3 +- .../ScriptCanvas/Core/NodeFunctionGeneric.h | 10 --- .../ScriptCanvas/Libraries/Core/CoreNodes.cpp | 4 - .../ScriptCanvas/Libraries/Core/CoreNodes.h | 2 - .../ScriptCanvas/Libraries/Core/Error.cpp | 84 ------------------- .../ScriptCanvas/Libraries/Core/Error.h | 34 -------- .../Libraries/Core/ErrorHandler.cpp | 73 ---------------- .../Libraries/Core/ErrorHandler.h | 37 -------- .../ScriptCanvas/Libraries/Entity/Entity.cpp | 2 +- .../ScriptCanvas/Libraries/Libraries.h | 15 ++++ .../ScriptCanvas/Libraries/Math/Math.cpp | 46 ++++++---- .../Code/scriptcanvasgem_common_files.cmake | 4 - 25 files changed, 54 insertions(+), 468 deletions(-) delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.h diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index 62050980b6..de1a6de247 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -171,15 +171,15 @@ namespace ScriptCanvasEditor struct ScopedOutputSuppression { - ScopedOutputSuppression(bool suppressState = true) + ScopedOutputSuppression([[maybe_unused]] bool suppressState = true) { - AZ::Debug::TraceMessageBus::BroadcastResult(m_oldSuppression, &AZ::Debug::TraceMessageEvents::OnOutput, "", ""); - TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, suppressState); +// AZ::Debug::TraceMessageBus::BroadcastResult(m_oldSuppression, &AZ::Debug::TraceMessageEvents::OnOutput, "", ""); +// TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, suppressState); } ~ScopedOutputSuppression() { - TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, m_oldSuppression); + // TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, m_oldSuppression); } private: bool m_oldSuppression = false; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h index 6822576482..a0b0cea549 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h @@ -37,7 +37,7 @@ namespace ScriptCanvasEditor EBusHandler, EBusHandlerEvent, EBusSender, - EntityRef, + _deprecated_, VariableNode, SetVariable, GetVariable, diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp index 1ad27566d9..0b2d0de958 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.cpp @@ -131,36 +131,6 @@ namespace ScriptCanvasEditor::Nodes return AZStd::make_pair(node, nodeIdPair); } - NodeIdPair CreateEntityNode(const AZ::EntityId& sourceId, const ScriptCanvas::ScriptCanvasId& scriptCanvasId) - { - AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__); - NodeIdPair nodeIdPair; - - ScriptCanvas::Node* node = nullptr; - AZ::Entity* scriptCanvasEntity{ aznew AZ::Entity }; - scriptCanvasEntity->Init(); - nodeIdPair.m_scriptCanvasId = scriptCanvasEntity->GetId(); - ScriptCanvas::SystemRequestBus::BroadcastResult(node, &ScriptCanvas::SystemRequests::CreateNodeOnEntity, scriptCanvasEntity->GetId(), scriptCanvasId, ScriptCanvas::Nodes::Entity::EntityRef::RTTI_Type()); - - auto* entityNode = azrtti_cast(node); - entityNode->SetEntityRef(sourceId); - - // Set the name - AZ::Entity* sourceEntity = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(sourceEntity, &AZ::ComponentApplicationRequests::FindEntity, sourceId); - if (sourceEntity) - { - scriptCanvasEntity->SetName(AZStd::string::format("SC-EntityRef(%s)", sourceEntity->GetName().data())); - } - - AZ::EntityId graphCanvasGraphId; - EditorGraphRequestBus::EventResult(graphCanvasGraphId, scriptCanvasId, &EditorGraphRequests::GetGraphCanvasGraphId); - - nodeIdPair.m_graphCanvasId = DisplayEntityNode(graphCanvasGraphId, entityNode); - - return nodeIdPair; - } - NodeIdPair CreateObjectMethodNode(AZStd::string_view className, AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, ScriptCanvas::PropertyStatus propertyStatus) { AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__); diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.h b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.h index c24b48a289..a3a9a4cc1e 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeCreateUtils.h @@ -28,7 +28,6 @@ namespace ScriptCanvasEditor::Nodes // Specific create methods which will also handle displaying the node. AZStd::pair CreateAndGetNode(const AZ::Uuid& classData, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const StyleConfiguration& styleConfiguration, AZStd::function = nullptr); NodeIdPair CreateNode(const AZ::Uuid& classData, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const StyleConfiguration& styleConfiguration); - NodeIdPair CreateEntityNode(const AZ::EntityId& sourceId, const ScriptCanvas::ScriptCanvasId& scriptCanvasId); NodeIdPair CreateObjectMethodNode(AZStd::string_view className, AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, ScriptCanvas::PropertyStatus propertyStatus); NodeIdPair CreateObjectMethodOverloadNode(AZStd::string_view className, AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasGraphId); NodeIdPair CreateGlobalMethodNode(AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId); diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp index 0c210441fe..691cfe3698 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp @@ -43,8 +43,6 @@ #include #include #include -#include - namespace ScriptCanvasEditor::Nodes::SlotDisplayHelper { @@ -1093,10 +1091,6 @@ namespace ScriptCanvasEditor::Nodes { graphCanvasNodeId = DisplayAzEventHandlerNode(graphCanvasGraphId, azEventHandlerNode); } - else if (azrtti_istypeof(node)) - { - graphCanvasNodeId = DisplayEntityNode(graphCanvasGraphId, static_cast(node)); - } else if (azrtti_istypeof(node)) { graphCanvasNodeId = DisplayScriptEventWrapperNode(graphCanvasGraphId, static_cast(node)); diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h index 59c69ea662..3befb20846 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.h @@ -30,10 +30,6 @@ namespace ScriptCanvas::Nodes::Core class SetVariableNode; class SendScriptEvent; } -namespace ScriptCanvas::Nodes::Entity -{ - class EntityRef; -} namespace ScriptEvents { class Method; diff --git a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp index a90e3a9fd5..2d45f0c644 100644 --- a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp @@ -59,7 +59,6 @@ namespace ScriptCanvasEditor CreateEBusHandlerMimeEvent::Reflect(context); CreateEBusHandlerEventMimeEvent::Reflect(context); CreateEBusSenderMimeEvent::Reflect(context); - CreateEntityRefNodeMimeEvent::Reflect(context); CreateGetVariableNodeMimeEvent::Reflect(context); CreateSetVariableNodeMimeEvent::Reflect(context); CreateVariableChangedNodeMimeEvent::Reflect(context); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp index a214bb7ab8..0f97741060 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.cpp @@ -27,47 +27,6 @@ namespace ScriptCanvasEditor { - ///////////////////////////////// - // CreateEntityRefNodeMimeEvent - ///////////////////////////////// - - void CreateEntityRefNodeMimeEvent::Reflect(AZ::ReflectContext* reflectContext) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext); - - if (serializeContext) - { - serializeContext->Class() - ->Version(0) - ->Field("EntityId", &CreateEntityRefNodeMimeEvent::m_entityId) - ; - } - } - - CreateEntityRefNodeMimeEvent::CreateEntityRefNodeMimeEvent(const AZ::EntityId& entityId) - : m_entityId(entityId) - { - } - - ScriptCanvasEditor::NodeIdPair CreateEntityRefNodeMimeEvent::CreateNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const - { - return Nodes::CreateEntityNode(m_entityId, scriptCanvasId); - } - - ///////////////////////////////// - // EntityRefNodePaletteTreeItem - ///////////////////////////////// - - EntityRefNodePaletteTreeItem::EntityRefNodePaletteTreeItem(AZStd::string_view nodeName, [[maybe_unused]] const QString& iconPath) - : DraggableNodePaletteTreeItem(nodeName, ScriptCanvasEditor::AssetEditorId) - { - } - - GraphCanvas::GraphCanvasMimeEvent* EntityRefNodePaletteTreeItem::CreateMimeEvent() const - { - return aznew CreateEntityRefNodeMimeEvent(); - } - /////////////////////////////// // CreateCommentNodeMimeEvent /////////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h index 5f623e4c56..bf02a3455d 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/SpecializedNodePaletteTreeItemTypes.h @@ -11,39 +11,6 @@ namespace ScriptCanvasEditor { - // - class CreateEntityRefNodeMimeEvent - : public CreateNodeMimeEvent - { - public: - AZ_RTTI(CreateEntityRefNodeMimeEvent, "{20CD5AF5-216E-4A41-9630-191C2803899B}", CreateNodeMimeEvent); - AZ_CLASS_ALLOCATOR(CreateEntityRefNodeMimeEvent, AZ::SystemAllocator, 0); - - static void Reflect(AZ::ReflectContext* reflectContext); - - CreateEntityRefNodeMimeEvent() = default; - CreateEntityRefNodeMimeEvent(const AZ::EntityId& entityId); - ~CreateEntityRefNodeMimeEvent() = default; - - protected: - ScriptCanvasEditor::NodeIdPair CreateNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) const override; - - private: - AZ::EntityId m_entityId; - }; - - class EntityRefNodePaletteTreeItem - : public GraphCanvas::DraggableNodePaletteTreeItem - { - public: - AZ_CLASS_ALLOCATOR(EntityRefNodePaletteTreeItem, AZ::SystemAllocator, 0); - EntityRefNodePaletteTreeItem(AZStd::string_view nodeName, const QString& iconPath); - ~EntityRefNodePaletteTreeItem() = default; - - GraphCanvas::GraphCanvasMimeEvent* CreateMimeEvent() const override; - }; - // - // class CreateCommentNodeMimeEvent : public SpecializedCreateNodeMimeEvent diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp index c7649174bb..054158bcde 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/VariableNodePaletteTreeItemTypes.cpp @@ -30,7 +30,6 @@ #include "Editor/Include/ScriptCanvas/GraphCanvas/NodeDescriptorBus.h" #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp index 95386c7e55..716c498b56 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.cpp @@ -55,59 +55,6 @@ namespace ScriptCanvasEditor { - ////////////////////////////// - // AddSelectedEntitiesAction - ////////////////////////////// - - AddSelectedEntitiesAction::AddSelectedEntitiesAction(QObject* parent) - : GraphCanvas::ContextMenuAction("", parent) - { - } - - GraphCanvas::ActionGroupId AddSelectedEntitiesAction::GetActionGroupId() const - { - return AZ_CRC("EntityActionGroup", 0x17e16dfe); - } - - void AddSelectedEntitiesAction::RefreshAction(const GraphCanvas::GraphId&, const AZ::EntityId&) - { - AzToolsFramework::EntityIdList selectedEntities; - AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(selectedEntities, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - - setEnabled(!selectedEntities.empty()); - - if (selectedEntities.size() <= 1) - { - setText("Reference selected entity"); - } - else - { - setText("Reference selected entities"); - } - } - - GraphCanvas::ContextMenuAction::SceneReaction AddSelectedEntitiesAction::TriggerAction(const AZ::EntityId& graphCanvasGraphId, const AZ::Vector2& scenePos) - { - AzToolsFramework::EntityIdList selectedEntities; - AzToolsFramework::ToolsApplicationRequests::Bus::BroadcastResult(selectedEntities, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - - ScriptCanvas::ScriptCanvasId scriptCanvasId; - GeneralRequestBus::BroadcastResult(scriptCanvasId, &GeneralRequests::GetScriptCanvasId, graphCanvasGraphId); - - GraphCanvas::SceneRequestBus::Event(graphCanvasGraphId, &GraphCanvas::SceneRequests::ClearSelection); - - AZ::Vector2 addPosition = scenePos; - - for (const AZ::EntityId& id : selectedEntities) - { - NodeIdPair nodePair = Nodes::CreateEntityNode(id, scriptCanvasId); - GraphCanvas::SceneRequestBus::Event(graphCanvasGraphId, &GraphCanvas::SceneRequests::AddNode, nodePair.m_graphCanvasId, addPosition, false); - addPosition += AZ::Vector2(20, 20); - } - - return GraphCanvas::ContextMenuAction::SceneReaction::PostUndo; - } - //////////////////////////// // EndpointSelectionAction //////////////////////////// @@ -860,12 +807,6 @@ namespace ScriptCanvasEditor { const bool inContextMenu = true; Widget::ScriptCanvasNodePaletteConfig paletteConfig(paletteModel, assetModel, inContextMenu); - - m_addSelectedEntitiesAction = aznew AddSelectedEntitiesAction(this); - - AddActionGroup(m_addSelectedEntitiesAction->GetActionGroupId()); - AddMenuAction(m_addSelectedEntitiesAction); - AddNodePaletteMenuAction(paletteConfig); } @@ -905,8 +846,6 @@ namespace ScriptCanvasEditor m_graphCanvasConstructGroups.SetCommentsEnabled(false); m_nodeGroupPresets.SetEnabled(false); m_alignmentActionsGroups.SetEnabled(false); - - m_addSelectedEntitiesAction->setEnabled(false); } ////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h index 01029e0be1..116f9f4ced 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/ScriptCanvasContextMenus.h @@ -32,22 +32,6 @@ namespace ScriptCanvasEditor // CustomActions ////////////////// - class AddSelectedEntitiesAction - : public GraphCanvas::ContextMenuAction - { - Q_OBJECT - public: - AZ_CLASS_ALLOCATOR(AddSelectedEntitiesAction, AZ::SystemAllocator, 0); - - AddSelectedEntitiesAction(QObject* parent); - virtual ~AddSelectedEntitiesAction() = default; - - GraphCanvas::ActionGroupId GetActionGroupId() const override; - - void RefreshAction(const GraphCanvas::GraphId& graphCanvasGraphId, const AZ::EntityId& targetId) override; - SceneReaction TriggerAction(const GraphCanvas::GraphId& graphCanvasGraphId, const AZ::Vector2& scenePos) override; - }; - class EndpointSelectionAction : public QAction { @@ -217,8 +201,6 @@ namespace ScriptCanvasEditor protected: AZ::EntityId m_sourceSlotId; - - AddSelectedEntitiesAction* m_addSelectedEntitiesAction; }; class ConnectionContextMenu diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index 16edeaff5d..ad71378a26 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -95,7 +94,6 @@ namespace ScriptCanvas void Graph::Reflect(AZ::ReflectContext* context) { - Data::PropertyMetadata::Reflect(context); Data::Type::Reflect(context); Nodes::UnaryOperator::Reflect(context); Nodes::UnaryExpression::Reflect(context); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/ModifiableDatumView.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/ModifiableDatumView.h index 7786a1a136..a079a2932f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/ModifiableDatumView.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/ModifiableDatumView.h @@ -29,8 +29,7 @@ namespace ScriptCanvas friend class Node; friend class GraphVariable; - friend class PureData; - + public: AZ_CLASS_ALLOCATOR(ModifiableDatumView, AZ::SystemAllocator, 0); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index ca88c5179a..95fc23c5d5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -316,9 +316,6 @@ namespace ScriptCanvas #define SCRIPT_CANVAS_GENERICS_TO_VM(GenericClass, ReflectClass, BehaviorContext, CategoryName)\ GenericClass::Reflect(BehaviorContext, ScriptCanvas::Translation::Context::GetCategoryLibraryName(CategoryName).c_str()); -#define SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(GenericClass, BehaviorContext, CategoryName)\ - GenericClass::Reflect(BehaviorContext, ScriptCanvas::Translation::Context::GetCategoryLibraryName(CategoryName).c_str()); - template class RegistrarGeneric { @@ -335,13 +332,6 @@ namespace ScriptCanvas SCRIPT_CANVAS_CALL_ON_INDEX_SEQUENCE(nodes.push_back({ azrtti_typeid(), AZ::AzTypeInfo::Name() })); } - static void Reflect(AZ::BehaviorContext* behaviorContext, const char* libraryName) - { - auto reflection = behaviorContext->Class>(libraryName); - reflection->Attribute(AZ::ScriptCanvasAttributes::VariableCreationForbidden, AZ::AttributeIsValid::IfPresent)->Attribute(AZ::ScriptCanvasAttributes::Internal::ImplementedAsNodeGeneric, true); - SCRIPT_CANVAS_CALL_ON_INDEX_SEQUENCE(reflection->Method(t_Node::GetNodeFunctionName(), t_Node::GetFunction())->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List | AZ::Script::Attributes::ExcludeFlags::Documentation)); - } - template static void Reflect(AZ::BehaviorContext* behaviorContext, const char* libraryName) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp index 3c02099403..bd86696596 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.cpp @@ -99,8 +99,6 @@ namespace ScriptCanvas void Core::InitNodeRegistry(NodeRegistry& nodeRegistry) { using namespace ScriptCanvas::Nodes::Core; - AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); @@ -122,8 +120,6 @@ namespace ScriptCanvas AZStd::vector Core::GetComponentDescriptors() { return AZStd::vector({ - ScriptCanvas::Nodes::Core::Error::CreateDescriptor(), - ScriptCanvas::Nodes::Core::ErrorHandler::CreateDescriptor(), ScriptCanvas::Nodes::Core::Method::CreateDescriptor(), ScriptCanvas::Nodes::Core::MethodOverloaded::CreateDescriptor(), ScriptCanvas::Nodes::Core::Start::CreateDescriptor(), diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h index 567304ee37..f1c921b1ca 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/CoreNodes.h @@ -11,8 +11,6 @@ // shared code #include "EBusEventHandler.h" -#include "Error.h" -#include "ErrorHandler.h" #include "ExtractProperty.h" #include "FunctionDefinitionNode.h" #include "ForEach.h" diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.cpp deleted file mode 100644 index 1da9428e8f..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "Error.h" - -#include -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - void Error::OnInit() - { - { - ExecutionSlotConfiguration slotConfiguration("In", ConnectionType::Input); - AddSlot(slotConfiguration); - } - - { - DynamicDataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = "This"; - slotConfiguration.m_dynamicDataType = DynamicDataType::Any; - slotConfiguration.SetConnectionType(ConnectionType::Output); - - AddSlot(slotConfiguration); // \todo for testing only, we need to ability to arbitrarily connect nodes themeselve to slots (as input to function call or error handling) or directly (as the flow of execution with arrows if easier to read...) - } - - { - DataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = "Description"; - slotConfiguration.SetConnectionType(ConnectionType::Input); - slotConfiguration.ConfigureDatum(AZStd::move(Datum(AZStd::move(Data::Type::String()), Datum::eOriginality::Copy))); - - AddSlot(slotConfiguration); - } - } - - void Error::OnInputSignal(const SlotId&) - { - const Datum* input = FindDatum(GetSlotId("Description")); - if (const Data::StringType* desc = input ? input->GetAs() : nullptr) - { - SCRIPTCANVAS_REPORT_ERROR((*this), desc->data()); - } - else - { - // \todo get a more descriptive default error report - SCRIPTCANVAS_REPORT_ERROR((*this), "Undescribed error"); - } - } - - void Error::Reflect(AZ::ReflectContext* reflectContext) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Error", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Category, "Utilities/Debug") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Error.png") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) - ; - } - } - } - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.h deleted file mode 100644 index f9c91ad85b..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Error.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - class Error - : public Node - { - public: - AZ_COMPONENT(Error, "{C6928F30-87BA-4FFE-A3C0-B6096C161DD0}", Node); - - static void Reflect(AZ::ReflectContext* reflection); - - bool IsDeprecated() const override { return true; } - - protected: - void OnInit() override; - void OnInputSignal(const SlotId&) override; - }; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp deleted file mode 100644 index 06485f5e0a..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "ErrorHandler.h" - -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - const char* ErrorHandler::k_sourceName = "Source"; - - void ErrorHandler::OnInit() - { - { - ExecutionSlotConfiguration slotConfiguration("Out", ConnectionType::Output); - AddSlot(slotConfiguration); - } - - { - DynamicDataSlotConfiguration slotConfiguration; - - slotConfiguration.m_name = k_sourceName; - slotConfiguration.SetConnectionType(ConnectionType::Input); - - slotConfiguration.m_dynamicDataType = DynamicDataType::Any; - - // \todo split node abstractions into executable and !executable - AZStd::vector forbiddenTypes{ azrtti_typeid() }; - auto func = [forbiddenTypes]() { return aznew ContractRTTI(forbiddenTypes, ContractRTTI::Flags::Exclusive); }; - ContractDescriptor descriptor{ AZStd::move(func) }; - - slotConfiguration.m_contractDescs.emplace_back(descriptor); - - AddSlot(slotConfiguration); - } - } - - AZStd::vector> ErrorHandler::GetSources() const - { - return ModConnectedNodes(*GetSlot(GetSlotId(k_sourceName))); - } - - void ErrorHandler::Reflect(AZ::ReflectContext* reflectContext) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(0) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Error Handler", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Category, "Utilities/Debug") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/ErrorHandler.png") - ; - } - } - } - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.h deleted file mode 100644 index 3edd8c7d4b..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ErrorHandler.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - class ErrorHandler - : public Node - { - public: - AZ_COMPONENT(ErrorHandler, "{CF23B5A6-827C-4364-9714-EA99612D6CAE}", Node); - - static void Reflect(AZ::ReflectContext* reflection); - - AZStd::vector> GetSources() const; - - bool IsDeprecated() const override { return true; } - - protected: - static const char* k_sourceName; - void OnInit() override; - }; - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp index d55de9be45..914a8cea28 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp @@ -70,7 +70,7 @@ namespace ScriptCanvas } if (AZ::BehaviorContext* behaviorContext = azrtti_cast(reflection)) { - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(EntityNodes::Registrar, behaviorContext, EntityNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(EntityNodes::Registrar, Entity, behaviorContext, EntityNodes::k_categoryName); } ScriptCanvas::Entity::RotateMethod::Reflect(reflection); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h index e75191a4f6..ccc65027ed 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h @@ -12,6 +12,21 @@ #include #include +#define REFLECT_MATH_LIBRARY_TYPE(MathType, Guid)\ + struct MathType\ + {\ + AZ_TYPE_INFO(MathType, Guid);\ + static void Reflect(AZ::ReflectContext* reflection)\ + {\ + if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection))\ + {\ + serializeContext->Class()\ + ->Version(0)\ + ;\ + }\ + }\ + }; + namespace AZ { class ReflectContext; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp index b287453f0f..d018bf459d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp @@ -13,6 +13,26 @@ namespace ScriptCanvas { + namespace Nodes + { + namespace Math + { + REFLECT_MATH_LIBRARY_TYPE(AABB, "{AB0C2753-680E-47AD-8277-66B3AC01C659}"); + REFLECT_MATH_LIBRARY_TYPE(Color, "{6CC7B2F9-F551-4CB8-A713-4149959AE337}"); + REFLECT_MATH_LIBRARY_TYPE(CRC, "{D8B65A5B-38FF-4B41-9FA4-FCA080D75625}"); + REFLECT_MATH_LIBRARY_TYPE(Matrix3x3, "{8C5F6959-C2C4-46D9-9FCD-4DC234E7732D}"); + REFLECT_MATH_LIBRARY_TYPE(Matrix4x4, "{537AB179-E23C-492D-8EF7-53845A2DB163}"); + REFLECT_MATH_LIBRARY_TYPE(OBB, "{8CBDA3B7-9DCD-4A04-A12C-123C322CA63A}"); + REFLECT_MATH_LIBRARY_TYPE(Plane, "{F2C799DF-2CC1-4DD8-91DC-18C2D517BAB0}"); + REFLECT_MATH_LIBRARY_TYPE(Quaternion, "{9BE75E2E-AA07-4767-9BF3-905C289EB38A}"); + REFLECT_MATH_LIBRARY_TYPE(Random, "{D9DF1385-6C5C-4E41-94CA-8B10E9D8FAAF}"); + REFLECT_MATH_LIBRARY_TYPE(Transform, "{59E0EF87-352C-4CFB-A810-5B8752BDD1EF}"); + REFLECT_MATH_LIBRARY_TYPE(Vector2, "{FD1BFADF-BA1F-4AFC-819B-ABA1F22AE6E6}"); + REFLECT_MATH_LIBRARY_TYPE(Vector3, "{53EA7604-E3AE-4E88-BE0E-66CBC488A7DB}"); + REFLECT_MATH_LIBRARY_TYPE(Vector4, "{66027D7A-FCD1-4592-93E5-EB4B7F4BD671}"); + } + } + namespace Library { void Math::Reflect(AZ::ReflectContext* reflection) @@ -37,22 +57,20 @@ namespace ScriptCanvas if (AZ::BehaviorContext* behaviorContext = azrtti_cast(reflection)) { using namespace ScriptCanvas::Nodes::Math; - + SCRIPT_CANVAS_GENERICS_TO_VM(AABBNodes::Registrar, AABB, behaviorContext, AABBNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(ColorNodes::Registrar, Color, behaviorContext, ColorNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(CRCNodes::Registrar, CRC, behaviorContext, CRCNodes::k_categoryName); SCRIPT_CANVAS_GENERICS_TO_VM(MathNodes::Registrar, Math, behaviorContext, MathNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(Matrix3x3Nodes::Registrar, Matrix3x3, behaviorContext, Matrix3x3Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(Matrix4x4Nodes::Registrar, Matrix4x4, behaviorContext, Matrix4x4Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(OBBNodes::Registrar, OBB, behaviorContext, OBBNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(PlaneNodes::Registrar, Plane, behaviorContext, PlaneNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(QuaternionNodes::Registrar, Quaternion, behaviorContext, QuaternionNodes::k_categoryName); SCRIPT_CANVAS_GENERICS_TO_VM(RandomNodes::Registrar, Random, behaviorContext, RandomNodes::k_categoryName); - - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(AABBNodes::Registrar, behaviorContext, AABBNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(CRCNodes::Registrar, behaviorContext, CRCNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(ColorNodes::Registrar, behaviorContext, ColorNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Matrix3x3Nodes::Registrar, behaviorContext, Matrix3x3Nodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Matrix4x4Nodes::Registrar, behaviorContext, Matrix4x4Nodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(OBBNodes::Registrar, behaviorContext, OBBNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(PlaneNodes::Registrar, behaviorContext, PlaneNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(QuaternionNodes::Registrar, behaviorContext, QuaternionNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(TransformNodes::Registrar, behaviorContext, TransformNodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Vector2Nodes::Registrar, behaviorContext, Vector2Nodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Vector3Nodes::Registrar, behaviorContext, Vector3Nodes::k_categoryName); - SCRIPT_CANVAS_GENERICS_TO_VM_LIBRARY_ONLY(Vector4Nodes::Registrar, behaviorContext, Vector4Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(TransformNodes::Registrar, Transform, behaviorContext, TransformNodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(Vector2Nodes::Registrar, Vector2, behaviorContext, Vector2Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(Vector3Nodes::Registrar, Vector3, behaviorContext, Vector3Nodes::k_categoryName); + SCRIPT_CANVAS_GENERICS_TO_VM(Vector4Nodes::Registrar, Vector4, behaviorContext, Vector4Nodes::k_categoryName); } Nodes::Internal::ExpressionNodeBase::Reflect(reflection); diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index 8d5f43c3bc..3aff2357c0 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -258,10 +258,6 @@ set(FILES Include/ScriptCanvas/Libraries/Core/ExtractProperty.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/EventHandlerTranslationUtility.h Include/ScriptCanvas/Libraries/Core/EventHandlerTranslationUtility.cpp - Include/ScriptCanvas/Libraries/Core/Error.cpp - Include/ScriptCanvas/Libraries/Core/Error.h - Include/ScriptCanvas/Libraries/Core/ErrorHandler.cpp - Include/ScriptCanvas/Libraries/Core/ErrorHandler.h Include/ScriptCanvas/Libraries/Core/ForEach.cpp Include/ScriptCanvas/Libraries/Core/ForEach.h Include/ScriptCanvas/Libraries/Core/ForEach.ScriptCanvasGrammar.xml From 88c328c6e27d7bf844b4517a5230866a68116067 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Thu, 1 Jul 2021 17:50:56 -0700 Subject: [PATCH 05/67] The Great ScriptCanvas Purge, Part III Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Framework/ScriptCanvasTraceUtilities.h | 6 +++--- .../Code/Include/ScriptCanvas/Core/Graph.cpp | 21 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index de1a6de247..b3c4993063 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -173,13 +173,13 @@ namespace ScriptCanvasEditor { ScopedOutputSuppression([[maybe_unused]] bool suppressState = true) { -// AZ::Debug::TraceMessageBus::BroadcastResult(m_oldSuppression, &AZ::Debug::TraceMessageEvents::OnOutput, "", ""); -// TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, suppressState); + AZ::Debug::TraceMessageBus::BroadcastResult(m_oldSuppression, &AZ::Debug::TraceMessageEvents::OnOutput, "", ""); + TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, suppressState); } ~ScopedOutputSuppression() { - // TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, m_oldSuppression); + TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, m_oldSuppression); } private: bool m_oldSuppression = false; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index ad71378a26..6d367e5027 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -12,38 +12,34 @@ #include #include #include - #include #include #include - #include #include #include #include #include #include -#include - -#include +#include +#include #include -#include +#include #include - -#include +#include +#include #include #include #include #include -#include -#include #include #include - +#include +#include +#include #include #include -#include #include #include @@ -94,6 +90,7 @@ namespace ScriptCanvas void Graph::Reflect(AZ::ReflectContext* context) { + Data::PropertyMetadata::Reflect(context); Data::Type::Reflect(context); Nodes::UnaryOperator::Reflect(context); Nodes::UnaryExpression::Reflect(context); From 360236b89e157c07bd89f4bbadd71d4ebf2f0546 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 6 Jul 2021 13:13:16 -0700 Subject: [PATCH 06/67] The Great ScriptCanvas Purge, Part IV Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Code/Asset/EditorAssetConversionBus.h | 4 - .../Code/Asset/EditorAssetSystemComponent.cpp | 22 -- .../Code/Asset/EditorAssetSystemComponent.h | 3 - .../Builder/ScriptCanvasBuilderComponent.cpp | 6 +- .../Code/Builder/ScriptCanvasBuilderWorker.h | 6 +- .../ScriptCanvasBuilderWorkerUtility.cpp | 55 --- .../ScriptCanvasFunctionBuilderWorker.cpp | 338 ------------------ .../ScriptCanvasFunctionAssetHandler.cpp | 157 -------- .../ScriptCanvasFunctionAssetHolder.cpp | 201 ----------- .../ScriptCanvasFunctionAssetHolder.h | 75 ---- .../Assets/ScriptCanvasAssetHelpers.cpp | 1 - .../Editor/Assets/ScriptCanvasMemoryAsset.cpp | 26 -- .../Editor/Assets/ScriptCanvasMemoryAsset.h | 1 - .../Editor/Nodes/ScriptCanvasAssetNode.cpp | 5 - .../Code/Editor/Nodes/ScriptCanvasAssetNode.h | 1 - .../ScriptCanvasNodePaletteDockWidget.cpp | 2 +- .../VariablePanel/GraphVariablesTableView.cpp | 3 +- .../VariablePanel/SlotTypeSelectorWidget.cpp | 1 - .../VariablePanel/VariableDockWidget.cpp | 3 +- .../Functions/ScriptCanvasFunctionAsset.h | 145 -------- .../Code/Include/ScriptCanvas/Core/Graph.cpp | 3 +- .../Code/Include/ScriptCanvas/Core/Graph.h | 8 +- .../Code/Include/ScriptCanvas/Core/GraphBus.h | 46 ++- .../Code/Include/ScriptCanvas/Core/Node.cpp | 117 ++---- .../Code/Include/ScriptCanvas/Core/Node.h | 219 +----------- .../ScriptCanvas/Core/NodeFunctionGeneric.h | 9 - .../Include/ScriptCanvas/Core/SignalBus.h | 36 -- .../Code/Include/ScriptCanvas/Core/Slot.cpp | 14 +- .../Code/Include/ScriptCanvas/Core/Slot.h | 4 - .../ScriptCanvas/Core/SubgraphInterface.h | 10 - .../ScriptCanvas/Execution/RuntimeBus.h | 103 ------ .../Grammar/AbstractCodeModel.cpp | 11 - .../ScriptCanvas/Grammar/AbstractCodeModel.h | 18 - .../Grammar/FunctionsLegacySupport.cpp | 283 --------------- .../Grammar/FunctionsLegacySupport.h | 20 -- .../Grammar/PrimitivesDeclarations.h | 4 - .../Internal/Nodes/BaseTimerNode.cpp | 133 +------ .../Internal/Nodes/BaseTimerNode.h | 24 +- .../Internal/Nodes/ExpressionNodeBase.cpp | 31 -- .../Internal/Nodes/ExpressionNodeBase.h | 5 - .../Libraries/Comparison/EqualTo.h | 16 - .../Libraries/Comparison/Greater.h | 15 - .../Libraries/Comparison/GreaterEqual.h | 15 - .../ScriptCanvas/Libraries/Comparison/Less.h | 16 - .../Libraries/Comparison/LessEqual.h | 16 - .../Libraries/Comparison/NotEqualTo.h | 16 - .../Libraries/Core/BinaryOperator.cpp | 47 --- .../Libraries/Core/BinaryOperator.h | 23 +- .../Libraries/Core/EBusEventHandler.cpp | 151 -------- .../Libraries/Core/EBusEventHandler.h | 21 +- .../Libraries/Core/GetVariable.cpp | 48 +-- .../ScriptCanvas/Libraries/Core/GetVariable.h | 3 - .../Libraries/Core/MethodUtility.cpp | 99 ----- .../Libraries/Core/MethodUtility.h | 193 ---------- .../Libraries/Core/ReceiveScriptEvent.cpp | 232 +----------- .../Libraries/Core/ReceiveScriptEvent.h | 10 - .../ScriptCanvas/Libraries/Core/Repeater.cpp | 22 -- .../ScriptCanvas/Libraries/Core/Repeater.h | 8 +- .../Libraries/Core/ScriptEventBase.cpp | 2 - .../Libraries/Core/ScriptEventBase.h | 4 +- .../Libraries/Core/SendScriptEvent.cpp | 63 ---- .../Libraries/Core/SendScriptEvent.h | 4 - .../Libraries/Core/SetVariable.cpp | 50 +-- .../ScriptCanvas/Libraries/Core/SetVariable.h | 5 +- .../ScriptCanvas/Libraries/Core/Start.cpp | 25 -- .../ScriptCanvas/Libraries/Core/Start.h | 5 - .../ScriptCanvas/Libraries/Logic/And.h | 5 - .../ScriptCanvas/Libraries/Logic/Any.cpp | 6 - .../ScriptCanvas/Libraries/Logic/Any.h | 8 +- .../ScriptCanvas/Libraries/Logic/Cycle.cpp | 20 -- .../ScriptCanvas/Libraries/Logic/Cycle.h | 4 - .../ScriptCanvas/Libraries/Logic/Indexer.cpp | 37 -- .../ScriptCanvas/Libraries/Logic/Indexer.h | 8 - .../ScriptCanvas/Libraries/Logic/IsNull.cpp | 7 - .../ScriptCanvas/Libraries/Logic/IsNull.h | 5 - .../Libraries/Logic/Multiplexer.cpp | 42 --- .../Libraries/Logic/Multiplexer.h | 6 - .../Include/ScriptCanvas/Libraries/Logic/Or.h | 5 - .../Libraries/Logic/Sequencer.cpp | 44 --- .../ScriptCanvas/Libraries/Logic/Sequencer.h | 4 - .../Libraries/Logic/TargetedSequencer.cpp | 25 -- .../Libraries/Logic/TargetedSequencer.h | 1 - .../Logic/WeightedRandomSequencer.cpp | 57 --- .../Libraries/Logic/WeightedRandomSequencer.h | 8 +- .../ScriptCanvas/Libraries/Math/Divide.h | 15 - .../ScriptCanvas/Libraries/Math/Multiply.h | 6 - .../ScriptCanvas/Libraries/Math/Subtract.h | 6 - .../Include/ScriptCanvas/Libraries/Math/Sum.h | 6 - .../Operators/Containers/OperatorAt.cpp | 64 ---- .../Operators/Containers/OperatorAt.h | 3 - .../Operators/Containers/OperatorBack.cpp | 37 -- .../Operators/Containers/OperatorBack.h | 1 - .../Operators/Containers/OperatorClear.cpp | 30 -- .../Operators/Containers/OperatorClear.h | 4 - .../Operators/Containers/OperatorEmpty.cpp | 43 --- .../Operators/Containers/OperatorEmpty.h | 7 - .../Operators/Containers/OperatorErase.cpp | 41 --- .../Operators/Containers/OperatorErase.h | 2 - .../Operators/Containers/OperatorFront.cpp | 37 -- .../Operators/Containers/OperatorFront.h | 1 - .../Operators/Containers/OperatorInsert.cpp | 102 ------ .../Operators/Containers/OperatorInsert.h | 3 - .../Operators/Containers/OperatorPushBack.cpp | 67 ---- .../Operators/Containers/OperatorPushBack.h | 3 - .../Operators/Containers/OperatorSize.cpp | 36 -- .../Operators/Containers/OperatorSize.h | 3 - .../Operators/Math/OperatorArithmetic.cpp | 62 ---- .../Operators/Math/OperatorArithmetic.h | 3 +- .../Operators/Math/OperatorDivideByNumber.cpp | 92 ----- .../Operators/Math/OperatorDivideByNumber.h | 1 - .../Operators/Math/OperatorLength.cpp | 52 --- .../Libraries/Operators/Math/OperatorLength.h | 3 - .../Libraries/Operators/Math/OperatorLerp.cpp | 172 +-------- .../Libraries/Operators/Math/OperatorLerp.h | 90 +---- .../Libraries/Operators/Operator.h | 33 -- .../Libraries/String/.vs/ProjectSettings.json | 3 + .../String/.vs/String/v16/Browse.VC.db | Bin 0 -> 294912 bytes .../String/.vs/VSWorkspaceState.json | 6 + .../Libraries/String/.vs/slnx.sqlite | Bin 0 -> 90112 bytes .../Libraries/String/Contains.cpp | 26 -- .../ScriptCanvas/Libraries/String/Contains.h | 4 - .../ScriptCanvas/Libraries/String/Format.cpp | 15 +- .../ScriptCanvas/Libraries/String/Format.h | 6 +- .../ScriptCanvas/Libraries/String/Print.cpp | 39 -- .../ScriptCanvas/Libraries/String/Print.h | 8 +- .../ScriptCanvas/Libraries/String/Replace.cpp | 22 -- .../ScriptCanvas/Libraries/String/Replace.h | 5 - .../Libraries/String/Utilities.cpp | 93 ----- .../ScriptCanvas/Libraries/String/Utilities.h | 16 +- .../ScriptCanvas/Libraries/Time/Countdown.cpp | 141 -------- .../ScriptCanvas/Libraries/Time/Countdown.h | 25 -- .../ScriptCanvas/Libraries/Time/Duration.cpp | 42 --- .../ScriptCanvas/Libraries/Time/Duration.h | 9 - .../ScriptCanvas/Libraries/Time/HeartBeat.cpp | 16 - .../ScriptCanvas/Libraries/Time/HeartBeat.h | 3 - .../ScriptCanvas/Libraries/Time/Timer.cpp | 43 --- .../ScriptCanvas/Libraries/Time/Timer.h | 6 - .../Libraries/UnitTesting/AddFailure.cpp | 8 +- .../Libraries/UnitTesting/AddFailure.h | 3 - .../Libraries/UnitTesting/AddSuccess.cpp | 30 -- .../Libraries/UnitTesting/AddSuccess.h | 3 - .../Libraries/UnitTesting/Checkpoint.cpp | 28 -- .../Libraries/UnitTesting/Checkpoint.h | 3 - .../Libraries/UnitTesting/ExpectEqual.cpp | 34 -- .../Libraries/UnitTesting/ExpectEqual.h | 2 - .../Libraries/UnitTesting/ExpectFalse.cpp | 14 - .../Libraries/UnitTesting/ExpectFalse.h | 2 - .../UnitTesting/ExpectGreaterThan.cpp | 34 -- .../Libraries/UnitTesting/ExpectGreaterThan.h | 2 - .../UnitTesting/ExpectGreaterThanEqual.cpp | 34 -- .../UnitTesting/ExpectGreaterThanEqual.h | 2 - .../Libraries/UnitTesting/ExpectLessThan.cpp | 35 -- .../Libraries/UnitTesting/ExpectLessThan.h | 2 - .../UnitTesting/ExpectLessThanEqual.cpp | 34 -- .../UnitTesting/ExpectLessThanEqual.h | 2 - .../Libraries/UnitTesting/ExpectNotEqual.cpp | 34 -- .../Libraries/UnitTesting/ExpectNotEqual.h | 2 - .../Libraries/UnitTesting/ExpectTrue.cpp | 10 - .../Libraries/UnitTesting/ExpectTrue.h | 4 +- .../Libraries/UnitTesting/MarkComplete.cpp | 26 -- .../Libraries/UnitTesting/MarkComplete.h | 3 - .../ScriptCanvas/Variable/GraphVariable.cpp | 34 +- .../ScriptCanvas/Variable/GraphVariable.h | 4 +- .../Code/scriptcanvasgem_common_files.cmake | 12 - .../Framework/ScriptCanvasTestNodes.cpp | 112 ------ .../Source/Framework/ScriptCanvasTestNodes.h | 17 +- .../Framework/ScriptCanvasTestUtilities.h | 17 - .../Tests/ScriptCanvas_BehaviorContext.cpp | 139 ------- .../Code/Tests/ScriptCanvas_Core.cpp | 202 ----------- .../Tests/ScriptCanvas_RuntimeInterpreted.cpp | 178 --------- .../Code/Source/InputNode.cpp | 90 ----- .../Code/Source/InputNode.h | 21 +- .../Code/startingpointinput_files.cmake | 1 - 173 files changed, 131 insertions(+), 6154 deletions(-) delete mode 100644 Gems/ScriptCanvas/Code/Builder/ScriptCanvasFunctionBuilderWorker.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SignalBus.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeBus.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp create mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/ProjectSettings.json create mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/String/v16/Browse.VC.db create mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/VSWorkspaceState.json create mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/slnx.sqlite delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp delete mode 100644 Gems/StartingPointInput/Code/Source/InputNode.cpp diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h b/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h index 8e53db20b0..26badc528d 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetConversionBus.h @@ -19,7 +19,6 @@ namespace AZ namespace ScriptCanvas { - class ScriptCanvasFunctionAsset; class RuntimeAsset; class SubgraphInterfaceAsset; } @@ -27,7 +26,6 @@ namespace ScriptCanvas namespace ScriptCanvasEditor { class ScriptCanvasAsset; - class ScriptCanvasFunctionAsset; class EditorAssetConversionBusTraits : public AZ::EBusTraits @@ -36,10 +34,8 @@ namespace ScriptCanvasEditor static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; virtual AZ::Data::Asset LoadAsset(AZStd::string_view graphPath) = 0; - virtual AZ::Data::Asset LoadFunctionAsset(AZStd::string_view graphPath) = 0; virtual AZ::Outcome CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) = 0; virtual AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) = 0; - virtual AZ::Outcome, AZStd::string> CreateFunctionRuntimeAsset(const AZ::Data::Asset& editAsset) = 0; }; using EditorAssetConversionBus = AZ::EBus; diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp index 4b6b7227a4..97bba9b7e6 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp @@ -28,8 +28,6 @@ AZ_PUSH_DISABLE_WARNING(4251 4800 4244, "-Wunknown-warning-option") #include AZ_POP_DISABLE_WARNING -#include -#include #include namespace ScriptCanvasEditor @@ -77,7 +75,6 @@ namespace ScriptCanvasEditor void EditorAssetSystemComponent::Activate() { m_editorAssetRegistry.Register(); - m_editorAssetRegistry.Register(); m_editorAssetRegistry.Register(); AzToolsFramework::AssetBrowser::AssetBrowserInteractionNotificationBus::Handler::BusConnect(); @@ -131,30 +128,11 @@ namespace ScriptCanvasEditor } } - AZ::Data::Asset EditorAssetSystemComponent::LoadFunctionAsset(AZStd::string_view graphPath) - { - auto outcome = ScriptCanvasBuilder::LoadEditorFunctionAsset(graphPath); - - if (outcome.IsSuccess()) - { - return outcome.GetValue(); - } - else - { - return {}; - } - } - AZ::Outcome, AZStd::string> EditorAssetSystemComponent::CreateRuntimeAsset(const AZ::Data::Asset& editAsset) { return ScriptCanvasBuilder::CreateRuntimeAsset(editAsset); } - AZ::Outcome, AZStd::string> EditorAssetSystemComponent::CreateFunctionRuntimeAsset(const AZ::Data::Asset& editAsset) - { - return ScriptCanvasBuilder::CreateRuntimeFunctionAsset(editAsset); - } - AZ::Outcome EditorAssetSystemComponent::CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) { return ScriptCanvasBuilder::CreateLuaAsset(editAsset->GetScriptCanvasEntity(), editAsset->GetId(), graphPathForRawLuaFile); diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h index 0a8bf830af..4a55a35908 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.h @@ -22,7 +22,6 @@ namespace ScriptCanvasEditor { class ScriptCanvasAsset; - class ScriptCanvasFunctionAsset; class EditorAssetSystemComponent : public AZ::Component @@ -57,9 +56,7 @@ namespace ScriptCanvasEditor ////////////////////////////////////////////////////////////////////////// // EditorAssetConversionBus::Handler... AZ::Data::Asset LoadAsset(AZStd::string_view graphPath) override; - AZ::Data::Asset LoadFunctionAsset(AZStd::string_view graphPath) override; AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& editAsset) override; - AZ::Outcome, AZStd::string> CreateFunctionRuntimeAsset(const AZ::Data::Asset& editAsset) override; AZ::Outcome CreateLuaAsset(const AZ::Data::Asset& editAsset, AZStd::string_view graphPathForRawLuaFile) override; ////////////////////////////////////////////////////////////////////////// diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp index c3e5b03041..ea714f356f 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp @@ -13,10 +13,8 @@ #include #include #include -#include -#include +#include #include -#include #include #include @@ -50,7 +48,6 @@ namespace ScriptCanvasBuilder SharedHandlers HandleAssetTypes() { SharedHandlers handlers; - handlers.m_editorFunctionAssetHandler = RegisterHandler("scriptcanvas_fn", false); handlers.m_editorAssetHandler = RegisterHandler("scriptcanvas", false); handlers.m_subgraphInterfaceHandler = RegisterHandler("scriptcanvas_fn_compiled", true); handlers.m_runtimeAssetHandler = RegisterHandler("scriptcanvas_compiled", true); @@ -123,7 +120,6 @@ namespace ScriptCanvasBuilder builderDescriptor.m_productsToKeepOnFailure[s_scriptCanvasProcessJobKey] = { AZ_CRC("SubgraphInterface", 0xdfe6dc72) }; AssetBuilderSDK::AssetBuilderBus::Broadcast(&AssetBuilderSDK::AssetBuilderBus::Handler::RegisterBuilderInformation, builderDescriptor); ScriptCanvas::Grammar::RequestBus::Handler::BusConnect(); - AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::RegisterSourceAssetType, azrtti_typeid(), ScriptCanvasEditor::ScriptCanvasFunctionAsset::Description::GetFileFilter()); } m_sharedHandlers = HandleAssetTypes(); diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h index fa6ed17a3c..df432578d4 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h @@ -36,8 +36,8 @@ namespace ScriptCanvasEditor { class Graph; class ScriptCanvasAsset; - class ScriptCanvasFunctionAsset; } + namespace ScriptCanvasBuilder { constexpr const char* s_scriptCanvasBuilder = "ScriptCanvasBuilder"; @@ -122,8 +122,6 @@ namespace ScriptCanvasBuilder AZ::Outcome, AZStd::string> CreateRuntimeAsset(const AZ::Data::Asset& asset); - AZ::Outcome, AZStd::string> CreateRuntimeFunctionAsset(const AZ::Data::Asset& asset); - AZ::Outcome CompileGraphData(AZ::Entity* scriptCanvasEntity); AZ::Outcome CompileVariableData(AZ::Entity* scriptCanvasEntity); @@ -134,8 +132,6 @@ namespace ScriptCanvasBuilder AZ::Outcome, AZStd::string> LoadEditorAsset(AZStd::string_view graphPath, AZ::Data::AssetId assetId, AZ::Data::AssetFilterCB assetFilterCB = {}); - AZ::Outcome, AZStd::string> LoadEditorFunctionAsset(AZStd::string_view graphPath); - AZ::Outcome ParseGraph(AZ::Entity& buildEntity, AZStd::string_view graphPath); AZ::Outcome ProcessTranslationJob(ProcessTranslationJobInput& input); diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp index 94f09b4b9a..73d32ba16a 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp @@ -8,7 +8,6 @@ #include "precompiled.h" #include -#include #include #include #include @@ -160,18 +159,6 @@ namespace ScriptCanvasBuilder return AZ::Success(runtimeAsset); } - AZ::Outcome, AZStd::string> CreateRuntimeFunctionAsset(const AZ::Data::Asset& editAsset) - { - // Flush asset manager events to ensure no asset references are held by closures queued on Ebuses. - AZ::Data::AssetManager::Instance().DispatchEvents(); - - auto runtimeAssetId = editAsset.GetId(); - runtimeAssetId.m_subId = AZ_CRC("SubgraphInterface", 0xdfe6dc72); - AZ::Data::Asset runtimeAsset; - runtimeAsset.Create(runtimeAssetId); - return AZ::Success(runtimeAsset); - } - AZ::Outcome CompileGraphData(AZ::Entity* scriptCanvasEntity) { typedef AZStd::pair< ScriptCanvas::Node*, AZ::Entity* > NodeEntityPair; @@ -452,48 +439,6 @@ namespace ScriptCanvasBuilder return AZ::Success(asset); } - AZ::Outcome, AZStd::string> LoadEditorFunctionAsset(AZStd::string_view filePath) - { - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream stream(filePath.data(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - return AZ::Failure(AZStd::string::format("File failed to open: %s", filePath.data())); - } - AZStd::vector fileBuffer(stream.GetLength()); - size_t bytesRead = stream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != stream.GetLength()) - { - return AZ::Failure(AZStd::string::format("File failed to open: %s", filePath.data())); - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - AZ::IO::FileIOStream ioStream; - if (!ioStream.Open(filePath.data(), AZ::IO::OpenMode::ModeRead)) - { - return AZ::Failure(AZStd::string::format("File failed to open: %s", filePath.data())); - } - - ScriptCanvasEditor::ScriptCanvasFunctionAssetHandler editorAssetHandler; - - AZ::SerializeContext* context{}; - AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - AZ::Data::Asset asset; - asset.Create(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); - - if (editorAssetHandler.LoadAssetData(asset, assetDataStream, AZ::Data::AssetFilterCB{}) != AZ::Data::AssetHandler::LoadResult::LoadComplete) - { - return AZ::Failure(AZStd::string::format("Failed to load ScriptCavas Function asset: %s", filePath.data())); - } - - return AZ::Success(asset); - } - ScriptCanvasEditor::Graph* PrepareSourceGraph(AZ::Entity* const buildEntity) { auto sourceGraph = AZ::EntityUtils::FindFirstDerivedComponent(buildEntity); diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasFunctionBuilderWorker.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasFunctionBuilderWorker.cpp deleted file mode 100644 index 5ff5069141..0000000000 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasFunctionBuilderWorker.cpp +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "precompiled.h" - -#include "platform.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace ScriptCanvasBuilder -{ - void FunctionWorker::Activate(const AssetHandlers& handlers) - { - m_editorAssetHandler = handlers.m_editorFunctionAssetHandler; - m_runtimeAssetHandler = handlers.m_runtimeAssetHandler; - m_subgraphInterfaceHandler = handlers.m_subgraphInterfaceHandler; - } - - void FunctionWorker::CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) const - { - AZ_TracePrintf(s_scriptCanvasBuilder, "Start Creating Job"); - AZStd::string fullPath; - AzFramework::StringFunc::Path::ConstructFull(request.m_watchFolder.data(), request.m_sourceFile.data(), fullPath, false); - AzFramework::StringFunc::Path::Normalize(fullPath); - - if (!m_editorAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(CreateJobs for %s failed because the ScriptCanvas Editor Asset handler is missing.)", fullPath.data()); - } - - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream stream(fullPath.c_str(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be opened.", fullPath.data()); - return; - } - AZStd::vector fileBuffer(stream.GetLength()); - size_t bytesRead = stream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != stream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the source file could not be read.", fullPath.data()); - return; - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - m_sourceDependencies.clear(); - - auto assetFilter = [&response, this](const AZ::Data::AssetFilterInfo& filterInfo) - { - if (filterInfo.m_assetType == azrtti_typeid() || - filterInfo.m_assetType == azrtti_typeid() || - filterInfo.m_assetType == azrtti_typeid() || - filterInfo.m_assetType == azrtti_typeid()) // this required, since nodes reference this, rather than the editor asset - { - AssetBuilderSDK::SourceFileDependency dependency; - dependency.m_sourceFileDependencyUUID = filterInfo.m_assetId.m_guid; - - response.m_sourceFileDependencyList.push_back(dependency); - } - - // Asset filter always returns false to prevent parsing dependencies, but makes note of the script canvas dependencies - return false; - }; - - AZ::Data::Asset asset; - asset.Create(AZ::Data::AssetId(AZ::Uuid::CreateRandom())); - ScriptCanvasEditor::ScriptCanvasFunctionAssetHandler* functionAssetHandler = azrtti_cast(m_editorAssetHandler); - if (functionAssetHandler->LoadAssetData(asset, assetDataStream, assetFilter) != AZ::Data::AssetHandler::LoadResult::LoadComplete) - { - AZ_Warning(s_scriptCanvasBuilder, false, "CreateJobs for \"%s\" failed because the asset data could not be loaded from the file", fullPath.data()); - return; - } - - // Flush asset database events to ensure no asset references are held by closures queued on Ebuses. - AZ::Data::AssetManager::Instance().DispatchEvents(); - - auto* scriptCanvasEntity = asset.Get()->GetScriptCanvasEntity(); - auto* sourceGraph = AZ::EntityUtils::FindFirstDerivedComponent(scriptCanvasEntity); - AZ_Assert(sourceGraph, "Graph component is missing from entity."); - size_t fingerprint = 0; - const AZStd::set sortedEntities(sourceGraph->GetGraphData()->m_nodes.begin(), sourceGraph->GetGraphData()->m_nodes.end()); - for (auto& nodeEntity : sortedEntities) - { - if (auto nodeComponent = AZ::EntityUtils::FindFirstDerivedComponent(nodeEntity)) - { - AZStd::hash_combine(fingerprint, nodeComponent->GenerateFingerprint()); - } - } - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - for (const AssetBuilderSDK::PlatformInfo& info : request.m_enabledPlatforms) - { - if (info.HasTag("tools")) - { - AssetBuilderSDK::JobDescriptor copyDescriptor; - copyDescriptor.m_priority = 2; - copyDescriptor.m_critical = true; - copyDescriptor.m_jobKey = s_scriptCanvasCopyJobKey; - copyDescriptor.SetPlatformIdentifier(info.m_identifier.c_str()); - copyDescriptor.m_additionalFingerprintInfo = AZStd::string(GetFingerprintString()).append("|").append(AZStd::to_string(static_cast(fingerprint))); - response.m_createJobOutputs.push_back(copyDescriptor); - } - - AssetBuilderSDK::JobDescriptor jobDescriptor; - jobDescriptor.m_priority = 2; - jobDescriptor.m_critical = true; - jobDescriptor.m_jobKey = s_scriptCanvasProcessJobKey; - jobDescriptor.SetPlatformIdentifier(info.m_identifier.c_str()); - jobDescriptor.m_additionalFingerprintInfo = AZStd::string(GetFingerprintString()).append("|").append(AZStd::to_string(static_cast(fingerprint))); - // Function process job needs to wait until its dependency asset job finished - for (const auto& sourceDependency : response.m_sourceFileDependencyList) - { - AssetBuilderSDK::JobDependency jobDep(s_scriptCanvasBuilder, info.m_identifier.c_str(), AssetBuilderSDK::JobDependencyType::OrderOnce, sourceDependency); - jobDescriptor.m_jobDependencyList.emplace_back(jobDep); - } - response.m_createJobOutputs.push_back(jobDescriptor); - } -#endif - - response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; - AZ_TracePrintf(s_scriptCanvasBuilder, "Finish Creating Job"); - } - - - - const char* FunctionWorker::GetFingerprintString() const - { - if (m_fingerprintString.empty()) - { - // compute it the first time - const AZStd::string runtimeAssetTypeId = azrtti_typeid().ToString(); - m_fingerprintString = AZStd::string::format("%i%s", GetVersionNumber(), runtimeAssetTypeId.c_str()); - } - return m_fingerprintString.c_str(); - } - - int FunctionWorker::GetVersionNumber() const - { - return GetBuilderVersion(); - } - - AZ::Uuid FunctionWorker::GetUUID() - { - return AZ::Uuid::CreateString("{7227E0E1-4113-456A-877B-B2276ACB292B}"); - } - - - void FunctionWorker::ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) const - { - AZ_TracePrintf(s_scriptCanvasBuilder, "Start Processing Job"); - // A runtime script canvas component is generated, which creates a .scriptcanvas_compiled file - AZStd::string fullPath; - AZStd::string fileNameOnly; - AzFramework::StringFunc::Path::GetFullFileName(request.m_sourceFile.c_str(), fileNameOnly); - fullPath = request.m_fullPath.c_str(); - AzFramework::StringFunc::Path::Normalize(fullPath); - - bool pathFound = false; - AZStd::string relativePath; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult - ( pathFound - , &AzToolsFramework::AssetSystem::AssetSystemRequest::GetRelativeProductPathFromFullSourceOrProductPath - , request.m_fullPath.c_str(), relativePath); - - if (!pathFound) - { - AZ_Error(s_scriptCanvasBuilder, false, "Failed to get engine relative path from %s", request.m_fullPath.c_str()); - return; - } - - if (!m_editorAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(Exporting of .scriptcanvas for "%s" file failed as no editor asset handler was registered for script canvas. The ScriptCanvas Gem might not be enabled.)", fullPath.data()); - return; - } - - if (!m_runtimeAssetHandler) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(Exporting of .scriptcanvas for "%s" file failed as no runtime asset handler was registered for script canvas.)", fullPath.data()); - return; - } - - AZStd::shared_ptr assetDataStream = AZStd::make_shared(); - - // Read the asset into a memory buffer, then hand ownership of the buffer to assetDataStream - { - AZ::IO::FileIOStream stream(fullPath.data(), AZ::IO::OpenMode::ModeRead); - if (!AZ::IO::RetryOpenStream(stream)) - { - AZ_Warning(s_scriptCanvasBuilder, false, "Exporting of .scriptcanvas for \"%s\" failed because the source file could not be opened.", fullPath.c_str()); - return; - } - AZStd::vector fileBuffer(stream.GetLength()); - size_t bytesRead = stream.Read(fileBuffer.size(), fileBuffer.data()); - if (bytesRead != stream.GetLength()) - { - AZ_Warning(s_scriptCanvasBuilder, false, "Exporting of .scriptcanvas for \"%s\" failed because the source file could not be opened.", fullPath.c_str()); - return; - } - - assetDataStream->Open(AZStd::move(fileBuffer)); - } - - AZ::SerializeContext* context{}; - AZ::ComponentApplicationBus::BroadcastResult(context, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - - AZ::Data::Asset asset; - asset.Create(request.m_sourceFileUUID); - ScriptCanvasEditor::ScriptCanvasFunctionAssetHandler* functionAssetHandler = azrtti_cast(m_editorAssetHandler); - if (functionAssetHandler->LoadAssetData(asset, assetDataStream, nullptr) != AZ::Data::AssetHandler::LoadResult::LoadComplete) - { - AZ_Error(s_scriptCanvasBuilder, false, R"(Loading of ScriptCanvas asset for source file "%s" has failed)", fullPath.data()); - return; - } - - // Flush asset manager events to ensure no asset references are held by closures queued on Ebuses. - AZ::Data::AssetManager::Instance().DispatchEvents(); - - AZStd::string runtimeScriptCanvasOutputPath; - AzFramework::StringFunc::Path::Join(request.m_tempDirPath.c_str(), fileNameOnly.c_str(), runtimeScriptCanvasOutputPath, true, true); - AzFramework::StringFunc::Path::ReplaceExtension(runtimeScriptCanvasOutputPath, ScriptCanvas::SubgraphInterfaceAsset::GetFileExtension()); - - if (request.m_jobDescription.m_jobKey == s_scriptCanvasCopyJobKey) - { - // ScriptCanvas Editor Asset Copy job - // The SubID is zero as this represents the main asset - AssetBuilderSDK::JobProduct jobProduct; - jobProduct.m_productFileName = fullPath; - jobProduct.m_productAssetType = azrtti_typeid(); - jobProduct.m_productSubID = 0; - jobProduct.m_dependenciesHandled = true; - response.m_outputProducts.push_back(AZStd::move(jobProduct)); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else - { - // force load all dependencies into memory - for (auto& dependency : m_sourceDependencies) - { - AZ::Data::AssetManager::Instance().GetAsset(dependency.GetId(), dependency.GetType(), AZ::Data::AssetLoadBehavior::PreLoad); - } - - AZ::Entity* buildEntity = asset.Get()->GetScriptCanvasEntity(); - - ProcessTranslationJobInput input; - input.assetID = AZ::Data::AssetId(request.m_sourceFileUUID, AZ_CRC("RuntimeData", 0x163310ae)); - input.request = &request; - input.response = &response; - input.runtimeScriptCanvasOutputPath = runtimeScriptCanvasOutputPath; - input.assetHandler = m_runtimeAssetHandler; - input.buildEntity = buildEntity; - input.fullPath = fullPath; - input.fileNameOnly = fileNameOnly; - input.namespacePath = relativePath; - input.saveRawLua = true; - - auto translationOutcome = ProcessTranslationJob(input); - if (translationOutcome.IsSuccess()) - { - AzFramework::StringFunc::Path::ReplaceExtension(input.runtimeScriptCanvasOutputPath, ScriptCanvas::RuntimeAsset::GetFileExtension()); - auto saveRuntimAssetOutcome = SaveRuntimeAsset(input, input.runtimeDataOut); - if (saveRuntimAssetOutcome.IsSuccess()) - { - // \todo this file is only required on PC editor builds, cull it in packaging, here or wherever appropriate - AzFramework::StringFunc::Path::StripExtension(fileNameOnly); - - ScriptCanvas::SubgraphInterfaceData functionInterface; - functionInterface.m_name = fileNameOnly; - functionInterface.m_interface = AZStd::move(input.interfaceOut); - - // save function interface - input.assetHandler = m_subgraphInterfaceHandler; - - AzFramework::StringFunc::Path::ReplaceExtension(input.runtimeScriptCanvasOutputPath, ScriptCanvas::SubgraphInterfaceAsset::GetFileExtension()); - auto saveInterfaceOutcome = SaveSubgraphInterface(input, functionInterface); - if (saveInterfaceOutcome.IsSuccess()) - { - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else - { - AZ_Error(s_scriptCanvasBuilder, false, saveInterfaceOutcome.GetError().data()); - } - } - else - { - AZ_Error(s_scriptCanvasBuilder, false, saveRuntimAssetOutcome.GetError().data()); - } - } - else if (AzFramework::StringFunc::Find(translationOutcome.GetError().data(), ScriptCanvas::ParseErrors::SourceUpdateRequired) != AZStd::string::npos) - { - AZ_Warning(s_scriptCanvasBuilder, false, ScriptCanvas::ParseErrors::SourceUpdateRequired); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else if (AzFramework::StringFunc::Find(fileNameOnly, s_unitTestParseErrorPrefix) != AZStd::string::npos) - { - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - } - else - { - AZ_Warning(s_scriptCanvasBuilder, false, translationOutcome.GetError().data()); - } - } - - AZ_TracePrintf(s_scriptCanvasBuilder, "Finish Processing Job"); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp deleted file mode 100644 index 9f50f32cf5..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "precompiled.h" - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace ScriptCanvasEditor -{ - ScriptCanvasFunctionAssetHandler::ScriptCanvasFunctionAssetHandler(AZ::SerializeContext* context) - : ScriptCanvasAssetHandler(context) - { - AZ::AssetTypeInfoBus::MultiHandler::BusConnect(azrtti_typeid()); - } - - ScriptCanvasFunctionAssetHandler::~ScriptCanvasFunctionAssetHandler() - { - AZ::AssetTypeInfoBus::MultiHandler::BusDisconnect(); - } - - AZ::Data::AssetPtr ScriptCanvasFunctionAssetHandler::CreateAsset(const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) - { - AZ_UNUSED(type); - - ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData = aznew ScriptCanvasEditor::ScriptCanvasFunctionAsset(id); - - AZ::Entity* scriptCanvasEntity = aznew AZ::Entity(ScriptCanvas::AssetDescription::GetEntityName()); - SystemRequestBus::Broadcast(&SystemRequests::CreateEditorComponentsOnEntity, scriptCanvasEntity, azrtti_typeid()); - assetData->m_cachedComponent = scriptCanvasEntity->CreateComponent(); - - assetData->SetScriptCanvasEntity(scriptCanvasEntity); - - return assetData; - } - - AZ::Data::AssetHandler::LoadResult ScriptCanvasFunctionAssetHandler::LoadAssetData( - const AZ::Data::Asset& asset, - AZStd::shared_ptr stream, - const AZ::Data::AssetFilterCB& assetLoadFilterCB) - { - ScriptCanvasEditor::ScriptCanvasFunctionAsset* scriptCanvasAsset = asset.GetAs(); - AZ_Assert(m_serializeContext, "ScriptCanvasFunctionAssetHandler needs to be initialized with a SerializeContext"); - - if (scriptCanvasAsset) - { - stream->Seek(0U, AZ::IO::GenericStream::ST_SEEK_BEGIN); - - bool loadSuccess = AZ::Utils::LoadObjectFromStreamInPlace(*stream, scriptCanvasAsset->GetScriptCanvasData(), m_serializeContext, AZ::ObjectStream::FilterDescriptor(assetLoadFilterCB, AZ::ObjectStream::FILTERFLAG_IGNORE_UNKNOWN_CLASSES)); - if (loadSuccess) - { - scriptCanvasAsset->m_cachedComponent = scriptCanvasAsset->GetScriptCanvasData().GetScriptCanvasEntity()->FindComponent(); - } - - return loadSuccess ? AZ::Data::AssetHandler::LoadResult::LoadComplete : AZ::Data::AssetHandler::LoadResult::Error; - } - return AZ::Data::AssetHandler::LoadResult::Error; - } - - bool ScriptCanvasFunctionAssetHandler::SaveAssetData(const AZ::Data::Asset& asset, AZ::IO::GenericStream* stream) - { - return SaveAssetData(asset.GetAs(), stream); - } - - bool ScriptCanvasFunctionAssetHandler::SaveAssetData(const ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData, AZ::IO::GenericStream* stream) - { - return SaveAssetData(assetData, stream, AZ::DataStream::ST_XML); - } - - bool ScriptCanvasFunctionAssetHandler::SaveAssetData(const ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData, AZ::IO::GenericStream* stream, AZ::DataStream::StreamType streamType) - { - if (assetData && m_serializeContext) - { - AZStd::vector byteBuffer; - AZ::IO::ByteContainerStream byteStream(&byteBuffer); - AZ::ObjectStream* objStream = AZ::ObjectStream::Create(&byteStream, *m_serializeContext, streamType); - - const ScriptCanvas::ScriptCanvasData& functionData = assetData->GetScriptCanvasData(); - bool assetSaved = objStream->WriteClass(&functionData); - objStream->Finalize(); - assetSaved = stream->Write(byteBuffer.size(), byteBuffer.data()) == byteBuffer.size() && assetSaved; - return assetSaved; - } - - return false; - } - - AZ::Data::AssetType ScriptCanvasFunctionAssetHandler::GetAssetType() const - { - return ScriptCanvasFunctionAssetHandler::GetAssetTypeStatic(); - } - - const char* ScriptCanvasFunctionAssetHandler::GetAssetTypeDisplayName() const - { - return ScriptCanvas::AssetDescription::GetAssetTypeDisplayName(); - } - - bool ScriptCanvasFunctionAssetHandler::CanCreateComponent([[maybe_unused]] const AZ::Data::AssetId& assetId) const - { - return false; - } - - void ScriptCanvasFunctionAssetHandler::GetAssetTypeExtensions(AZStd::vector& extensions) - { - const AZ::Uuid& assetType = *AZ::AssetTypeInfoBus::GetCurrentBusId(); - if (assetType == AZ::AzTypeInfo::Uuid()) - { - extensions.push_back(ScriptCanvas::AssetDescription::GetExtension()); - } - } - - void ScriptCanvasFunctionAssetHandler::GetHandledAssetTypes(AZStd::vector& assetTypes) - { - assetTypes.push_back(AZ::AzTypeInfo::Uuid()); - } - - - AZ::Data::AssetType ScriptCanvasFunctionAssetHandler::GetAssetTypeStatic() - { - return azrtti_typeid(); - } - - const char* ScriptCanvasFunctionAssetHandler::GetGroup() const - { - return ScriptCanvas::AssetDescription::GetGroup(); - } - - const char* ScriptCanvasFunctionAssetHandler::GetBrowserIcon() const - { - return ScriptCanvas::AssetDescription::GetIconPath(); - } - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.cpp deleted file mode 100644 index a3559f0123..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.cpp +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "precompiled.h" - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -namespace ScriptCanvasEditor -{ - //========================================================================= - void ScriptCanvasFunctionAssetHolder::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1) - ->Field("m_asset", &ScriptCanvasFunctionAssetHolder::m_scriptCanvasAssetId) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("Script Canvas", "Script Canvas Function Asset Holder") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->DataElement(AZ::Edit::UIHandlers::Default, &ScriptCanvasFunctionAssetHolder::m_scriptCanvasAssetId, "Script Canvas Function Asset", "Script Canvas asset associated with this component") - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &ScriptCanvasFunctionAssetHolder::OnScriptChanged) - ->Attribute("EditButton", "Editor/Icons/PropertyEditor/open_in.png") - ->Attribute("EditDescription", "Open in Script Canvas Editor") - ->Attribute("EditCallback", &ScriptCanvasFunctionAssetHolder::LaunchScriptCanvasEditor) - ; - } - } - } - - ScriptCanvasFunctionAssetHolder::ScriptCanvasFunctionAssetHolder(AZ::Data::AssetId assetId, const ScriptChangedCB& scriptChangedCB) - : m_scriptCanvasAssetId(assetId) - , m_scriptNotifyCallback(scriptChangedCB) - { - } - - ScriptCanvasFunctionAssetHolder::~ScriptCanvasFunctionAssetHolder() - { - AZ::Data::AssetBus::Handler::BusDisconnect(); - } - - void ScriptCanvasFunctionAssetHolder::Init(AZ::EntityId ownerId) - { - m_ownerId = ownerId; - - if (m_scriptCanvasAssetId.IsValid()) - { - AZ::Data::AssetBus::Handler::BusDisconnect(); - AZ::Data::AssetBus::Handler::BusConnect(m_scriptCanvasAssetId); - } - } - - void ScriptCanvasFunctionAssetHolder::LaunchScriptCanvasEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&) const - { - OpenEditor(); - } - - void ScriptCanvasFunctionAssetHolder::OpenEditor() const - { - AzToolsFramework::OpenViewPane(LyViewPane::ScriptCanvas); - - AZ::Outcome openOutcome = AZ::Failure(AZStd::string()); - - if (m_scriptCanvasAssetId.IsValid()) - { - GeneralRequestBus::BroadcastResult(openOutcome, &GeneralRequests::OpenScriptCanvasAsset, m_scriptCanvasAssetId, -1); - - if (!openOutcome) - { - AZ_Warning("Script Canvas", openOutcome, "%s", openOutcome.GetError().data()); - } - } - else if (m_ownerId.IsValid()) - { - AzToolsFramework::EntityIdList selectedEntityIds; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(selectedEntityIds, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities); - - // Going to bypass the multiple selected entities flow for right now. - if (selectedEntityIds.size() == 1) - { - GeneralRequestBus::Broadcast(&GeneralRequests::CreateScriptCanvasAssetFor, m_ownerId); - } - } - } - - AZ::EntityId ScriptCanvasFunctionAssetHolder::GetGraphId() const - { - AZ::EntityId graphId; - if (m_scriptCanvasAsset.IsReady()) - { - ScriptCanvas::SystemRequestBus::BroadcastResult(graphId, &ScriptCanvas::SystemRequests::FindGraphId, m_scriptCanvasAsset.Get()->GetScriptCanvasEntity()); - } - return graphId; - } - - void ScriptCanvasFunctionAssetHolder::SetScriptChangedCB(const ScriptChangedCB& scriptChangedCB) - { - m_scriptNotifyCallback = scriptChangedCB; - } - - void ScriptCanvasFunctionAssetHolder::Load(bool loadBlocking) - { - if (!m_scriptCanvasAsset.IsReady()) - { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, m_scriptCanvasAsset.GetId()); - if (assetInfo.m_assetId.IsValid()) - { - const AZ::Data::AssetType assetTypeId = azrtti_typeid(); - auto& assetManager = AZ::Data::AssetManager::Instance(); - m_scriptCanvasAsset = assetManager.GetAsset(m_scriptCanvasAsset.GetId(), azrtti_typeid(), true, nullptr, loadBlocking); - } - } - } - - AZ::u32 ScriptCanvasFunctionAssetHolder::OnScriptChanged() - { - SetAsset(m_scriptCanvasAsset.GetId()); - Load(false); - - if (m_scriptNotifyCallback) - { - m_scriptNotifyCallback(m_scriptCanvasAsset); - } - return AZ::Edit::PropertyRefreshLevels::EntireTree; - } - - void ScriptCanvasFunctionAssetHolder::OnAssetReady(AZ::Data::Asset asset) - { - SetAsset(asset.GetId()); - EditorScriptCanvasAssetNotificationBus::Event(m_scriptCanvasAsset.GetId(), &EditorScriptCanvasAssetNotifications::OnScriptCanvasAssetReady, m_scriptCanvasAsset); - } - - void ScriptCanvasFunctionAssetHolder::OnAssetReloaded(AZ::Data::Asset asset) - { - SetAsset(asset.GetId()); - EditorScriptCanvasAssetNotificationBus::Event(m_scriptCanvasAsset.GetId(), &EditorScriptCanvasAssetNotifications::OnScriptCanvasAssetReloaded, m_scriptCanvasAsset); - } - - void ScriptCanvasFunctionAssetHolder::OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType) - { - EditorScriptCanvasAssetNotificationBus::Event(assetId, &EditorScriptCanvasAssetNotifications::OnScriptCanvasAssetUnloaded, assetId); - } - - void ScriptCanvasFunctionAssetHolder::OnAssetSaved(AZ::Data::Asset asset, bool isSuccessful) - { - SetAsset(asset.GetId()); - auto currentBusId = AZ::Data::AssetBus::GetCurrentBusId(); - if (currentBusId) - { - EditorScriptCanvasAssetNotificationBus::Event(*currentBusId, &EditorScriptCanvasAssetNotifications::OnScriptCanvasAssetSaved, asset.GetId()); - } - } - - void ScriptCanvasFunctionAssetHolder::SetAsset(AZ::Data::AssetId assetId) - { - m_scriptCanvasAssetId = assetId; - - if (!AZ::Data::AssetBus::Handler::BusIsConnectedId(m_scriptCanvasAssetId)) - { - AZ::Data::AssetBus::Handler::BusDisconnect(); - if (m_scriptCanvasAssetId.IsValid()) - { - AZ::Data::AssetBus::Handler::BusConnect(m_scriptCanvasAssetId); - } - } - } - - //AZ::Data::Asset ScriptCanvasFunctionAssetHolder::GetAsset() const - //{ - // return m_scriptCanvasAsset; - //} - - AZ::Data::AssetId ScriptCanvasFunctionAssetHolder::GetAssetId() const - { - return m_scriptCanvasAssetId; - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.h b/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.h deleted file mode 100644 index 1cde981e0d..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/Functions/ScriptCanvasFunctionAssetHolder.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include - -namespace ScriptCanvas -{ - class ScriptCanvasFunctionAsset; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasFunctionAsset; - - /*! ScriptCanvasAssetHolder - Wraps a ScriptCanvasAsset reference and registers for the individual AssetBus events - for saving, loading and unloading the asset. - The ScriptCanvasAsset Holder contains functionality for activating the ScriptCanvasEntity stored on the reference asset - as well as attempting to open the ScriptCanvasAsset within the ScriptCanvas Editor. - It also provides the EditContext reflection for opening the asset in the ScriptCanvas Editor via a button - */ - class ScriptCanvasFunctionAssetHolder - : private AZ::Data::AssetBus::Handler - { - public: - AZ_RTTI(ScriptCanvasFunctionAssetHolder, "{21693AFA-5664-4AAE-9213-8B944A398BA1}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasFunctionAssetHolder, AZ::SystemAllocator, 0); - - using ScriptChangedCB = AZStd::function&)>; - - ScriptCanvasFunctionAssetHolder() = default; - ScriptCanvasFunctionAssetHolder(AZ::Data::AssetId assetId, const ScriptChangedCB& = {}); - ~ScriptCanvasFunctionAssetHolder() override; - - static void Reflect(AZ::ReflectContext* context); - void Init(AZ::EntityId ownerId = AZ::EntityId()); - - void SetAsset(AZ::Data::AssetId assetId); - AZ::Data::AssetId GetAssetId() const; - - AZ::EntityId GetGraphId() const; - - void LaunchScriptCanvasEditor(const AZ::Data::AssetId&, const AZ::Data::AssetType&) const; - void OpenEditor() const; - - void SetScriptChangedCB(const ScriptChangedCB&); - void Load(bool loadBlocking = false); - - protected: - - //===================================================================== - // AZ::Data::AssetBus - void OnAssetReady(AZ::Data::Asset asset) override; - void OnAssetReloaded(AZ::Data::Asset asset) override; - void OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType assetType) override; - void OnAssetSaved(AZ::Data::Asset asset, bool isSuccessful) override; - //===================================================================== - - //! Reloads the Script From the AssetData if it has changed - AZ::u32 OnScriptChanged(); - AZ::Data::AssetId m_scriptCanvasAssetId; - AZ::Data::Asset m_scriptCanvasAsset; - - AZ::EntityId m_ownerId; // Id of Entity which stores this AssetHolder object - ScriptChangedCB m_scriptNotifyCallback; - }; - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp index 247a38f58a..caec55e9fe 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp @@ -8,7 +8,6 @@ #include #include -#include #include namespace ScriptCanvasEditor diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp index 3304ad7987..c973034fa1 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.cpp @@ -80,11 +80,6 @@ namespace ScriptCanvasEditor AZ::Data::Asset newAsset = Clone(); memoryAsset.m_inMemoryAsset = newAsset; } - else if (m_assetType == azrtti_typeid()) - { - AZ::Data::Asset newAsset = Clone(); - memoryAsset.m_inMemoryAsset = newAsset; - } else { AZ_Assert(false, "Unsupported Script Canvas Asset Type"); @@ -107,10 +102,6 @@ namespace ScriptCanvasEditor { asset = assetHandler->CreateAsset(assetId, azrtti_typeid()); } - else if (assetType == azrtti_typeid()) - { - asset = assetHandler->CreateAsset(assetId, azrtti_typeid()); - } m_inMemoryAsset = AZ::Data::Asset(asset, AZ::Data::AssetLoadBehavior::PreLoad); @@ -155,8 +146,6 @@ namespace ScriptCanvasEditor streamInfo.m_streamFlags = AZ::IO::OpenMode::ModeWrite; streamInfo.m_streamName = m_saveAsPath; - ScriptCanvasEditor::ScriptCanvasDataRequestBus::Event(GetScriptCanvasId(), &ScriptCanvasEditor::ScriptCanvasDataRequests::SetPrettyName, GetTabName().c_str()); - if (!streamInfo.IsValid()) { return; @@ -223,10 +212,6 @@ namespace ScriptCanvasEditor { m_inMemoryAsset = AZ::Data::AssetManager::Instance().GetAsset(assetId, AZ::Data::AssetLoadBehavior::Default); } - else if (assetInfo.m_assetType == azrtti_typeid()) - { - m_inMemoryAsset = AZ::Data::AssetManager::Instance().GetAsset(assetId, AZ::Data::AssetLoadBehavior::Default); - } if (m_inMemoryAsset) { @@ -290,15 +275,8 @@ namespace ScriptCanvasEditor return; } - if (m_assetType == azrtti_typeid()) - { - editorGraph->MarkFunctionGraph(); - } - m_scriptCanvasId = editorGraph->GetScriptCanvasId(); - ScriptCanvasEditor::ScriptCanvasDataRequestBus::Event(m_scriptCanvasId, &ScriptCanvasEditor::ScriptCanvasDataRequests::SetPrettyName, GetTabName().c_str()); - EditorGraphNotificationBus::Handler::BusDisconnect(); EditorGraphNotificationBus::Handler::BusConnect(m_scriptCanvasId); @@ -538,10 +516,6 @@ namespace ScriptCanvasEditor { return CloneAssetData(newAssetId); } - else if (m_assetType == azrtti_typeid()) - { - return CloneAssetData(newAssetId); - } AZ_Assert(false, "The provides asset type is not supported as a valid Script Canvas memory asset"); return AZ::Data::Asset(); diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h index 8f44a7f4b8..4449bcb62a 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasMemoryAsset.h @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp index 3bc1f1b033..9363d5a337 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp @@ -61,11 +61,6 @@ namespace ScriptCanvasEditor { } - void ScriptCanvasAssetNode::OnInputSignal(const ScriptCanvas::SlotId&) - { - - } - void ScriptCanvasAssetNode::OnInit() { if (GetAsset().GetId().IsValid()) diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h b/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h index 8d3a5bf3d8..5b3e07cfbd 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h @@ -74,7 +74,6 @@ namespace ScriptCanvasEditor //// protected: - void OnInputSignal(const ScriptCanvas::SlotId&) override; // AssetBus::Handler void OnAssetReloaded(AZ::Data::Asset asset) override; void OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType) override; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp index 3d6c9012cc..dfeb439c3d 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp @@ -223,7 +223,7 @@ namespace ScriptCanvasEditor void ScriptCanvasRootPaletteTreeItem::SetActiveScriptCanvasId(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) { - ScriptCanvas::RuntimeRequestBus::EventResult(m_previousAssetId, scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetId); + ScriptCanvas::RuntimeRequestBus::EventResult(m_previousAssetId, scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetId); for (auto functionTreePair : m_globalFunctionTreeItems) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp index b6062423ee..aad178b91d 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp @@ -31,7 +31,6 @@ #include #include #include -#include #include #include @@ -722,7 +721,7 @@ namespace ScriptCanvasEditor ScriptCanvas::GraphVariableManagerNotificationBus::Handler::BusDisconnect(); m_assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::RuntimeRequestBus::EventResult(m_assetType, scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetType); + ScriptCanvas::GraphRequestBus::EventResult(m_assetType, scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetType); m_scriptCanvasId = scriptCanvasId; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp index 2d23b942df..f98c896f69 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/SlotTypeSelectorWidget.cpp @@ -50,7 +50,6 @@ #include #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp index d88c16ba24..9307084e2a 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp @@ -50,7 +50,6 @@ #include #include -#include #include #include @@ -757,7 +756,7 @@ namespace ScriptCanvasEditor AZStd::vector selection; - ScriptCanvas::RuntimeRequests* runtimeRequests = ScriptCanvas::RuntimeRequestBus::FindFirstHandler(m_scriptCanvasId); + auto owningGraph = ScriptCanvas::GraphRequestBus::FindFirstHandler(m_scriptCanvasId); if (runtimeRequests == nullptr) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h deleted file mode 100644 index 58c99e719e..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -#include - -namespace AZ -{ - class Entity; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasFunctionAsset; - class Graph; - - class ScriptCanvasFunctionDescription : public ScriptCanvas::AssetDescription - { - public: - - AZ_TYPE_INFO(ScriptCanvasFunctionDescription, "{B53569F6-8408-40FC-9A72-ED873BEF162E}"); - - ScriptCanvasFunctionDescription() - : AssetDescription( - azrtti_typeid(), - "Script Canvas Function", - "Script Canvas Function Graph Asset", - "@devassets@/scriptcanvas/functions", - ".scriptcanvas_fn", - "Script Canvas Function", - "Untitled-Function-%i", - "Script Canvas Function Files (*.scriptcanvas_fn)", - "Script Canvas Function", - "Script Canvas Function", - "Icons/ScriptCanvas/Viewport/ScriptCanvas_Function.png", - AZ::Color(0.192f, 0.149f, 0.392f, 1.0f), - true - ) - {} - }; - - // TODO-LS: move these to their own file - class ScriptCanvasDataRequests : public AZ::ComponentBus - { - public: - - virtual void SetPrettyName(const char* name) = 0; - virtual AZStd::string GetPrettyName() = 0; - }; - - using ScriptCanvasDataRequestBus = AZ::EBus; - - - class ScriptCanvasFunctionDataComponent - : public AZ::Component - , ScriptCanvasDataRequestBus::MultiHandler - { - public: - AZ_COMPONENT(ScriptCanvasFunctionDataComponent, "{440BB6DC-4E70-4304-A926-252925F77433}"); - - void Activate() override - { - AZ::EntityId entityId = GetEntityId(); - ScriptCanvasDataRequestBus::MultiHandler::BusConnect(entityId); - } - - void Deactivate() override - { - ScriptCanvasDataRequestBus::MultiHandler::BusDisconnect(); - - AZ::EntityId entityId = GetEntityId(); - } - - void SetPrettyName(const char* name) override - { - m_assetPrettyName = name; - } - - AZStd::string GetPrettyName() override - { - return m_assetPrettyName; - } - - static void Reflect(AZ::ReflectContext* reflectContext) - { - if (auto serializeContext = azrtti_cast(reflectContext)) - { - serializeContext->Class() - ->Version(2) - ->Field("m_assetPrettyName", &ScriptCanvasFunctionDataComponent::m_assetPrettyName) - ->Field("m_version", &ScriptCanvasFunctionDataComponent::m_functionDataComponentVersion) - ; - } - } - - size_t m_functionDataComponentVersion = 0; - AZStd::string m_assetPrettyName; - }; - - class ScriptCanvasFunctionAsset - : public ScriptCanvas::ScriptCanvasAssetBase - { - public: - AZ_RTTI(ScriptCanvasFunctionAsset, "{ED078D3C-938D-41F8-A5F6-CC04311ECF4F}", ScriptCanvasAssetBase); - AZ_CLASS_ALLOCATOR(ScriptCanvasFunctionAsset, AZ::SystemAllocator, 0); - - ScriptCanvasFunctionAsset(const AZ::Data::AssetId& assetId = AZ::Data::AssetId(AZ::Uuid::CreateRandom()), AZ::Data::AssetData::AssetStatus status = AZ::Data::AssetData::AssetStatus::NotLoaded) - : ScriptCanvasAssetBase(assetId, status) - { - m_data = aznew ScriptCanvas::ScriptCanvasData(); - } - - ~ScriptCanvasFunctionAsset() override - {} - - ScriptCanvas::AssetDescription GetAssetDescription() const override - { - return ScriptCanvasFunctionDescription(); - } - - using Description = ScriptCanvasFunctionDescription; - - ScriptCanvasFunctionDataComponent* m_cachedComponent = nullptr; - - ScriptCanvasFunctionDataComponent* GetFunctionData() - { - if (m_cachedComponent == nullptr) - { - m_cachedComponent = GetScriptCanvasEntity()->FindComponent(); - } - - return m_cachedComponent; - } - }; - -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index 443e6864a9..4545063f56 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -122,8 +122,6 @@ namespace ScriptCanvas { const auto& scriptCanvasId = GetScriptCanvasId(); GraphRequestBus::Handler::BusConnect(scriptCanvasId); - RuntimeRequestBus::Handler::BusConnect(scriptCanvasId); - ValidationRequestBus::Handler::BusConnect(scriptCanvasId); for (auto& nodeEntity : m_graphData.m_nodes) @@ -142,6 +140,7 @@ namespace ScriptCanvas } m_graphData.BuildEndpointMap(); + for (auto& connectionEntity : m_graphData.m_connections) { if (connectionEntity) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h index e54704e95e..92de8f3c3e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -35,7 +34,6 @@ namespace ScriptCanvas class Graph : public AZ::Component , protected GraphRequestBus::Handler - , protected RuntimeRequestBus::Handler , protected StatusRequestBus::Handler , private AZ::EntityBus::Handler , private ValidationRequestBus::Handler @@ -174,14 +172,12 @@ namespace ScriptCanvas void RefreshConnectionValidity(bool warnOnRemoval = false); - //// RuntimeRequestBus::Handler AZ::Data::AssetId GetAssetId() const override { return AZ::Data::AssetId(); } GraphIdentifier GetGraphIdentifier() const override { return GraphIdentifier(GetAssetId(), 0); } AZStd::string GetAssetName() const override { return ""; } AZ::EntityId GetRuntimeEntityId() const override { return GetEntity() ? GetEntityId() : AZ::EntityId(); } VariableId FindAssetVariableIdByRuntimeVariableId(VariableId runtimeId) const override { return runtimeId; } - VariableId FindRuntimeVariableIdByAssetVariableId(VariableId assetId) const override { return assetId; } AZ::EntityId FindAssetNodeIdByRuntimeNodeId(AZ::EntityId editorNode) const override { return editorNode; } AZ::EntityId FindRuntimeNodeIdByAssetNodeId(AZ::EntityId runtimeNode) const override { return runtimeNode; } @@ -190,8 +186,8 @@ namespace ScriptCanvas const GraphVariableMapping* GetVariables() const override; GraphVariable* FindVariable(AZStd::string_view propName) override; GraphVariable* FindVariableById(const VariableId& variableId) override; - Data::Type GetVariableType(const VariableId& variableId) const override; - AZStd::string_view GetVariableName(const VariableId& variableId) const override; + Data::Type GetVariableType(const VariableId& variableId) const; + AZStd::string_view GetVariableName(const VariableId& variableId) const; bool IsGraphObserved() const override; void SetIsGraphObserved(bool isObserved) override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h index c85c76e54e..b01e23419c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h @@ -11,6 +11,7 @@ #include "Endpoint.h" #include +#include #include #include @@ -23,6 +24,8 @@ namespace ScriptCanvas class Graph; class Slot; + using EndpointMapConstIterator = AZStd::unordered_multimap::const_iterator; + //! These are public graph requests class GraphRequests : public AZ::EBusTraits { @@ -104,8 +107,49 @@ namespace ScriptCanvas virtual void SetIsGraphObserved(bool observed) = 0; virtual bool IsGraphObserved() const = 0; - }; + virtual VariableId FindAssetVariableIdByRuntimeVariableId(VariableId runtimeId) const = 0; + + virtual AZ::EntityId FindAssetNodeIdByRuntimeNodeId(AZ::EntityId editorNode) const = 0; + + virtual AZ::Data::AssetId GetAssetId() const = 0; + + virtual GraphIdentifier GetGraphIdentifier() const = 0; + + virtual AZStd::string GetAssetName() const = 0; + + //! Looks up the nodeId within the bus handler + virtual Node* FindNode(AZ::EntityId nodeId) const = 0; + + virtual AZ::EntityId FindRuntimeNodeIdByAssetNodeId(AZ::EntityId runtimeNode) const = 0; + + //! Returns the entity id of the execution component + virtual AZ::EntityId GetRuntimeEntityId() const = 0; + + virtual AZStd::pair< EndpointMapConstIterator, EndpointMapConstIterator > GetConnectedEndpointIterators(const Endpoint& endpoint) const = 0; + + //! Returns whether the given endpoint has any connections + virtual bool IsEndpointConnected(const Endpoint& endpoint) const = 0; + + //! Retrieves VariableData structure which manages variable data for the execution component + virtual VariableData* GetVariableData() = 0; + virtual const VariableData* GetVariableDataConst() const = 0; + + //! Retrieves a map of variable id to variable name and variable datums pair + virtual const GraphVariableMapping* GetVariables() const = 0; + + //! Searches for a variable with the specified name + //! returns pointer to the first variable with the specified name or nullptr + virtual GraphVariable* FindVariable(AZStd::string_view varName) = 0; + + //! Searches for a variable by VariableId + //! returns a pair of with the supplied id + //! The variable datum pointer is non-null if the variable has been found + virtual GraphVariable* FindVariableById(const VariableId& variableId) = 0; + + virtual AZ::Data::AssetType GetAssetType() const = 0; + + }; using GraphRequestBus = AZ::EBus; class GraphNotifications : public AZ::EBusTraits diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp index 8d61eef3a0..8250eb1763 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.cpp @@ -487,23 +487,16 @@ namespace ScriptCanvas void Node::Activate() { - SignalBus::Handler::BusConnect(GetEntityId()); - - SetRuntimeBus(RuntimeRequestBus::FindFirstHandler(m_scriptCanvasId)); - AZ_Assert(m_runtimeBus, "Invalid m_executionUniqueId given for RuntimeRequestBus"); - + m_graphRequestBus = GraphRequestBus::FindFirstHandler(m_scriptCanvasId); + AZ_Assert(m_graphRequestBus, "Invalid m_executionUniqueId given for RuntimeRequestBus"); OnActivate(); - MarkDefaultableInput(); } void Node::Deactivate() { OnDeactivate(); - - SignalBus::Handler::BusDisconnect(); - - SetRuntimeBus(RuntimeRequestBus::FindFirstHandler(m_scriptCanvasId)); + m_graphRequestBus = GraphRequestBus::FindFirstHandler(m_scriptCanvasId); } void Node::PostActivate() @@ -737,7 +730,7 @@ namespace ScriptCanvas bool Node::IsInEventHandlingScope(const ID& possibleEventHandler) const { - Node* node = m_runtimeBus->FindNode(possibleEventHandler); + Node* node = m_graphRequestBus->FindNode(possibleEventHandler); if (auto eventHandler = azrtti_cast(node)) { @@ -844,7 +837,7 @@ namespace ScriptCanvas GraphVariable* Node::FindGraphVariable(const VariableId& variableId) const { - return m_runtimeBus->FindVariableById(variableId); + return m_graphRequestBus->FindVariableById(variableId); } void Node::OnSlotConvertedToValue(const SlotId& slotId) @@ -1598,24 +1591,6 @@ namespace ScriptCanvas NodeNotificationsBus::Event(GetEntityId(), &NodeNotifications::OnSlotDisplayTypeChanged, slotId, dataType); } - void Node::SignalInput(const SlotId& slotId) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - SC_EXECUTION_TRACE_SIGNAL_INPUT((*this), (InputSignal(CreateNodeInputSignal(slotId)))); - - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::%s::SignalInput", GetNodeName().c_str()); - OnInputSignal(slotId); - } - - } - - void Node::SignalOutput(const SlotId& slotId, ExecuteMode mode) - { - AZ_UNUSED(slotId); - AZ_UNUSED(mode); - } - AZ::Outcome Node::SlotAcceptsType(const SlotId& slotID, const Data::Type& type) const { if (auto slot = GetSlot(slotID)) @@ -1914,7 +1889,7 @@ namespace ScriptCanvas if (slot.GetDescriptor() == slotDescriptor && (allowLatentSlots || !slot.IsLatent())) { - AZStd::vector connectedEndpoints = m_runtimeBus->GetConnectedEndpoints(Endpoint{ GetEntityId(), slot.GetId() }); + AZStd::vector connectedEndpoints = m_graphRequestBus->GetConnectedEndpoints(Endpoint{ GetEntityId(), slot.GetId() }); endpoints.insert(endpoints.end(), connectedEndpoints.begin(), connectedEndpoints.end()); } } @@ -2339,9 +2314,7 @@ namespace ScriptCanvas void Node::SetOwningScriptCanvasId(ScriptCanvasId scriptCanvasId) { m_scriptCanvasId = scriptCanvasId; - - SetRuntimeBus(RuntimeRequestBus::FindFirstHandler(m_scriptCanvasId)); - + m_graphRequestBus = GraphRequestBus::FindFirstHandler(m_scriptCanvasId); OnGraphSet(); } @@ -2426,7 +2399,7 @@ namespace ScriptCanvas AZ::EntityId Node::GetGraphEntityId() const { - return m_runtimeBus->GetRuntimeEntityId(); + return m_graphRequestBus->GetRuntimeEntityId(); } NodePtrConstList Node::FindConnectedNodesByDescriptor(const SlotDescriptor& slotDescriptor, bool followLatentConnections) const @@ -2437,7 +2410,7 @@ namespace ScriptCanvas for (const auto& endpoint : GetAllEndpointsByDescriptor(slotDescriptor, followLatentConnections)) { - Node* connectedNode = m_runtimeBus->FindNode(endpoint.GetNodeId()); + Node* connectedNode = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (connectedNode) { @@ -2456,7 +2429,7 @@ namespace ScriptCanvas for (const auto& endpoint : GetAllEndpointsByDescriptor(slotDescriptor, followLatentConnections)) { - Node* connectedNode = m_runtimeBus->FindNode(endpoint.GetNodeId()); + Node* connectedNode = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (connectedNode) { @@ -2469,7 +2442,7 @@ namespace ScriptCanvas AZ::Data::AssetId Node::GetGraphAssetId() const { - return m_runtimeBus->GetAssetId(); + return m_graphRequestBus->GetAssetId(); } AZStd::string Node::GetGraphAssetName() const @@ -2482,7 +2455,7 @@ namespace ScriptCanvas GraphIdentifier Node::GetGraphIdentifier() const { - return m_runtimeBus->GetGraphIdentifier(); + return m_graphRequestBus->GetGraphIdentifier(); } bool Node::IsSanityCheckRequired() const @@ -2652,7 +2625,7 @@ namespace ScriptCanvas return; } - auto node = m_runtimeBus->FindNode(endpoint.GetNodeId()); + auto node = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (node) { @@ -2840,7 +2813,7 @@ namespace ScriptCanvas bool Node::IsConnected(const Slot& slot) const { AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Node::IsConnected"); - return slot.IsVariableReference() || m_runtimeBus->IsEndpointConnected(slot.GetEndpoint()); + return slot.IsVariableReference() || m_graphRequestBus->IsEndpointConnected(slot.GetEndpoint()); } bool Node::IsConnected(const SlotId& slotId) const @@ -2880,7 +2853,7 @@ namespace ScriptCanvas bool Node::IsActivated() const { - return m_runtimeBus; + return m_graphRequestBus; } EndpointsResolved Node::GetConnectedNodes(const Slot& slot) const @@ -2889,17 +2862,17 @@ namespace ScriptCanvas EndpointsResolved connectedNodes; - auto endpointIters = m_runtimeBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); + auto endpointIters = m_graphRequestBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); for (auto endpointIter = endpointIters.first; endpointIter != endpointIters.second; ++endpointIter) { const Endpoint& endpoint = endpointIter->second; - auto node = m_runtimeBus->FindNode(endpoint.GetNodeId()); + auto node = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (node == nullptr) { - AZStd::string assetName = m_runtimeBus->GetAssetName(); - AZ::EntityId assetNodeId = m_runtimeBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); + AZStd::string assetName = m_graphRequestBus->GetAssetName(); + AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); AZ_Warning("Script Canvas", false, "Unable to find node with id (id: %s) in the graph '%s'. Most likely the node was serialized with a type that is no longer reflected", assetNodeId.ToString().data(), assetName.data()); @@ -2913,8 +2886,8 @@ namespace ScriptCanvas auto endpointSlot = node->GetSlot(endpoint.GetSlotId()); if (!endpointSlot) { - AZStd::string assetName = m_runtimeBus->GetAssetName(); - AZ::EntityId assetNodeId = m_runtimeBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); + AZStd::string assetName = m_graphRequestBus->GetAssetName(); + AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); AZ_Warning("Script Canvas", false, "Endpoint was missing slot. id (id: %s) in the graph '%s'.", assetNodeId.ToString().data(), assetName.data()); @@ -2937,18 +2910,18 @@ namespace ScriptCanvas void Node::ModConnectedNodes(const Slot& slot, AZStd::vector>& connectedNodes) const { - auto endpointIters = m_runtimeBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); + auto endpointIters = m_graphRequestBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); for (auto endpointIter = endpointIters.first; endpointIter != endpointIters.second; ++endpointIter) { const Endpoint& endpoint = endpointIter->second; - auto node = m_runtimeBus->FindNode(endpoint.GetNodeId()); + auto node = m_graphRequestBus->FindNode(endpoint.GetNodeId()); if (node == nullptr) { - AZStd::string assetName = m_runtimeBus->GetAssetName(); - AZ::EntityId assetNodeId = m_runtimeBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); + AZStd::string assetName = m_graphRequestBus->GetAssetName(); + AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId()); AZ_Error("Script Canvas", false, "Unable to find node with id (id: %s) in the graph '%s'. Most likely the node was serialized with a type that is no longer reflected", assetNodeId.ToString().data(), assetName.data()); @@ -2961,41 +2934,7 @@ namespace ScriptCanvas bool Node::HasConnectedNodes(const Slot& slot) const { - return m_runtimeBus->IsEndpointConnected(Endpoint{ GetEntityId(), slot.GetId() }); - } - - void Node::OnInputChanged(Node& node, const Datum& input, const SlotId& slotID) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - node.OnInputChanged(input, slotID); - } - - void Node::PushOutput(const Datum& output, const Slot& slot) const - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - - if (slot.IsVariableReference()) - { - GraphVariable* variable = slot.GetVariable(); - - if (variable) - { - ModifiableDatumView datumView; - variable->ConfigureDatumView(datumView); - - datumView.AssignToDatum(output); - } - } - else - { - auto endpointIters = m_runtimeBus->GetConnectedEndpointIterators(Endpoint{ GetEntityId(), slot.GetId() }); - - for (auto endpointIter = endpointIters.first; endpointIter != endpointIters.second; ++endpointIter) - { - Node* node = m_runtimeBus->FindNode(endpointIter->second.GetNodeId()); - node->SetInput(output, endpointIter->second.GetSlotId()); - } - } + return m_graphRequestBus->IsEndpointConnected(Endpoint{ GetEntityId(), slot.GetId() }); } void Node::ForEachConnectedNode(const Slot& slot, AZStd::function callable) const @@ -3018,9 +2957,8 @@ namespace ScriptCanvas FindModifiableDatumView(slotId, datumView); if (datumView.IsValid()) - { + { datumView.AssignToDatum(newInput); - OnInputChanged((*datumView.GetDatum()), slotId); } } @@ -3034,7 +2972,6 @@ namespace ScriptCanvas if (datumView.IsValid()) { datumView.AssignToDatum(newInput); - OnInputChanged((*datumView.GetDatum()), slotId); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h index 74707916f3..55379e29b9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h @@ -22,12 +22,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -400,7 +398,6 @@ namespace ScriptCanvas class Node : public AZ::Component , public DatumNotificationBus::Handler - , private SignalBus::Handler , public NodeRequestBus::Handler , public EndpointNotificationBus::MultiHandler { @@ -542,7 +539,6 @@ namespace ScriptCanvas AZStd::vector> FindConnectedNodesAndSlotsByDescriptor(const SlotDescriptor& slotType, bool followLatentConnections = false) const; AZStd::vector GetSlotsByType(CombinedSlotType slotType) const; - AZStd::vector GetConnectedEndpoints(SlotId outSlot) const; bool IsConnected(const Slot& slot) const; bool IsConnected(const SlotId& slotId) const; @@ -845,7 +841,6 @@ namespace ScriptCanvas void SignalSlotsReordered(); - static void OnInputChanged(Node& node, const Datum& input, const SlotId& slotID); static void SetInput(Node& node, const SlotId& id, const Datum& input); static void SetInput(Node& node, const SlotId& id, Datum&& input); @@ -892,7 +887,6 @@ protected: void Configure(); protected: - TransientSlotIdentifier ConstructTransientIdentifier(const Slot& slot) const; DatumVector GatherDatumsForDescriptor(SlotDescriptor descriptor) const; @@ -900,7 +894,6 @@ protected: SlotDataMap CreateInputMap() const; SlotDataMap CreateOutputMap() const; - Signal CreateNodeInputSignal(const SlotId& slotId) const; Signal CreateNodeOutputSignal(const SlotId& slotId) const; @@ -954,6 +947,7 @@ protected: //! This is a used by CodeGen to configure slots just prior to OnInit. virtual void ConfigureSlots() {} + //! Entity level initialization, perform any resource allocation here that should be available throughout the node's existence. virtual void OnInit() {} @@ -968,13 +962,11 @@ protected: //! Entity level activation, perform entity lifetime setup here, i.e. connect to EBuses virtual void OnActivate() {} + //! Entity level deactivation, perform any entity lifetime release here, i.e disconnect from EBuses virtual void OnDeactivate() {} virtual void OnPostActivate() {} - //! Any node that is not pure data will perform its operation assuming that all input has been pushed and is reasonably valid - // perform your derived nodes work in OnInputSignal(const SlotId&) - virtual void OnInputSignal(const SlotId& /*slot*/) {} //! Signal sent once the OwningScriptCanvasId is set. virtual void OnGraphSet() {} @@ -1000,25 +992,12 @@ protected: void ModConnectedNodes(const Slot& slot, AZStd::vector>&) const; bool HasConnectedNodes(const Slot& slot) const; - virtual void OnInputChanged(const Datum& /*input*/, const SlotId& /*slotID*/) {} - - ////////////////////////////////////////////////////////////////////////// - //! The body of the node's execution, implement the node's work here. - void PushOutput(const Datum& output, const Slot& slot) const; void SetOwningScriptCanvasId(ScriptCanvasId scriptCanvasId); void SetGraphEntityId(AZ::EntityId graphEntityId); - // on activate, simple expressions need to push this data virtual void SetInput(const Datum& input, const SlotId& id); virtual void SetInput(Datum&& input, const SlotId& id); - //! Any node that is not pure data will perform its operation assuming that all input has been pushed and is reasonably valid - // perform your derived nodes work in OnInputSignal(const SlotId&) - void SignalInput(const SlotId& slot) override final; - - //! This must be called manually to send execution out of a specific slot - void SignalOutput(const SlotId& slot, ExecuteMode mode = ExecuteMode::Normal) override final; - bool SlotExists(AZStd::string_view name, const SlotDescriptor& slotDescriptor) const; bool IsTargetInDataFlowPath(const ID& targetNodeId, AZStd::unordered_set& path) const; @@ -1027,10 +1006,6 @@ protected: void PopulateNodeType(); - void SetRuntimeBus(RuntimeRequests* runtimeBus) { m_runtimeBus = runtimeBus; } - RuntimeRequests* GetRuntimeBus() const { return m_runtimeBus; } - - GraphScopedNodeId GetScopedNodeId() const { return GraphScopedNodeId(GetOwningScriptCanvasId(), GetEntityId()); } private: @@ -1070,102 +1045,17 @@ protected: AZStd::vector< VisualExtensionSlotConfiguration > m_visualExtensions; // Cache pointer to the owning Graph - RuntimeRequests* m_runtimeBus = nullptr; + GraphRequests* m_graphRequestBus = nullptr; ScriptCanvas::SlotId m_removingSlot; public: - template - const t_Value* GetInput_UNIT_TEST(AZStd::string_view slotName) - { - return GetInput_UNIT_TEST(GetSlotId(slotName)); - } - - template - t_Value* ModInput_UNIT_TEST(AZStd::string_view slotName) - { - return ModInput_UNIT_TEST(GetSlotId(slotName)); - } - - template - const t_Value* GetInput_UNIT_TEST(const SlotId& slotId) - { - const Datum* input = FindDatum(slotId); - return input ? input->GetAs() : nullptr; - } - - template - t_Value* ModInput_UNIT_TEST(const SlotId& slotId) - { - auto slotIter = m_slotIdIteratorCache.find(slotId); - - if (slotIter != m_slotIdIteratorCache.end()) - { - Slot* slot = &(*slotIter->second.m_slotIterator); - - if (slot->IsVariableReference()) - { - AZ_Assert(false, "Variable references are not supported in Unit Test methods."); - } - else - { - return slotIter->second.GetDatumIter()->ModAs(); - } - } - - return nullptr; - } - - const Datum* GetInput_UNIT_TEST(AZStd::string_view slotName) - { - return GetInput_UNIT_TEST(GetSlotId(slotName)); - } - - const Datum* GetInput_UNIT_TEST(const SlotId& slotId) - { - return FindDatum(slotId); - } - - // initializes the node input to the value passed in, not a pointer to it - template - void SetInput_UNIT_TEST(AZStd::string_view slotName, const t_Value& value) - { - SetInput_UNIT_TEST(GetSlotId(slotName), value); - } - - template - void SetInput_UNIT_TEST(const SlotId& slotId, const t_Value& value) - { - SetInput(Datum(value), slotId); - } - - void SetInput_UNIT_TEST(AZStd::string_view slotName, const Datum& value) - { - SetInput_UNIT_TEST(GetSlotId(slotName), value); - } - - void SetInput_UNIT_TEST(AZStd::string_view slotName, Datum&& value) - { - SetInput_UNIT_TEST(GetSlotId(slotName), AZStd::move(value)); - } - - void SetInput_UNIT_TEST(const SlotId& slotId, Datum&& value) - { - SetInput(AZStd::move(value), slotId); - } - template friend struct Internal::MultipleOutputHelper; template friend struct Internal::OutputSlotHelper; - template - friend struct Internal::PushOutputHelper; - - template - friend struct Internal::CallHelper; - template friend struct SetDefaultValuesByIndex; }; @@ -1238,104 +1128,6 @@ protected: } }; - template> - struct PushOutputHelper - { - template - static void PushOutput(Node& node, ResultType&& result, AZStd::index_sequence) - { - // protect against changes to the function that generated the node - if (auto slot = node.GetSlotByIndex(t_Traits::s_resultsSlotIndicesStart)) - { - node.PushOutput(Datum(AZStd::forward(result)), *slot); - } - } - }; - - template - struct PushOutputHelper - { - template static void PushOutput(Node& node, AZStd::ignore_t result, AZStd::index_sequence) {} - }; - - template - struct PushOutputHelper::value>> - { - template - static void PushOutputFold(Node& node, ResultType&& tupleResult) - { - // protect against changes to the function that generated the node - if (auto slot = node.GetSlotByIndex(t_Traits::s_resultsSlotIndicesStart + t_Index)) - { - node.PushOutput(Datum(AZStd::get(AZStd::forward(tupleResult))), *slot); - } - } - - template - static void PushOutput(Node& node, ResultType&& tupleResult, AZStd::index_sequence) - { - (PushOutputFold(node, AZStd::forward(tupleResult)), ...); - } - }; - - template - struct CallHelper - { - // protect against changes to the function that generated the node - template - static bool IsIndexSafe(Node& node, const AZStd::index_sequence&) - { - return (true && ... && (node.FindDatumByIndex(Indices) != nullptr && node.FindDatumByIndex(Indices)->GetAs>() != nullptr)); - } - - template - static void Call(Node& node, AZStd::Internal::pack_traits_arg_sequence, [[maybe_unused]] AZStd::index_sequence sequence) - { -#if !defined(_RELEASE) - if (IsIndexSafe(node, sequence)) - { - PushOutputHelper::PushOutput(node, AZStd::invoke(function, *node.FindDatumByIndex(ArgIndices)->GetAs>()...), ResultIndexSequence()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((node), "Generic function Node (%s) could not be executed, due to missing slot for source definition." - "this is likely due to changing the function signature. See serialization log for potential errors & warnings.", node.GetNodeName().c_str()); - } -#else - PushOutputHelper::PushOutput(node, AZStd::invoke(function, *node.FindDatumByIndex(ArgIndices)->GetAs>()...), ResultIndexSequence()); -#endif//!defined(_RELEASE) - } - }; - - template - struct CallHelper - { - // protect against changes to the function that generated the node - template - static bool IsIndexSafe(Node& node, const AZStd::index_sequence&) - { - return true && (... && (node.FindDatumByIndex(Indices) != nullptr && node.FindDatumByIndex(Indices)->GetAs>() != nullptr)); - } - - template - static void Call(Node& node, AZStd::Internal::pack_traits_arg_sequence, [[maybe_unused]] AZStd::index_sequence sequence) - { -#if !defined(_RELEASE) - if (IsIndexSafe(node, sequence)) - { - AZStd::invoke(function, *node.FindDatumByIndex(ArgIndices)->GetAs>()...); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((node), "Generic function Node (%s) could not be executed, due to missing slot for source definition." - "this is likely due to changing the function signature. See serialization log for potential errors & warnings.", node.GetNodeName().c_str()); - } -#else - AZStd::invoke(function, *node.FindDatumByIndex(ArgIndices)->GetAs>()...); -#endif//!defined(_RELEASE) - } - }; - template struct MultipleOutputHelper { @@ -1346,11 +1138,6 @@ protected: { OutputSlotHelper::AddOutputSlot(node, ResultIndexSequence()); } - - static void Call(Node& node) - { - CallHelper::Call(node, typename AZStd::function_traits::arg_sequence{}, AZStd::make_index_sequence::arity>{}); - } }; template> diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index 95fc23c5d5..e3e0c1a7a3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -248,8 +248,6 @@ namespace ScriptCanvas return AZ::Success(scope); } - - protected: template @@ -298,13 +296,6 @@ namespace ScriptCanvas MultipleOutputInvoker::Add(*this); } - void OnInputSignal(const SlotId&) override - { - MultipleOutputInvoker::Call(*this); - SignalOutput(GetSlotId("Out")); - } - - static bool VersionConverter(AZ::SerializeContext& serializeContext, AZ::SerializeContext::DataElementNode& rootElement); static bool ConvertOldNodeGeneric(AZ::SerializeContext& serializeContext, AZ::SerializeContext::DataElementNode& rootElement); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SignalBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SignalBus.h deleted file mode 100644 index 1a39c0f4d6..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SignalBus.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include "Core.h" - -#include - -namespace ScriptCanvas -{ - enum class ExecuteMode - { - Normal, - UntilNodeIsFoundInStack - }; - - class SignalInterface : public AZ::EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - typedef ID BusIdType; - ////////////////////////////////////////////////////////////////////////// - - virtual void SignalInput(const SlotId& slot) = 0; - virtual void SignalOutput(const SlotId& slot, ExecuteMode mode = ExecuteMode::Normal) = 0; - }; - - using SignalBus = AZ::EBus; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp index 2517c0c7ed..204a087ab3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.cpp @@ -384,15 +384,10 @@ namespace ScriptCanvas if (m_variable) { VariableNotificationBus::Handler::BusConnect(m_variable->GetGraphScopedId()); - - if (IsInput()) - { - m_node->OnInputChanged((*m_variable->GetDatum()), GetId()); - } } - else + else if (m_node) { - SCRIPTCANVAS_REPORT_ERROR((*m_node), "Node (%s) is attempting to execute using an invalid Variable Reference", m_node->GetNodeName().c_str()); + AZ_Warning("ScriptCanvas", false, "Node (%s) is attempting to initialize an invalid Variable Reference", m_node->GetNodeName().c_str()); } } } @@ -584,11 +579,6 @@ namespace ScriptCanvas return m_isLatentSlot; } - void Slot::OnVariableValueChanged() - { - m_node->OnInputChanged((*m_variable->GetDatum()), GetId()); - } - void Slot::SetDynamicDataType(DynamicDataType dynamicDataType) { AZ_Assert(m_dynamicDataType == DynamicDataType::None, "Set Dynamic Data Type is meant to be used for a node wise version conversion step. Not as a run time reconfiguration of a dynamic type."); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.h index 1eeddb8898..0e5889e4ba 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Slot.h @@ -167,10 +167,6 @@ namespace ScriptCanvas bool IsLatent() const; - // VariableNotificationBus - void OnVariableValueChanged() override; - //// - // Here to allow conversion of the previously untyped any slots into the dynamic type any. void SetDynamicDataType(DynamicDataType dynamicDataType); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h index 024f3e7483..19ff2e1d65 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/SubgraphInterface.h @@ -266,16 +266,6 @@ namespace ScriptCanvas const In* FindIn(const AZStd::string& inSlotId) const; const Out* FindLatentOut(const AZStd::string& latent) const; LexicalScope GetLexicalScope(bool isSourcePure) const; - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - public: - bool IsAllInputOutputShared() const; - - // all input/output are used in every in/out/latent slot? - bool m_isAllInputOutputShared = false; - - void MarkAllInputOutputShared(); -#endif }; AZStd::string ToString(const In& in, size_t tabs = 0); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeBus.h deleted file mode 100644 index eb3956c4e5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeBus.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -#include -#include -#include -#include - -#include -#include -#include - -namespace ScriptCanvas -{ - struct GraphData; - class GraphVariable; - class VariableData; - - using EndpointMapConstIterator = AZStd::unordered_multimap::const_iterator; - - //! Runtime Request Bus for interfacing with the runtime execution component - class RuntimeRequests : public AZ::EBusTraits - { - public: - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - //! BusIdType represents a unique id for the execution component - //! Because multiple Script Canvas graphs can execute on the same entity - //! this is not an "EntityId" in the sense that it uniquely identifies an entity. - using BusIdType = ScriptCanvasId; - - virtual VariableId FindAssetVariableIdByRuntimeVariableId(VariableId runtimeId) const = 0; - - virtual VariableId FindRuntimeVariableIdByAssetVariableId(VariableId assetId) const = 0; - - virtual AZ::EntityId FindAssetNodeIdByRuntimeNodeId(AZ::EntityId editorNode) const = 0; - - virtual AZ::Data::AssetId GetAssetId() const = 0; - virtual GraphIdentifier GetGraphIdentifier() const = 0; - virtual AZStd::string GetAssetName() const = 0; - - //! Looks up the nodeId within the bus handler - virtual Node* FindNode(AZ::EntityId nodeId) const = 0; - - virtual AZ::EntityId FindRuntimeNodeIdByAssetNodeId(AZ::EntityId runtimeNode) const = 0; - - //! Returns the entity id of the execution component - virtual AZ::EntityId GetRuntimeEntityId() const = 0; - - //! Returns a container of nodes - virtual AZStd::vector GetNodes() const = 0; - //! Returns a container of connections - virtual AZStd::vector GetConnections() const = 0; - - //! Returns a container of all endpoints to which the supplied endpoint is connected point - virtual AZStd::vector GetConnectedEndpoints(const Endpoint& endpoint) const = 0; - - virtual AZStd::pair< EndpointMapConstIterator, EndpointMapConstIterator > GetConnectedEndpointIterators(const Endpoint& endpoint) const = 0; - - //! Returns whether the given endpoint has any connections - virtual bool IsEndpointConnected(const Endpoint& endpoint) const = 0; - - //! Retrieves GraphData structure which manages the nodes and connections of an executing graph - virtual GraphData* GetGraphData() = 0; - virtual const GraphData* GetGraphDataConst() const = 0; - - //! Retrieves VariableData structure which manages variable data for the execution component - virtual VariableData* GetVariableData() = 0; - virtual const VariableData* GetVariableDataConst() const = 0; - - //! Retrieves a map of variable id to variable name and variable datums pair - virtual const GraphVariableMapping* GetVariables() const = 0; - - //! Searches for a variable with the specified name - //! returns pointer to the first variable with the specified name or nullptr - virtual GraphVariable* FindVariable(AZStd::string_view varName) = 0; - - //! Searches for a variable by VariableId - //! returns a pair of with the supplied id - //! The variable datum pointer is non-null if the variable has been found - virtual GraphVariable* FindVariableById(const VariableId& variableId) = 0; - - //! Returns the type associated with the specified variable. - virtual Data::Type GetVariableType(const VariableId& variableId) const = 0; - - //! Looks up the variable name that the variable data is associated with in the handler of the bus - virtual AZStd::string_view GetVariableName(const VariableId& variableId) const = 0; - - virtual bool IsGraphObserved() const = 0; - virtual void SetIsGraphObserved(bool isObserved) = 0; - - virtual AZ::Data::AssetType GetAssetType() const = 0; - }; - - using RuntimeRequestBus = AZ::EBus; -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp index 2ba248bb5e..348c89f45f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.cpp @@ -2248,17 +2248,6 @@ namespace ScriptCanvas m_subgraphInterface.SetNamespacePath(m_source.m_namespacePath); -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - if (m_source.m_graph->IsFunctionGraph()) - { - m_variableScopeMeaning = VariableScopeMeaning_LegacyFunctions::FunctionPrototype; - m_subgraphInterface.MarkAllInputOutputShared(); - } - else - { - m_variableScopeMeaning = VariableScopeMeaning_LegacyFunctions::ValueInitialization; - } -#endif // The Order Matters: begin // add all data to the ACM for easy look up in input/output processing for ACM nodes diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.h index 92de21ff97..06854fdbfd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/AbstractCodeModel.h @@ -594,24 +594,6 @@ namespace ScriptCanvas void ParseExecutionIfStatementBooleanExpression(ExecutionTreePtr booleanExpressionExecution, AZStd::string executionName, LexicalScope lexicalScope); void ParseExecutionIfStatementInternalFunction(ExecutionTreePtr internalFunctionExecution); - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - public: - AZStd::vector FindAllVariablesInVariableFlagScope(VariableFlags::Scope scope) const; - - // scrape variables for scope, every Scope::In and InOut - AZStd::vector FindSubGraphInputValues() const; - - // scrape variables for scope, every Scope::Out and InOut - AZStd::vector FindSubGraphOutputValues() const; - - AZStd::vector GetLocalVariablesUser() const; - - VariableScopeMeaning_LegacyFunctions GetVariableScopeMeaning() const; - - private: - VariableScopeMeaning_LegacyFunctions m_variableScopeMeaning = VariableScopeMeaning_LegacyFunctions::ValueInitialization; -#endif }; // class AbstractCodeModel template diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp deleted file mode 100644 index 5d16bd7f9c..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "PrimitivesDeclarations.h" - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "AbstractCodeModel.h" -#include "FunctionsLegacySupport.h" -#include "GrammarContextBus.h" -#include "ParsingUtilities.h" -#include "Primitives.h" - -namespace ScriptCanvas -{ - namespace Grammar - { - - void AbstractCodeModel::AddAllVariablesPreParse_LegacyFunctions() - { - // all variables assumed to be NOT persistent - in the live code they are reset when activated - // variables with no scope In/Out is assumed to be persistent, this is a mess with tick handlers - // warn on any variable attempted to be read before written - AZ_Assert(m_variableScopeMeaning == VariableScopeMeaning_LegacyFunctions::FunctionPrototype, "new graph type added without full support"); - auto& sourceVariables = m_source.m_variableData->GetVariables(); - - AZStd::set sortedVariables; - for (const auto& variablePair : sourceVariables) - { - sortedVariables.insert(&variablePair.second); - } - - for (auto& sourceVariable : sortedVariables) - { - auto datum = sourceVariable->GetDatum(); - AZ_Assert(datum != nullptr, "the datum must be valid"); - AddVariable(*datum, sourceVariable->GetVariableName(), sourceVariable->GetVariableId()); - } - } - - AZStd::vector AbstractCodeModel::FindSubGraphInputValues() const - { - return FindAllVariablesInVariableFlagScope(VariableFlags::Scope::Input); - } - - AZStd::vector AbstractCodeModel::FindSubGraphOutputValues() const - { - return FindAllVariablesInVariableFlagScope(VariableFlags::Scope::Output); - } - - AZStd::vector AbstractCodeModel::FindAllVariablesInVariableFlagScope(VariableFlags::Scope scope) const - { - AZStd::vector variables; - auto& sourceVariables = m_source.m_variableData->GetVariables(); - - for (auto& variable : m_variables) - { - if (IsSourceInScope(variable, scope)) - { - variables.push_back(variable); - } - } - - // sort by variable id - AZStd::sort(variables.begin(), variables.end(), [](const auto& lhs, const auto& rhs) { return lhs->m_sourceVariableId < rhs->m_sourceVariableId; }); - return variables; - } - - AZStd::vector AbstractCodeModel::GetLocalVariablesUser() const - { - AZStd::vector userLocalVariables; - - if (m_variableScopeMeaning == VariableScopeMeaning_LegacyFunctions::FunctionPrototype) - { - for (auto variable : m_variables) - { - if (!variable->m_isMember - && variable->m_sourceVariableId.IsValid() - && !IsSourceInScope(variable, VariableFlags::Scope::Input) - && !IsSourceInScope(variable, VariableFlags::Scope::Output)) - { - userLocalVariables.push_back(variable); - } - } - } - - return userLocalVariables; - } - - VariableScopeMeaning_LegacyFunctions AbstractCodeModel::GetVariableScopeMeaning() const - { - return m_variableScopeMeaning; - } - - bool SubgraphInterface::IsAllInputOutputShared() const - { - return m_isAllInputOutputShared; - } - - void SubgraphInterface::MarkAllInputOutputShared() - { - m_isAllInputOutputShared = true; - } - } // namespace Grammar - - namespace Nodes - { - namespace Core - { - void FunctionCallNode::BuildNodeFromSubgraphInterface - (const AZ::Data::Asset& runtimeAsset - , const SlotExecution::Map& previousMap) - { - // build the node here, from the asset topology, take the node/variable ordering from the function runtime data as a suggestion - // deal with updates and conversions after - const Grammar::SubgraphInterface& subgraphInterface = runtimeAsset.Get()->m_runtimeData.m_interface; - m_prettyName = runtimeAsset.Get()->m_runtimeData.m_name; - - if (!subgraphInterface.IsAllInputOutputShared()) - { - AZ_Error("ScriptCanvas", false, "the current assumption is that there is no way to distinguish between the input/output of different nodelings"); - return; - } - - // for now, all outputs are shared - Grammar::Outputs outputs; - bool sharedOutputInitialized = false; - - SlotExecution::Ins slotMapIns; - SlotExecution::Outs slotMapLatents; - - int slotOffset = 0; - - // add all ins->outs, in their display groups - for (size_t indexIn = 0; indexIn < subgraphInterface.GetInCount(); ++indexIn) - { - const Grammar::In& interfaceIn = subgraphInterface.GetIn(indexIn); - - SlotExecution::In slotMapIn = AddExecutionInSlotFromInterface(interfaceIn, slotOffset++, previousMap.FindInSlotIdBySource(interfaceIn.sourceID)); - if (!slotMapIn.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Execution In slot from sub graph interface"); - return; - } - slotMapIn.inputs = AddDataInputSlotFromInterface(interfaceIn.inputs, interfaceIn.sourceID, interfaceIn.displayName, previousMap, slotOffset); - for (auto& input : slotMapIn.inputs) - { - if (!input.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Input slot from sub graph interface"); - return; - } - } - - for (auto& interfaceOut : interfaceIn.outs) - { - SlotExecution::Out slotMapOut = AddExecutionOutSlotFromInterface(interfaceIn, interfaceOut, slotOffset++, previousMap.FindOutSlotIdBySource(interfaceIn.sourceID, interfaceOut.sourceID)); - if (!slotMapOut.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Execution Out slot from sub graph interface"); - return; - } - if (!sharedOutputInitialized) - { - outputs = interfaceOut.outputs; - sharedOutputInitialized = true; - } - - slotMapIn.outs.push_back(slotMapOut); - } - - slotMapIns.push_back(slotMapIn); - } - - // add all latents in their display groups - for (size_t indexLatent = 0; indexLatent < subgraphInterface.GetLatentOutCount(); ++indexLatent) - { - const Grammar::Out& interfaceLatent = subgraphInterface.GetLatentOut(indexLatent); - - SlotExecution::Out slotMapLatentOut = AddExecutionLatentOutSlotFromInterface(interfaceLatent, slotOffset++, previousMap.FindLatentSlotIdBySource(interfaceLatent.sourceID)); - if (!slotMapLatentOut.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Latent Out slot from sub graph interface"); - return; - } - slotMapLatentOut.returnValues.values = AddDataInputSlotFromInterface(interfaceLatent.returnValues, interfaceLatent.sourceID, interfaceLatent.displayName, previousMap, slotOffset); - for (auto& input : slotMapLatentOut.returnValues.values) - { - if (!input.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Input slot from sub graph interface"); - return; - } - } - - if (!sharedOutputInitialized) - { - outputs = interfaceLatent.outputs; - sharedOutputInitialized = true; - } - - slotMapLatents.push_back(slotMapLatentOut); - } - - // add all outputs one time, since they are currently all required to be part of all the signatures [\todo must fix] , in a variable display group - SlotExecution::Outputs slotMapOutputs = AddDataOutputSlotFromInterface(outputs, "", previousMap, slotOffset); - for (auto& output : slotMapOutputs) - { - if (!output.slotId.IsValid()) - { - AZ_Error("ScriptCanvas", false, "Failed to add Output slot from sub graph interface"); - return; - } - } - if (!subgraphInterface.IsLatent()) - { - for (auto& slotMapIn : slotMapIns) - { - for (auto& slotMapOut : slotMapIn.outs) - { - slotMapOut.outputs = slotMapOutputs; - } - } - } - else - { - for (auto& slotMapLatent : slotMapLatents) - { - slotMapLatent.outputs = slotMapOutputs; - } - } - - // when returning variables: sort variables by source slot id, they are sorted in the slot map, so just take them from the slot map - m_slotExecutionMap = AZStd::move(SlotExecution::Map(AZStd::move(slotMapIns), AZStd::move(slotMapLatents))); - m_slotExecutionMapSourceInterface = subgraphInterface; - m_asset = runtimeAsset; - SignalSlotsReordered(); - } - } // namespace Core - } // namespace Nodes -} - -#endif diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h deleted file mode 100644 index 756537fcc7..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -namespace ScriptCanvas -{ - namespace Grammar - { - enum class VariableScopeMeaning_LegacyFunctions : AZ::u32 - { - ValueInitialization, - FunctionPrototype, - }; - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h index 6ff1010509..12f4199bc4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/PrimitivesDeclarations.h @@ -19,10 +19,6 @@ #include #include -#if defined (FUNCTION_LEGACY_SUPPORT_ENABLED) -#include "FunctionsLegacySupport.h" -#endif - namespace AZ { class ReflectContext; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp index 598671becb..3980fbd044 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.cpp @@ -23,15 +23,6 @@ namespace ScriptCanvas } } - ////////////////// - // BaseTimerNode - ////////////////// - - BaseTimerNode::~BaseTimerNode() - { - StopTimer(); - } - void BaseTimerNode::OnInit() { AZStd::string slotName = GetTimeSlotName(); @@ -74,11 +65,6 @@ namespace ScriptCanvas AddTimeDataSlot(); } - void BaseTimerNode::OnDeactivate() - { - StopTimer(); - } - void BaseTimerNode::ConfigureVisualExtensions() { { @@ -103,54 +89,7 @@ namespace ScriptCanvas return nullptr; } - - void BaseTimerNode::OnSystemTick() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - - if (!AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusConnect(); - } - } - - void BaseTimerNode::OnTick(float delta, AZ::ScriptTimePoint) - { - if (m_timeUnits == TimeUnits::Ticks) - { - m_timerCounter += 1; - } - switch (m_timeUnits) - { - case TimeUnits::Ticks: - m_timerCounter += 1; - break; - case TimeUnits::Milliseconds: - case TimeUnits::Seconds: - m_timerCounter += delta; - break; - default: - break; - } - - while (m_timerCounter > m_timerDuration) - { - if (!m_isActive) - { - break; - } - - m_timerCounter -= m_timerDuration; - - OnTimeElapsed(); - } - } - - int BaseTimerNode::GetTickOrder() - { - return m_tickOrder; - } - + void BaseTimerNode::AddTimeDataSlot() { if (!m_timeSlotId.IsValid()) @@ -174,70 +113,6 @@ namespace ScriptCanvas } } - void BaseTimerNode::StartTimer() - { - StopTimer(); - - m_isActive = true; - - const Datum* datum = FindDatum(m_timeSlotId); - - if (datum) - { - const Data::NumberType* timeAmount = datum->GetAs(); - - if (timeAmount) - { - m_timerDuration = (*timeAmount); - m_timerCounter = 0; - - // Manage the different unit types - if (m_timeUnits == TimeUnits::Ticks) - { - // Remove all of the floating points - m_timerDuration = aznumeric_cast(aznumeric_cast(m_timerDuration)); - } - else if (m_timeUnits == TimeUnits::Milliseconds) - { - m_timerDuration /= 1000.0; - } - } - } - - if (AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusDisconnect(); - } - - if (AZ::SystemTickBus::Handler::BusIsConnected()) - { - AZ::SystemTickBus::Handler::BusDisconnect(); - } - - if (!AZ::IsClose(m_timerDuration, 0.0, DBL_EPSILON)) - { - AZ::SystemTickBus::Handler::BusConnect(); - } - else if (AllowInstantResponse()) - { - while (m_isActive) - { - OnTimeElapsed(); - } - } - } - - void BaseTimerNode::StopTimer() - { - m_isActive = false; - - m_timerCounter = 0.0; - m_timerDuration = 0.0; - - AZ::SystemTickBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } - AZStd::string BaseTimerNode::GetTimeSlotName() const { return GetBaseTimeSlotName(); @@ -283,11 +158,7 @@ namespace ScriptCanvas { return false; } - - void BaseTimerNode::OnTimeElapsed() - { - } - + void BaseTimerNode::ConfigureTimeSlot(DataSlotConfiguration& configuration) { AZ_UNUSED(configuration); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h index ca4306cb6e..172569561c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h @@ -7,10 +7,7 @@ #pragma once -#include - #include - #include namespace ScriptCanvas @@ -23,8 +20,6 @@ namespace ScriptCanvas class BaseTimerNode : public Node , public NodePropertyInterfaceListener - , public AZ::TickBus::Handler - , public AZ::SystemTickBus::Handler { public: @@ -44,32 +39,16 @@ namespace ScriptCanvas "Seconds" }; - virtual ~BaseTimerNode(); - // Node... void OnInit() override; void OnConfigured() override; - void OnDeactivate() override; void ConfigureVisualExtensions() override; NodePropertyInterface* GetPropertyInterface(AZ::Crc32 propertyId) override; - //// - - // SystemTickBus... - void OnSystemTick() override; - //// - - // TickBus... - void OnTick(float delta, AZ::ScriptTimePoint timePoint) override; - int GetTickOrder() override; - //// - + // Method that will handle displaying and viewing of the time slot void AddTimeDataSlot(); - void StartTimer(); - void StopTimer(); - AZStd::string GetTimeSlotName() const; protected: @@ -83,7 +62,6 @@ namespace ScriptCanvas bool IsActive() const; virtual bool AllowInstantResponse() const; - virtual void OnTimeElapsed(); // Store until versioning is complete virtual const char* GetTimeSlotFormat() const { return "Time (%s)"; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp index aef18a9255..d383afe02f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp @@ -112,37 +112,6 @@ namespace ScriptCanvas } } - void ExpressionNodeBase::OnInputSignal(const SlotId& slotId) - { - if (slotId == ExpressionNodeBaseProperty::GetInSlotId(this)) - { - for (const SlotId& dirtySlotId : m_dirtyInputs) - { - auto variableIter = m_slotToVariableMap.find(dirtySlotId); - - if (variableIter != m_slotToVariableMap.end()) - { - PushVariable(variableIter->second, (*FindDatum(dirtySlotId))); - } - } - - m_dirtyInputs.clear(); - - if (m_parseError.IsValidExpression() && m_expressionTree.GetTreeSize() != 0) - { - ExpressionEvaluation::ExpressionResult expressionResult; - ExpressionEvaluation::ExpressionEvaluationRequestBus::BroadcastResult(expressionResult, &ExpressionEvaluation::ExpressionEvaluationRequests::Evaluate, m_expressionTree); - - OnResult(expressionResult); - } - } - } - - void ExpressionNodeBase::OnInputChanged([[maybe_unused]] const Datum& input, const SlotId& slotId) - { - m_dirtyInputs.insert(slotId); - } - bool ExpressionNodeBase::CanDeleteSlot([[maybe_unused]] const SlotId& slotId) const { return m_handlingExtension; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h index 4f8949ba4b..04d5400061 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h @@ -53,10 +53,6 @@ namespace ScriptCanvas void OnInit() override; void OnPostActivate() override; void ConfigureVisualExtensions() override; - - void OnInputSignal(const SlotId& slotId) override; - void OnInputChanged(const Datum& input, const SlotId& slotId) override; - bool CanDeleteSlot(const SlotId& slotId) const override; SlotId HandleExtension(AZ::Crc32 extensionId) override; @@ -110,7 +106,6 @@ namespace ScriptCanvas bool m_isInError = false; AZStd::unordered_map m_slotToVariableMap; - AZStd::unordered_set m_dirtyInputs; AZStd::unordered_map m_slotsByVariables; ExpressionEvaluation::ParsingError m_parseError; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/EqualTo.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/EqualTo.h index 8d597884ed..1e9a821761 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/EqualTo.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/EqualTo.h @@ -41,22 +41,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs == rhs); - - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Greater.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Greater.h index baa4762911..d70158ccd1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Greater.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Greater.h @@ -40,21 +40,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs > rhs); - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h index e9f5c06501..8546956aa6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/GreaterEqual.h @@ -41,21 +41,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs >= rhs); - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Less.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Less.h index b16f447d92..2c54247580 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Less.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/Less.h @@ -40,22 +40,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs < rhs); - - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/LessEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/LessEqual.h index 35364b918f..7f0077588f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/LessEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/LessEqual.h @@ -40,22 +40,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs <= rhs); - - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h index c11ff1ba05..b3f6158aa2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Comparison/NotEqualTo.h @@ -40,22 +40,6 @@ namespace ScriptCanvas } } } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - ComparisonOutcome result(lhs != rhs); - - if (result.IsSuccess()) - { - return Datum(result.GetValue()); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), result.GetError().c_str()); - return Datum(false); - } - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp index 7b840862bd..8afb5138e1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.cpp @@ -75,20 +75,6 @@ namespace ScriptCanvas } } - void ArithmeticExpression::OnInputSignal(const SlotId& slotId) - { - if (slotId == GetSlotId(k_evaluateName)) - { - const Datum output = Evaluate(*FindDatumByIndex(k_datumIndexLHS), *FindDatumByIndex(k_datumIndexRHS)); - if (auto slot = GetSlot(GetOutputSlotId())) - { - PushOutput(output, *slot); - } - - SignalOutput(GetSlotId(k_outName)); - } - } - void ArithmeticExpression::Reflect(AZ::ReflectContext* reflection) { if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) @@ -107,17 +93,6 @@ namespace ScriptCanvas } } - Datum BinaryOperator::Evaluate([[maybe_unused]] const Datum& lhs, [[maybe_unused]] const Datum& rhs) - { - AZ_Assert(false, "Evaluate must be overridden"); - return Datum(); - }; - - void BinaryOperator::OnInputSignal([[maybe_unused]] const SlotId& slot) - { - AZ_Assert(false, "OnInputSignal must be overridden"); - } - void BinaryOperator::OnInit() { { @@ -159,28 +134,6 @@ namespace ScriptCanvas AZ_Assert(false, "InitializeBooleanExpression must be overridden"); } - void BooleanExpression::OnInputSignal(const SlotId& slotId) - { - if (slotId == GetSlotId(k_evaluateName)) - { - const Datum output = Evaluate(*FindDatumByIndex(k_datumIndexLHS), *FindDatumByIndex(k_datumIndexRHS)); - if (auto slot = GetSlot(GetOutputSlotId())) - { - PushOutput(output, *slot); - } - - const bool* result = output.GetAs(); - if (result && *result) - { - SignalOutput(GetSlotId(k_onTrue)); - } - else - { - SignalOutput(GetSlotId(k_onFalse)); - } - } - } - void BooleanExpression::OnInit() { { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h index eb44ce5db1..0558decaeb 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h @@ -31,9 +31,7 @@ namespace ScriptCanvas static const char* k_evaluateName; static const char* k_outName; static const char* k_onTrue; - static const char* k_onFalse; - - + static const char* k_onFalse; protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override @@ -47,12 +45,6 @@ namespace ScriptCanvas void OnInit() override; - // must be overridden with the binary operations - virtual Datum Evaluate(const Datum& lhs, const Datum& rhs); - - // Triggered by the execution signal - void OnInputSignal(const SlotId& slot) override; - SlotId GetOutputSlotId() const; }; @@ -71,10 +63,6 @@ namespace ScriptCanvas protected: // adds Number inputs, adds Number output type void OnInit() override; - - void OnInputSignal(const SlotId& slot) override; - - }; class BooleanExpression @@ -107,9 +95,7 @@ namespace ScriptCanvas protected: // initialize boolean expression, adds boolean output type calls void OnInit() override; - virtual void InitializeBooleanExpression(); - void OnInputSignal(const SlotId& slot) override; - + virtual void InitializeBooleanExpression(); }; // accepts any type, checks for type equality, and then value equality or pointer equality @@ -126,10 +112,8 @@ namespace ScriptCanvas void InitializeBooleanExpression() override; private: - SlotId m_firstSlotId; SlotId m_secondSlotId; - ScriptCanvas::Data::Type m_displayType; }; @@ -144,8 +128,7 @@ namespace ScriptCanvas protected: // adds number types - void InitializeBooleanExpression() override; - + void InitializeBooleanExpression() override; }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp index fb43e41ad8..1575cd2c75 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -59,16 +58,6 @@ namespace ScriptCanvas SetAutoConnectToGraphOwner(m_autoConnectToGraphOwner); } - void EBusEventHandler::OnPostActivate() - { - - } - - void EBusEventHandler::OnDeactivate() - { - Disconnect(); - } - void EBusEventHandler::OnGraphSet() { GraphScopedNodeId scopedNodeId(GetOwningScriptCanvasId(), GetEntityId()); @@ -127,14 +116,6 @@ namespace ScriptCanvas } } - void EBusEventHandler::Connect() - { - } - - void EBusEventHandler::Disconnect() - { - } - AZ::Outcome EBusEventHandler::GetDependencies() const { return AZ::Success(DependencyReport{}); @@ -515,7 +496,6 @@ namespace ScriptCanvas const AZ::BehaviorEBusHandler::BusForwarderEvent& event = events[eventIndex]; AZ_Assert(!event.m_parameters.empty(), "No parameters in event!"); - m_handler->InstallGenericHook(events[eventIndex].m_name, &OnEventGenericHook, this); if (m_eventMap.find(AZ::Crc32(event.m_name)) != m_eventMap.end()) { @@ -621,137 +601,6 @@ namespace ScriptCanvas } } - void EBusEventHandler::OnEvent(const char* eventName, const int /*eventIndex*/, AZ::BehaviorValueParameter* result, const int numParameters, AZ::BehaviorValueParameter* parameters) - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "EBusEventHandler::OnEvent %s", eventName); - - SCRIPTCANVAS_RETURN_IF_ERROR_STATE((*this)); - - auto iter = m_eventMap.find(AZ::Crc32(eventName)); - if (iter == m_eventMap.end()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Invalid event index in Ebus handler"); - return; - } - - EBusEventEntry& ebusEventEntry = iter->second; - - if (!ebusEventEntry.m_shouldHandleEvent || ebusEventEntry.m_isHandlingEvent) - { - AZ_Warning("ScriptCanvas", !ebusEventEntry.m_isHandlingEvent, "Found situation where in handling event(%s::%s) triggered the same event. Possible infinite loop, not handling second call.", GetEBusName().c_str(), eventName); - return; - } - - ebusEventEntry.m_isHandlingEvent = true; - - ebusEventEntry.m_resultEvaluated = !ebusEventEntry.IsExpectingResult(); - - AZ_Assert(ebusEventEntry.m_eventName.compare(eventName) == 0, "Wrong event handled by this EBusEventHandler! received %s, expected %s", eventName, ebusEventEntry.m_eventName.c_str()); - AZ_Assert(numParameters == ebusEventEntry.m_numExpectedArguments, "Wrong number of events passed into EBusEventHandler %s", eventName); - - // route my parameters to the connect nodes input - AZ_Assert(ebusEventEntry.m_parameterSlotIds.size() == numParameters, "Node %s-%s Num parameters = %d, but num output slots = %d", m_ebusName.c_str(), ebusEventEntry.m_eventName.c_str(), numParameters, ebusEventEntry.m_parameterSlotIds.size()); - - for (int parameterIndex(0); parameterIndex < numParameters; ++parameterIndex) - { - const Slot* slot = GetSlot(ebusEventEntry.m_parameterSlotIds[parameterIndex]); - const auto& value = *(parameters + parameterIndex); - const Datum input(value); - - PushOutput(input, (*slot)); - } - - // now, this should pass execution off to the nodes that will push their output into this result input - SignalOutput(ebusEventEntry.m_eventSlotId, ExecuteMode::UntilNodeIsFoundInStack); - - // route executed nodes output to my input, and my input to the result - if (ebusEventEntry.IsExpectingResult()) - { - if (result) - { - if (const Datum* resultInput = FindDatum(ebusEventEntry.m_resultSlotId)) - { - ebusEventEntry.m_resultEvaluated = resultInput->ToBehaviorContext(*result); - AZ_Warning("Script Canvas", ebusEventEntry.m_resultEvaluated, "Script Canvas failed to write a value back to the caller!"); - } - else - { - AZ_Warning("Script Canvas", false, "Script Canvas handler expecting a result, but had no ability to return it"); - } - } - else - { - AZ_Warning("Script Canvas", false, "Script Canvas handler is expecting a result, but was called without expecting one!"); - } - } - else - { - AZ_Warning("Script Canvas", !result, "Script Canvas handler is not expecting a result, but was called expecting one!"); - } - - // route executed nodes output to my input, and my input to the result - AZ_Warning("Script Canvas", (result != nullptr) == ebusEventEntry.IsExpectingResult(), "Node %s-%s mismatch between expecting a result and getting one!", m_ebusName.c_str(), ebusEventEntry.m_eventName.c_str()); - AZ_Warning("Script Canvas", ebusEventEntry.m_resultEvaluated, "Node %s-%s result not evaluated properly!", m_ebusName.c_str(), ebusEventEntry.m_eventName.c_str()); - - ebusEventEntry.m_isHandlingEvent = false; - } - - void EBusEventHandler::OnInputSignal(const SlotId& slotId) - { - SlotId connectSlot = EBusEventHandlerProperty::GetConnectSlotId(this); - SlotId disconnectSlot = EBusEventHandlerProperty::GetDisconnectSlotId(this); - - if (connectSlot == slotId) - { - if (IsIDRequired()) - { - const Datum* busIdDatum = FindDatum(GetSlotId(c_busIdName)); - - if (!busIdDatum || busIdDatum->Empty()) - { - SlotId failureSlot = EBusEventHandlerProperty::GetOnFailureSlotId(this); - SignalOutput(failureSlot); - SCRIPTCANVAS_REPORT_ERROR((*this), "In order to connect this node, a valid BusId must be provided."); - return; - } - } - - Disconnect(); - Connect(); - - SlotId onConnectSlotId = EBusEventHandlerProperty::GetOnConnectedSlotId(this); - SignalOutput(onConnectSlotId); - return; - } - else if (disconnectSlot == slotId) - { - Disconnect(); - - SlotId onDisconnectSlotId = EBusEventHandlerProperty::GetOnDisconnectedSlotId(this); - SignalOutput(onDisconnectSlotId); - return; - } - } - - void EBusEventHandler::OnInputChanged(const Datum& /*input*/, const SlotId& /*slotId*/) - { - /* - if (GetExecutionType() == ExecutionType::Runtime - && m_autoConnectToGraphOwner - && slotId == FindSlotIdForDescriptor(c_busIdName, SlotDescriptors::DataIn())) - { - Disconnect(); - Connect(); - } - */ - } - - void EBusEventHandler::OnEventGenericHook(void* userData, const char* eventName, int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters) - { - EBusEventHandler* handler(reinterpret_cast(userData)); - handler->OnEvent(eventName, eventIndex, result, numParameters, parameters); - } - void EBusEventHandler::OnWriteEnd() { AZStd::lock_guard lock(m_mutex); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h index 5fad1ecec2..54776f18de 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h @@ -78,9 +78,6 @@ namespace ScriptCanvas void OnInit() override; void OnActivate() override; - void OnPostActivate() override; - void OnDeactivate() override; - void OnGraphSet() override; void CollectVariableReferences(AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const override; @@ -96,16 +93,10 @@ namespace ScriptCanvas void InitializeEvent(int eventIndex); - bool IsOutOfDate(const VersionData& graphVersion) const override; - - + bool IsOutOfDate(const VersionData& graphVersion) const override; bool CreateHandler(AZStd::string_view ebusName); - - void Connect(); - - void Disconnect(); - + const EBusEventEntry* FindEventWithSlot(const Slot& slot) const; AZ::Outcome GetFunctionCallName(const Slot* /*slot*/) const override; @@ -166,16 +157,10 @@ namespace ScriptCanvas inline bool IsConfigured() const { return !m_eventMap.empty(); } - void OnEvent(const char* eventName, const int eventIndex, AZ::BehaviorValueParameter* result, const int numParameters, AZ::BehaviorValueParameter* parameters); - - void OnInputSignal(const SlotId&) override; - void OnInputChanged(const Datum& input, const SlotId& slotID) override; - private: EBusEventHandler(const EBusEventHandler&) = delete; - static void OnEventGenericHook(void* userData, const char* eventName, int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters); - + EventMap m_eventMap; AZStd::string m_ebusName; ScriptCanvas::EBusBusId m_busId; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp index c8defb77ec..43fc8ed54b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp @@ -63,43 +63,6 @@ namespace ScriptCanvas } } - void GetVariableNode::OnInputSignal(const SlotId& slotID) - { - if (slotID == GetSlotId("In")) - { - SC_EXECUTION_TRACE_ANNOTATE_NODE((*this), CreateAnnotationData()); - - if (m_variableView.IsValid()) - { - Slot* resultSlot = GetSlot(m_variableDataOutSlotId); - if (resultSlot) - { - const Datum* inputDatum = m_variableView.GetDatum(); - - PushOutput(*inputDatum, *resultSlot); - - // Push the data for each property slot out as well - for (auto&& propertyAccount : m_propertyAccounts) - { - Slot* propertySlot = GetSlot(propertyAccount.m_propertySlotId); - if (propertySlot && propertyAccount.m_getterFunction) - { - auto outputOutcome = propertyAccount.m_getterFunction(*inputDatum); - if (!outputOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), outputOutcome.TakeError().data()); - return; - } - PushOutput(outputOutcome.TakeValue(), *propertySlot); - } - } - } - } - - SignalOutput(GetSlotId("Out")); - } - } - void GetVariableNode::CollectVariableReferences(AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const { if (m_variableId.IsValid()) @@ -324,8 +287,9 @@ namespace ScriptCanvas ScriptCanvas::Data::Type baseType = ScriptCanvas::Data::Type::Invalid(); VariableRequestBus::EventResult(baseType, GetScopedVariableId(), &VariableRequests::GetType); - const GraphVariableMapping* variableMap = GetRuntimeBus()->GetVariables(); - + const GraphVariableMapping* variableMap = nullptr; + GraphRequestBus::EventResult(variableMap, *GraphNotificationBus::GetCurrentBusId(), &GraphRequests::GetVariables); + if (variableMap && baseType.IsValid()) { for (const auto& variablePair : *variableMap) @@ -360,12 +324,6 @@ namespace ScriptCanvas VariableNodeNotificationBus::Event(GetEntityId(), &VariableNodeNotifications::OnVariableRemovedFromNode, removedVariableId); } - AnnotateNodeSignal GetVariableNode::CreateAnnotationData() - { - AZ::EntityId assetNodeId = GetRuntimeBus()->FindAssetNodeIdByRuntimeNodeId(GetEntityId()); - return AnnotateNodeSignal(CreateGraphInfo(GetOwningScriptCanvasId(), GetGraphIdentifier()), AnnotateNodeSignal::AnnotationLevel::Info, m_variableName, AZ::NamedEntityId(assetNodeId, GetNodeName())); - } - VariableId GetVariableNode::GetVariableIdRead(const Slot*) const { return m_variableId; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h index e5011de5c6..a73d6b27b3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h @@ -64,7 +64,6 @@ namespace ScriptCanvas void OnInit() override; void OnPostActivate() override; - void OnInputSignal(const SlotId&) override; void AddOutputSlot(); void RemoveOutputSlot(); @@ -78,8 +77,6 @@ namespace ScriptCanvas void OnVariableRemoved() override; //// - AnnotateNodeSignal CreateAnnotationData(); - // Adds/Remove Property Slots from the GetVariable node void AddPropertySlots(const Data::Type& type); void ClearPropertySlots(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp index 144427d74c..ea3f2015b1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp @@ -11,105 +11,6 @@ namespace ScriptCanvas { - int CountMatchingInputTypes(const Grammar::FunctionPrototype& a, const Grammar::FunctionPrototype& b, const AZStd::vector& checkedIndices) - { - AZ_Warning("ScriptCanvas", a.m_inputs.size() == b.m_inputs.size(), "Function inputs are not the same size"); - - int matching = 0; - - if (a.m_inputs.size() == b.m_inputs.size()) - { - if (checkedIndices.empty()) - { - for (size_t index = 0; index < a.m_inputs.size(); ++index) - { - if (!a.m_inputs[index]->m_datum.GetType().IsValid() - || a.m_inputs[index]->m_datum.GetType() == b.m_inputs[index]->m_datum.GetType()) - { - ++matching; - } - } - } - else - { - for (const auto checkedIndex : checkedIndices) - { - const auto index = checkedIndices[checkedIndex]; - - if (index < a.m_inputs.size()) - { - if (!a.m_inputs[index]->m_datum.GetType().IsValid() - || a.m_inputs[index]->m_datum.GetType() == b.m_inputs[index]->m_datum.GetType()) - { - ++matching; - } - } - else - { - AZ_Error("ScriptCanvas", false, "Overload checked index is no longer valid"); - } - } - } - } - - return matching; - } - - BehaviorContextMethodHelper::CallResult BehaviorContextMethodHelper::Call(Node& node, bool isExpectingMultipleResults, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, AZStd::vector& resultSlotIds) - { - if (isExpectingMultipleResults) - { - return BehaviorContextMethodHelper::Call(node, method, paramBegin, paramEnd, resultSlotIds); - } - else - { - return BehaviorContextMethodHelper::Call(node, method, paramBegin, paramEnd, resultSlotIds[0]); - } - } - - BehaviorContextMethodHelper::CallResult BehaviorContextMethodHelper::Call(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, SlotId resultSlotId) - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Method::OnInputSignal::Call %s", method->m_name.c_str()); - return CallGeneric(node, method, paramBegin, paramEnd, &AttemptCallWithResults, resultSlotId); - } - - BehaviorContextMethodHelper::CallResult BehaviorContextMethodHelper::Call(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, AZStd::vector& resultSlotIds) - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Method::OnInputSignal::Call %s", method->m_name.c_str()); - return CallGeneric(node, method, paramBegin, paramEnd, &AttemptCallWithTupleResults, resultSlotIds); - } - - AZ::Outcome BehaviorContextMethodHelper::AttemptCallWithResults(Node&, const AZ::BehaviorMethod*, AZ::BehaviorValueParameter*, unsigned int, SlotId) - { - return AZ::Failure(AZStd::string("This method is slated for deletion")); - } - - AZ::Outcome BehaviorContextMethodHelper::AttemptCallWithTupleResults(Node&, const AZ::BehaviorMethod*, AZ::BehaviorValueParameter*, unsigned int, AZStd::vector) - { - return AZ::Failure(AZStd::string("This method is slated for deletion")); - } - - AZ::Outcome BehaviorContextMethodHelper::CallTupleGetMethod(const AZ::BehaviorMethod*, Datum&) - { - return AZ::Failure(AZStd::string("This method is slated for deletion")); - } - - AZ::Outcome BehaviorContextMethodHelper::CallOutcomeTupleMethod(Node&, const SlotId&, Datum&, size_t, AZStd::string) - { - return AZ::Failure(AZStd::string("to be deleted")); - } - - AZ::BehaviorValueParameter BehaviorContextMethodHelper::ToBehaviorValueParameter(const AZ::BehaviorMethod* method, size_t index, const Datum& datum) - { - const AZ::BehaviorParameter* datumParam = method->GetArgument(index); - auto toParamOutcome = datumParam ? datum.ToBehaviorValueParameter(*datumParam) : AZ::Failure(AZStd::string::format("BehaviorMethod contains nullptr BehaviorParameter at index %zu", index)); - if (toParamOutcome) - { - return AZ::BehaviorValueParameter(toParamOutcome.TakeValue()); - } - return AZ::BehaviorValueParameter(); - } - AZStd::unordered_map GetTupleGetMethodsFromResult(const AZ::BehaviorMethod& method) { if (method.HasResult()) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h index 92248d3ac6..890cb2427d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h @@ -19,202 +19,9 @@ namespace ScriptCanvas::Grammar namespace ScriptCanvas { - int CountMatchingInputTypes(const Grammar::FunctionPrototype& a, const Grammar::FunctionPrototype& b, const AZStd::vector& checkedIndices); - - struct BehaviorContextMethodHelper - { - enum BehaviorContextInputOutput : size_t - { - MaxCount = 40, - }; - - enum class MethodCallStatus - { - NotAttempted = 0, - Attempted, - Failed, - Succeeded, - }; - - struct CallResult - { - const MethodCallStatus m_status = MethodCallStatus::NotAttempted; - const AZStd::string m_executionOutOverride = "Out"; - - AZ_INLINE CallResult(const MethodCallStatus status, AZStd::string executionOutOverride = "Out") - : m_status(status) - , m_executionOutOverride(executionOutOverride) - {} - }; - - template - static CallResult CallGeneric(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, t_Call attempt, t_Slots& slots); - - static CallResult Call(Node& node, bool isExpectingMultipleResults, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, AZStd::vector& resultSlotIds); - static CallResult Call(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, SlotId resultSlotId); - static CallResult Call(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, AZStd::vector& resultSlotIds); - static AZ::Outcome AttemptCallWithResults(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* params, unsigned int numExpectedArgs, SlotId resultSlotId); - static AZ::Outcome AttemptCallWithTupleResults(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* params, unsigned int numExpectedArgs, AZStd::vector resultSlotIds); - - template - static AZ::Outcome CallMethodOnDatum(const Datum& input, AZStd::string_view methodName, Args&& ... args); - - template - static AZ::Outcome CallMethodOnDatumUnpackOutcomeSuccess(const Datum& input, AZStd::string_view methodName, Args&& ... args); - - template - static AZStd::vector CreateParameterList(const AZ::BehaviorMethod* method, Args&&... args); - - static AZ::Outcome CallTupleGetMethod(const AZ::BehaviorMethod* method, Datum& thisPointer); - - private: - static AZ::Outcome CallOutcomeTupleMethod(Node& node, const SlotId& resultSlotId, Datum& outcomeDatum, size_t index, AZStd::string outSlotName); - static AZ::BehaviorValueParameter ToBehaviorValueParameter(const AZ::BehaviorMethod* method, size_t index, const Datum& datum); - - template - static AZ::BehaviorValueParameter ToBehaviorValueParameter(const AZ::BehaviorMethod*, size_t, const T& arg); - - template - static AZStd::vector CreateParameterListInternal(const AZ::BehaviorMethod* method, AZStd::index_sequence, Args&&... args); - }; - AZStd::unordered_map GetTupleGetMethodsFromResult(const AZ::BehaviorMethod& method); AZStd::unordered_map GetTupleGetMethods(const AZ::TypeId& typeId); AZ::Outcome GetTupleGetMethod(const AZ::TypeId& typeID, size_t index); - - template - BehaviorContextMethodHelper::CallResult BehaviorContextMethodHelper::CallGeneric(Node& node, const AZ::BehaviorMethod* method, AZ::BehaviorValueParameter* paramBegin, AZ::BehaviorValueParameter* paramEnd, t_Call attempt, t_Slots& slots) - { - const auto numExpectedArgs(static_cast(method->GetNumArguments())); - if ((paramEnd - paramBegin) == numExpectedArgs) - { - AZ::Outcome withResultsOutcome = attempt(node, method, paramBegin, numExpectedArgs, slots); - - if (!withResultsOutcome.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((node), "Script Canvas attempt to call %s with a result failed: %s", method->m_name.data(), withResultsOutcome.GetError().data()); - return CallResult(MethodCallStatus::Failed); - } - else if (withResultsOutcome.GetValue().m_status == MethodCallStatus::Attempted) - { - return CallResult(MethodCallStatus::Succeeded, withResultsOutcome.GetValue().m_executionOutOverride); - } - else if (method->Call(paramBegin, numExpectedArgs)) - { - return CallResult(MethodCallStatus::Succeeded); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((node), "Script Canvas attempt to call %s failed", method->m_name.data()); - return CallResult(MethodCallStatus::Failed); - } - } - else - { - SCRIPTCANVAS_REPORT_ERROR((node), "Script Canvas attempt to call %s failed, it expects %d args but called with %d", method->m_name.c_str(), numExpectedArgs, paramEnd - paramBegin); - return CallResult(MethodCallStatus::NotAttempted); - } - } - - template - AZ::Outcome BehaviorContextMethodHelper::CallMethodOnDatumUnpackOutcomeSuccess(const Datum& input, AZStd::string_view methodName, Args&& ... args) - { - AZ::Outcome methodCallResult = CallMethodOnDatum(input, methodName, args...); - if (methodCallResult.IsSuccess()) - { - // Even when successfully called, the method will return an outcome as the result, we need to test that - // outcome in case any errors were returned from the invoked function call. - const Datum& methodCallResultDatum = methodCallResult.GetValue(); - - const auto* actualOutcome = methodCallResultDatum.GetAs>(); - if (actualOutcome && !actualOutcome->IsSuccess()) - { - return AZ::Failure(AZStd::string::format("%s returned an error: %s", methodName.data(), actualOutcome->GetError().c_str())); - } - - AZ::Outcome isSuccessCallResult = CallMethodOnDatum(methodCallResult.GetValue(), "IsSuccess"); - if (isSuccessCallResult.IsSuccess()) - { - if (*isSuccessCallResult.GetValue().GetAs()) - { - return CallMethodOnDatum(methodCallResult.GetValue(), "GetValue"); - } - else - { - return AZ::Failure(AZStd::string::format("%s returned an error", methodName.data())); - } - } - else - { - return AZ::Failure(AZStd::string::format("Script Canvas attempt to call %s failed, Failed to query result Outcome success", methodName.data())); - } - } - else - { - return AZ::Failure(methodCallResult.GetError()); - } - - return methodCallResult; - } - - template - AZ::Outcome BehaviorContextMethodHelper::CallMethodOnDatum(const Datum& input, AZStd::string_view methodName, Args&& ... args) - { - const AZ::BehaviorClass* behaviorClass = AZ::BehaviorContextHelper::GetClass(input.GetType().GetAZType()); - if (behaviorClass) - { - auto methodIt = behaviorClass->m_methods.find(methodName); - - if (methodIt != behaviorClass->m_methods.end()) - { - AZ::BehaviorMethod* method = methodIt->second; - - const AZ::BehaviorParameter* resultType = method->HasResult() ? method->GetResult() : nullptr; - - if (resultType) - { - // Populate parameters - AZStd::vector parameters = CreateParameterList(method, input, AZStd::forward(args)...); - return Datum::CallBehaviorContextMethodResult(method, resultType, parameters.begin(), (unsigned int)AZStd::GetMin(parameters.size(), method->GetNumArguments()), behaviorClass->m_name); - } - else - { - AZStd::vector parameters = CreateParameterList(method, input, AZStd::forward(args)...); - if (Datum::CallBehaviorContextMethod(method, parameters.begin(), (unsigned int)AZStd::GetMin(parameters.size(), method->GetNumArguments())).IsSuccess()) - { - return AZ::Success(Datum()); - } - } - } - else - { - return AZ::Failure(AZStd::string::format("ScriptCanvas Behavior Context method call failed; method named \"%s\" not found.", methodName.data())); - } - } - - return AZ::Failure(AZStd::string::format("ScriptCanvas Behavior Context method call failed; unable to retrieve Behavior Class.")); - } - - template - AZStd::vector BehaviorContextMethodHelper::CreateParameterList(const AZ::BehaviorMethod* method, Args&&... args) - { - // Create an index sequence for the parameters and forward the arguments - return CreateParameterListInternal(method, AZStd::make_index_sequence{}, AZStd::forward(args)...); - } - - template - AZ::BehaviorValueParameter BehaviorContextMethodHelper::ToBehaviorValueParameter(const AZ::BehaviorMethod*, size_t, const T& arg) - { - return AZ::BehaviorValueParameter(&arg); - } - - template - AZStd::vector BehaviorContextMethodHelper::CreateParameterListInternal(const AZ::BehaviorMethod* method, AZStd::index_sequence, Args&&... args) - { - // Unpack the arguments and the index sequence to populate the parameter list - return { ToBehaviorValueParameter(method, Indices, args)... }; - } - } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp index b797174f59..17f2242b90 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp @@ -12,8 +12,8 @@ #include #include +#include #include -#include #include #include @@ -75,7 +75,7 @@ namespace ScriptCanvas AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, asset.GetId()); AZStd::string graphAssetName; - RuntimeRequestBus::EventResult(graphAssetName, GetOwningScriptCanvasId(), &RuntimeRequests::GetAssetName); + GraphRequestBus::EventResult(graphAssetName, GetOwningScriptCanvasId(), &GraphRequests::GetAssetName); AZ_Error("Script Event", false, "The Script Event asset (%s) has been modified. Open the graph (%s) and re-save it.", assetInfo.m_relativePath.c_str(), graphAssetName.c_str()); return; @@ -325,197 +325,16 @@ namespace ScriptCanvas } } - void ReceiveScriptEvent::OnEvent(const char* eventName, const int, AZ::BehaviorValueParameter* result, const int numParameters, AZ::BehaviorValueParameter* parameters) - { - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ReceiveScriptEvent::OnEvent %s", eventName); - - SCRIPTCANVAS_RETURN_IF_ERROR_STATE((*this)); - - ScriptEvents::Method method; - if (!GetScriptEvent().FindMethod(eventName, method)) - { - AZ_Warning("Script Events", false, "Failed to find method: %s when trying to handle it.", eventName); - return; - } - - auto iter = m_eventMap.find(AZ::Crc32(method.GetNameProperty().GetId().ToString().c_str())); - if (iter == m_eventMap.end()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Invalid event index in Ebus handler"); - return; - } - - Internal::ScriptEventEntry& scriptEventEntry = iter->second; - - if (!scriptEventEntry.m_shouldHandleEvent || scriptEventEntry.m_isHandlingEvent) - { - AZ_Warning("ScriptCanvas", !scriptEventEntry.m_isHandlingEvent, "Found situation where in handling event(%s::%s) triggered the same event. Possible infinite loop, not handling second call.", GetScriptEvent().GetName().c_str(), eventName); - return; - } - - scriptEventEntry.m_isHandlingEvent = true; - - scriptEventEntry.m_resultEvaluated = !scriptEventEntry.IsExpectingResult(); - - // route the parameters to the connect nodes input - if (scriptEventEntry.m_parameterSlotIds.size() != numParameters) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "The Script Event, %s, has %d parameters. While the ScriptCanvas Node (%s) has (%zu) slots. Make sure the node is updated in the Script Canvas graph.", eventName, numParameters, GetNodeName().c_str(), scriptEventEntry.m_parameterSlotIds.size()); - } - else - { - for (int parameterIndex(0); parameterIndex < numParameters; ++parameterIndex) - { - const Slot* slot = GetSlot(scriptEventEntry.m_parameterSlotIds[parameterIndex]); - const auto& value = *(parameters + parameterIndex); - const Datum input(value); - - if (slot->IsTypeMatchFor(input.GetType())) - { - PushOutput(input, *slot); - } - else - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Type mismatch in Script Event %s on ScriptCanvas Node (%s). Make sure the nodes is updated in the Script Canvas graph", eventName, GetNodeName().c_str()); - } - } - } - - { - // now, this should pass execution off to the nodes that will push their output into this result input - SignalOutput(scriptEventEntry.m_eventSlotId, ExecuteMode::UntilNodeIsFoundInStack); - } - - // route executed nodes output to my input, and my input to the result - if (scriptEventEntry.IsExpectingResult()) - { - if (result) - { - if (const Datum* resultInput = FindDatum(scriptEventEntry.m_resultSlotId)) - { - scriptEventEntry.m_resultEvaluated = resultInput->ToBehaviorContext(*result); - AZ_Warning("Script Canvas", scriptEventEntry.m_resultEvaluated, "%s expects a result value of type %s to be provided, got %s", scriptEventEntry.m_eventName.c_str(), Data::GetName(resultInput->GetType()).c_str(), result->m_name); - } - else - { - AZ_Warning("Script Canvas", false, "Script Canvas handler expecting a result, but had no ability to return it"); - } - } - else - { - AZ_Warning("Script Canvas", false, "Script Canvas handler is expecting a result, but was called without receiving one!"); - } - } - else - { - AZ_Warning("Script Canvas", !result, "Script Canvas handler is not expecting a result, but was called receiving one!"); - } - - // route executed nodes output to my input, and my input to the result - AZ_Warning("Script Canvas", (result != nullptr) == scriptEventEntry.IsExpectingResult(), "Node %s-%s mismatch between expecting a result and getting one!", m_ebus->m_name.c_str(), scriptEventEntry.m_eventName.c_str()); - AZ_Warning("Script Canvas", scriptEventEntry.m_resultEvaluated, "Node %s-%s result not evaluated properly!", m_ebus->m_name.c_str(), scriptEventEntry.m_eventName.c_str()); - - scriptEventEntry.m_isHandlingEvent = false; - } - void ReceiveScriptEvent::OnActivate() { SetAutoConnectToGraphOwner(m_autoConnectToGraphOwner); ScriptEventBase::OnActivate(); } - void ReceiveScriptEvent::OnPostActivate() - { - - } - void ReceiveScriptEvent::OnDeactivate() { - Disconnect(false); - ScriptEventBase::OnDeactivate(); - } - - void ReceiveScriptEvent::Connect() - { - AZ::EntityId connectToEntityId; - AZ::BehaviorValueParameter busIdParameter; - busIdParameter.Set(m_ebus->m_idParam); - const AZ::Uuid busIdType = m_ebus->m_idParam.m_typeId; - - const Datum* busIdDatum = IsIDRequired() ? FindDatum(GetSlotId(c_busIdName)) : nullptr; - if (busIdDatum && !busIdDatum->Empty()) - { - if (busIdDatum->IS_A(Data::FromAZType(busIdType)) || busIdDatum->IsConvertibleTo(Data::FromAZType(busIdType))) - { - auto busIdOutcome = busIdDatum->ToBehaviorValueParameter(m_ebus->m_idParam); - if (busIdOutcome.IsSuccess()) - { - busIdParameter = busIdOutcome.TakeValue(); - } - } - - if (busIdType == azrtti_typeid()) - { - if (auto busEntityId = busIdDatum->GetAs()) - { - if (!busEntityId->IsValid() || *busEntityId == ScriptCanvas::GraphOwnerId) - { - RuntimeRequestBus::EventResult(connectToEntityId, GetOwningScriptCanvasId(), &RuntimeRequests::GetRuntimeEntityId); - busIdParameter.m_value = &connectToEntityId; - } - } - } - } - - if (!IsIDRequired() || busIdParameter.GetValueAddress()) - { - if (m_connected) - { - // Ensure we disconnect if this bus is already connected, this could happen if a different bus Id is provided - // and this node is connected through the Connect slot. - m_handler->Disconnect(); - } - - AZ_VerifyError("Script Canvas", m_handler->Connect(&busIdParameter), - "Unable to connect to EBus with BusIdType %s. The BusIdType of the Script Event (%s) does not match the BusIdType provided.", - busIdType.ToString().data(), m_definition.GetName().c_str()); - - m_connected = true; - } - } - - void ReceiveScriptEvent::CompleteDisconnection() - { - m_handler->Disconnect(); - m_connected = false; - - if (IsActivated()) - { - SlotId onDisconnectSlotId = ReceiveScriptEventProperty::GetOnDisconnectedSlotId(this); - SignalOutput(onDisconnectSlotId); - } - } - - void ReceiveScriptEvent::Disconnect(bool queueDisconnect) - { - if (m_connected && m_handler) - { - if (queueDisconnect) - { - AZ::SystemTickBus::QueueFunction( - [this]() - { - CompleteDisconnection(); - } - ); - } - else - { - CompleteDisconnection(); - } - } - } + } const Internal::ScriptEventEntry* ReceiveScriptEvent::FindEventWithSlot(const Slot& slot) const { @@ -771,51 +590,6 @@ namespace ScriptCanvas return true; } - void ReceiveScriptEvent::OnInputSignal(const SlotId& slotId) - { - SlotId connectSlot = ReceiveScriptEventProperty::GetConnectSlotId(this); - - if (connectSlot == slotId) - { - const Datum* busIdDatum = FindDatum(GetSlotId(c_busIdName)); - if (IsIDRequired() && (!busIdDatum || busIdDatum->Empty())) - { - SlotId failureSlot = ReceiveScriptEventProperty::GetOnFailureSlotId(this); - SignalOutput(failureSlot); - SCRIPTCANVAS_REPORT_ERROR((*this), "In order to connect this node, a valid BusId must be provided."); - return; - } - else - { - Connect(); - SlotId onConnectSlotId = ReceiveScriptEventProperty::GetOnConnectedSlotId(this); - SignalOutput(onConnectSlotId); - return; - } - } - - SlotId disconnectSlot = ReceiveScriptEventProperty::GetDisconnectSlotId(this); - if (disconnectSlot == slotId) - { - Disconnect(); - - return; - } - } - - void ReceiveScriptEvent::OnInputChanged(const Datum&, const SlotId&) - { - /* - if (GetExecutionType() == ExecutionType::Runtime - && m_autoConnectToGraphOwner - && slotId == FindSlotIdForDescriptor(c_busIdName, SlotDescriptors::DataIn())) - { - Disconnect(false); - Connect(); - } - */ - } - bool ReceiveScriptEvent::IsOutOfDate(const VersionData& graphVersion) const { AZ_UNUSED(graphVersion); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h index e541f428db..d1aa439b42 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h @@ -87,16 +87,9 @@ namespace ScriptCanvas private: - void Connect(); - void Disconnect(bool queueDisconnect = true); - void CompleteDisconnection(); - bool CreateEbus(); bool SetupHandler(); - void OnInputSignal(const SlotId& slotId) override; - void OnInputChanged(const Datum& input, const SlotId& slotId) override; - AZ::BehaviorEBusHandler* m_handler = nullptr; AZ::BehaviorEBus* m_ebus = nullptr; AZStd::recursive_mutex m_mutex; // post-serialization @@ -105,9 +98,6 @@ namespace ScriptCanvas void InitializeEvent(AZ::Data::Asset asset, int eventIndex, SlotIdMapping& populationMapping); - static void OnEventGenericHook(void* userData, const char* eventName, int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters); - void OnEvent(const char* eventName, const int eventIndex, AZ::BehaviorValueParameter* result, const int numParameters, AZ::BehaviorValueParameter* parameters); - bool IsEventConnected(const Internal::ScriptEventEntry& entry) const; Internal::ScriptEventEntry ConfigureEbusEntry(const ScriptEvents::Method& methodDefinition, const AZ::BehaviorEBusHandler::BusForwarderEvent& event, SlotIdMapping& populationMapping); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp index 3ff8545746..964c2b8454 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp @@ -74,28 +74,6 @@ namespace ScriptCanvas } } } - - void Repeater::OnInputSignal(const SlotId&) - { - m_repetionCount = aznumeric_cast(RepeaterProperty::GetRepetitions(this)); - - if (m_repetionCount > 0) - { - StartTimer(); - } - } - - void Repeater::OnTimeElapsed() - { - m_repetionCount--; - SignalOutput(RepeaterProperty::GetActionSlotId(this), ScriptCanvas::ExecuteMode::UntilNodeIsFoundInStack); - - if (m_repetionCount == 0) - { - StopTimer(); - SignalOutput(RepeaterProperty::GetCompleteSlotId(this)); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h index 3d094feb78..0cd9c73c98 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h @@ -17,6 +17,7 @@ namespace ScriptCanvas namespace Core { //! A node that repeats an execution signal over the specified time + //! Deprecated for nodeable version class Repeater : public ScriptCanvas::Nodes::Internal::BaseTimerNode { @@ -27,18 +28,11 @@ namespace ScriptCanvas void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - void OnTimeElapsed(); - const char* GetTimeSlotFormat() const override { return "Delay (%s)"; } - const char* GetBaseTimeSlotName() const override { return "Interval"; } const char* GetBaseTimeSlotToolTip() const override { return "The Interval between repetitions"; } protected: - - bool AllowInstantResponse() const override { return true; } - int m_repetionCount; }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp index ac946dc037..45314b73f3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp @@ -10,8 +10,6 @@ #include #include #include - -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h index d2ec893b5b..5b2104f5dd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h @@ -106,9 +106,7 @@ namespace ScriptCanvas AZStd::pair, bool> IsAssetOutOfDate() const; - virtual void Initialize(const AZ::Data::AssetId assetId); - - + virtual void Initialize(const AZ::Data::AssetId assetId); protected: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp index ee1d00e646..345fb5e5e8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp @@ -28,64 +28,6 @@ namespace ScriptCanvas ScriptEvents::ScriptEventNotificationBus::Handler::BusDisconnect(); } - void SendScriptEvent::OnInputSignal(const SlotId&) - { - if (!m_method) - { - if (!m_asset.IsReady()) - { - m_asset = AZ::Data::AssetManager::Instance().GetAsset(m_scriptEventAssetId, AZ::Data::AssetLoadBehavior::PreLoad); - } - - CreateSender(m_asset); - } - - if (!m_method) - { - AZStd::string error = AZStd::string::format("Script Event sender node called with no initialized method (%s::%s)!", m_busName.c_str(), m_eventName.c_str()); - SCRIPTCANVAS_REPORT_ERROR((*this), error.c_str()); - } - - if (m_method) - { - Node::DatumVector inputDatums = GatherDatumsForDescriptor(SlotDescriptors::DataIn()); - - if (m_method->GetNumArguments() != inputDatums.size()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "The Script Event %s number of parameters %d do not correspond to the number of slots %zu in the Script Canvas node (%s). Make sure the node is updated in the Script Canvas graph.", m_method->m_name.c_str(), m_method->GetNumArguments(), inputDatums.size(), GetNodeName().c_str()); - return; - } - - AZStd::array params; - AZ::BehaviorValueParameter* paramFirst(params.begin()); - AZ::BehaviorValueParameter* paramIter = paramFirst; - { - // all input should have been pushed into this node already - int argIndex(0); - for (const Datum* datum : inputDatums) - { - AZ::Outcome inputParameter = datum->ToBehaviorValueParameter(*m_method->GetArgument(argIndex)); - if (!inputParameter.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "BehaviorContext method input problem at parameter index %d: %s", argIndex, inputParameter.GetError().data()); - return; - } - - paramIter->Set(inputParameter.GetValue()); - ++paramIter; - ++argIndex; - } - - AZ_PROFILE_SCOPE_DYNAMIC(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::ScriptEvents::OnInputSignal::Call %s::%s", m_busName.c_str(), m_eventName.c_str()); - { - BehaviorContextMethodHelper::Call(*this, m_method, paramFirst, paramIter, m_resultSlotID); - } - } - } - - SignalOutput(GetSlotId("Out")); - } - ScriptCanvas::EBusBusId SendScriptEvent::GetBusId() const { return m_busId; @@ -155,11 +97,6 @@ namespace ScriptCanvas AZ::Outcome IsExposable(const AZ::BehaviorMethod& method) { - if (method.GetNumArguments() > BehaviorContextMethodHelper::MaxCount) - { - return AZ::Failure(AZStd::string("Too many arguments for a Script Canvas method")); - } - for (size_t argIndex(0), sentinel(method.GetNumArguments()); argIndex != sentinel; ++argIndex) { if (const AZ::BehaviorParameter* argument = method.GetArgument(argIndex)) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h index 27cd309386..7490fef650 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.h @@ -79,11 +79,7 @@ namespace ScriptCanvas bool IsConfigured() const { return m_method != nullptr; } void ConfigureMethod(AZ::BehaviorMethod& method); bool RegisterScriptEvent(AZ::Data::Asset asset); - - void OnInputSignal(const SlotId&) override; - void AddInputSlot(size_t slotIndex, size_t argIndex, const AZStd::string_view argName, const AZStd::string_view tooltip, AZ::BehaviorMethod* method, const AZ::BehaviorParameter* argument, AZ::Uuid slotKey, SlotIdMapping& populationMapping); - void OnRegistered(const ScriptEvents::ScriptEvent&) override; SlotId m_resultSlotID; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp index 7096f5024e..25a73bc7ce 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp @@ -59,47 +59,6 @@ namespace ScriptCanvas } } - void SetVariableNode::OnInputSignal(const SlotId& slotID) - { - if (slotID == GetSlotId(GetInputSlotName())) - { - const Datum* sourceDatum = FindDatum(m_variableDataInSlotId); - - if (sourceDatum && m_variableView.IsValid()) - { - m_variableView.AssignToDatum((*sourceDatum)); - - SC_EXECUTION_TRACE_VARIABLE_CHANGE((m_variableId), (CreateVariableChange((*m_variableView.GetDatum()), m_variableId))); - } - - Slot* resultSlot = GetSlot(m_variableDataOutSlotId); - if (resultSlot && m_variableView.IsValid()) - { - const Datum* variableDatum = m_variableView.GetDatum(); - - PushOutput((*variableDatum), *resultSlot); - - // Push the data for each property slot out as well - for (auto&& propertyAccount : m_propertyAccounts) - { - Slot* propertySlot = GetSlot(propertyAccount.m_propertySlotId); - if (propertySlot && propertyAccount.m_getterFunction) - { - auto outputOutcome = propertyAccount.m_getterFunction((*variableDatum)); - - if (!outputOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), outputOutcome.TakeError().data()); - return; - } - PushOutput(outputOutcome.TakeValue(), *propertySlot); - } - } - } - - SignalOutput(GetSlotId(GetOutputSlotName())); - } - } VariableId SetVariableNode::GetVariableIdRead(const Slot*) const { return m_variableId; @@ -283,7 +242,8 @@ namespace ScriptCanvas ScriptCanvas::Data::Type baseType = ScriptCanvas::Data::Type::Invalid(); VariableRequestBus::EventResult(baseType, GetScopedVariableId(), &VariableRequests::GetType); - const AZStd::unordered_map* variableMap = GetRuntimeBus()->GetVariables(); + const GraphVariableMapping* variableMap = nullptr; + GraphRequestBus::EventResult(variableMap, *GraphNotificationBus::GetCurrentBusId(), &GraphRequests::GetVariables); if (variableMap && baseType.IsValid()) { @@ -319,12 +279,6 @@ namespace ScriptCanvas VariableNodeNotificationBus::Event(GetEntityId(), &VariableNodeNotifications::OnVariableRemovedFromNode, removedVariableId); } - AnnotateNodeSignal SetVariableNode::CreateAnnotationData() - { - AZ::EntityId assetNodeId = GetRuntimeBus()->FindAssetNodeIdByRuntimeNodeId(GetEntityId()); - return AnnotateNodeSignal(CreateGraphInfo(GetOwningScriptCanvasId(), GetGraphIdentifier()), AnnotateNodeSignal::AnnotationLevel::Info, m_variableName, AZ::NamedEntityId(assetNodeId, GetNodeName())); - } - void SetVariableNode::AddPropertySlots(const Data::Type& type) { Data::GetterContainer getterFunctions = Data::ExplodeToGetters(type); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h index bc97fa6a08..b985cabfa8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h @@ -67,8 +67,7 @@ namespace ScriptCanvas void OnInit() override; void OnPostActivate() override; - void OnInputSignal(const SlotId&) override; - + void AddSlots(); void RemoveSlots(); void AddPropertySlots(const Data::Type& type); @@ -86,8 +85,6 @@ namespace ScriptCanvas void OnVariableRemoved() override; //// - AnnotateNodeSignal CreateAnnotationData(); - VariableId m_variableId; SlotId m_variableDataInSlotId; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.cpp deleted file mode 100644 index 66dfe424c5..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "Start.h" - -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Core - { - void Start::OnInputSignal(const SlotId&) - { - SignalOutput(StartProperty::GetOutSlotId(this)); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.h index bc5ca997e8..f4ba99746a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Start.h @@ -25,11 +25,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(Start); - - - - void OnInputSignal(const SlotId&) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/And.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/And.h index fa553036f5..f33c6acde4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/And.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/And.h @@ -52,11 +52,6 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() && *rhs.GetAs()); - } - void InitializeBooleanExpression() override { { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp index 29fd8a5075..465c336815 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp @@ -60,12 +60,6 @@ namespace ScriptCanvas RegisterExtension(visualExtensions); } } - - void Any::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const SlotId outSlotId = AnyProperty::GetOutSlotId(this); - SignalOutput(outSlotId); - } SlotId Any::HandleExtension(AZ::Crc32 extensionId) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h index aca5b2bb51..9fd676c22a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h @@ -44,8 +44,6 @@ namespace ScriptCanvas void OnInit() override; void ConfigureVisualExtensions() override; - void OnInputSignal(const SlotId& slot) override; - SlotId HandleExtension(AZ::Crc32 extensionId) override; bool CanDeleteSlot(const SlotId& slotId) const override; @@ -54,9 +52,7 @@ namespace ScriptCanvas //// /// Translation - bool IsNoOp() const override; - - + bool IsNoOp() const override; AZ::Outcome GetDependencies() const override; @@ -69,9 +65,7 @@ namespace ScriptCanvas AZ::Crc32 GetInputExtensionId() const { return AZ_CRC("Output", 0xccde149e); } private: - AZStd::string GenerateInputName(int counter); - SlotId AddInputSlot(); void FixupStateNames(); }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.cpp index a5a75e259c..1149c19230 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.cpp @@ -98,26 +98,6 @@ namespace ScriptCanvas return AddSlot(executionConfiguration); } - void Cycle::OnInputSignal(const SlotId& slot) - { - if (slot != CycleProperty::GetInSlotId(this)) - { - return; - } - - if (!m_orderedOutputSlots.empty()) - { - const SlotId& slotId = m_orderedOutputSlots[m_executionSlot]; - SignalOutput(slotId); - - if (++m_executionSlot >= m_orderedOutputSlots.size()) - { - m_executionSlot = 0; - } - } - - } - void Cycle::OnSlotRemoved([[maybe_unused]] const SlotId& slotId) { FixupStateNames(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h index c275b8031c..2d26a1f816 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h @@ -43,13 +43,9 @@ namespace ScriptCanvas ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& executionSlot, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override; - - protected: AZStd::string GetDisplayGroup() const { return "OutputGroup"; } - - void OnInputSignal(const SlotId& slot) override; void OnSlotRemoved(const SlotId& slotId) override; private: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.cpp deleted file mode 100644 index 85898ad042..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "Indexer.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Logic - { - void Indexer::OnInputSignal(const SlotId& slotId) - { - auto slotIndex = FindSlotIndex(slotId); - if (slotIndex < 0) - { - AZ_Warning("Script Canvas", false, "Could not find slot with id %s", slotId.ToString().c_str()); - return; - } - - const Datum output(slotIndex); - - const SlotId outSlotId = IndexerProperty::GetOutSlotId(this); - if (auto outSlot = GetSlot(outSlotId)) - { - PushOutput(output, *outSlot); - } - - SignalOutput(outSlotId); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.h index bea41a4e14..6a6d335a87 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Indexer.h @@ -21,16 +21,8 @@ namespace ScriptCanvas class Indexer : public Node { - public: - SCRIPTCANVAS_NODE(Indexer); - - Indexer() = default; - - protected: - - void OnInputSignal(const SlotId& slot) override; }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp index 480d51643b..85cefcf5aa 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp @@ -61,13 +61,6 @@ namespace ScriptCanvas AddSlot(slotConfiguration); } } - - void IsNull::OnInputSignal(const SlotId&) - { - const bool isNull = FindDatum(GetSlotId("Reference"))->Empty(); - PushOutput(Datum(isNull), *GetSlot(GetSlotId("Is Null"))); - SignalOutput(isNull ? IsNullProperty::GetTrueSlotId(this) : IsNullProperty::GetFalseSlotId(this)); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h index 12f996003c..36d608191f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.h @@ -34,8 +34,6 @@ namespace ScriptCanvas bool IsIfBranchPrefacedWithBooleanExpression() const override; - - protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot&, CombinedSlotType targetSlotType, const Slot*) const override { @@ -43,9 +41,6 @@ namespace ScriptCanvas } void OnInit() override; - - void OnInputSignal(const SlotId&) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp deleted file mode 100644 index c8af5ae7a4..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "Multiplexer.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Logic - { - Multiplexer::Multiplexer() - {} - - void Multiplexer::OnInputSignal(const SlotId& slotId) - { - auto slotIndex = FindSlotIndex(slotId); - if (!slotIndex) - { - AZ_Warning("Script Canvas", false, "Could not find slot with Id %s", slotId.ToString().c_str()); - return; - } - - // These are generated from CodeGen, they essentially - // check if there's anything connected on the slot and - // they assign the local member with the value, otherwise - // they use the default property value. - const AZ::s64 selectedIndex = MultiplexerProperty::GetIndex(this); - - if (selectedIndex == slotIndex) - { - const SlotId outSlotId = MultiplexerProperty::GetOutSlotId(this); - SignalOutput(outSlotId); - } - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.h index 00a974ab8a..e6df414398 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Multiplexer.h @@ -26,12 +26,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(Multiplexer); - Multiplexer(); - - protected: - - void OnInputSignal(const SlotId& slot) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Or.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Or.h index 6868dc6e6b..315d254d50 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Or.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Or.h @@ -50,11 +50,6 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() || *rhs.GetAs()); - } - void InitializeBooleanExpression() override { { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp index 75693f994c..ca32a5eb5a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp @@ -107,50 +107,6 @@ namespace ScriptCanvas } } - void Sequencer::OnInputSignal(const SlotId& slot) - { - m_selectedIndex = SequencerProperty::GetIndex(this); - m_order = SequencerProperty::GetOrder(this); - - const SlotId inSlot = SequencerProperty::GetInSlotId(this); - const SlotId nextSlot = SequencerProperty::GetNextSlotId(this); - - if (slot == inSlot) - { - m_currentIndex = m_selectedIndex; - } - else if (slot == nextSlot) - { - int step = m_order == Order::Forward ? 1 : -1; - - m_outputIsValid = false; - int startIndex = m_currentIndex; - while (!m_outputIsValid) - { - m_currentIndex = (m_currentIndex + step + NUMBER_OF_OUTPUTS) % NUMBER_OF_OUTPUTS; - SlotId outSlotId = GetCurrentSlotId(); - Slot* outSlot = GetSlot(outSlotId); - if (outSlot) - { - m_outputIsValid = !GetConnectedNodes(*outSlot).empty(); - } - - //Avoid infinite loop when none of the outputs or only the current output connects to other nodes. - if (m_currentIndex == startIndex) - { - m_outputIsValid = false; - break; - } - } - } - - if (m_outputIsValid) - { - SlotId outSlotId = GetCurrentSlotId(); - SignalOutput(outSlotId); - } - } - SlotId Sequencer::GetCurrentSlotId() const { AZStd::string slotName = "Out" + AZStd::to_string(m_currentIndex); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.h index 347d21baa2..a4fe3f358d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.h @@ -43,10 +43,6 @@ namespace ScriptCanvas int m_order; int m_selectedIndex; - protected: - - void OnInputSignal(const SlotId& slot) override; - private: int m_currentIndex; bool m_outputIsValid; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp index ec55784a33..445c91e1fc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp @@ -71,31 +71,6 @@ namespace ScriptCanvas return AddSlot(executionConfiguration); } - void TargetedSequencer::OnInputSignal(const SlotId& slot) - { - if (slot != TargetedSequencerProperty::GetInSlotId(this)) - { - return; - } - - int targetIndex = TargetedSequencerProperty::GetIndex(this); - - if (targetIndex < 0 - || targetIndex >= m_numOutputs) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Switch node was given an out of bound index."); - return; - } - - AZStd::string slotName = GenerateOutputName(targetIndex); - SlotId outSlotId = GetSlotId(slotName.c_str()); - - if (outSlotId.IsValid()) - { - SignalOutput(outSlotId); - } - } - void TargetedSequencer::OnSlotRemoved([[maybe_unused]] const SlotId& slotId) { FixupStateNames(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h index 7f50fbeb11..68bf1601f7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h @@ -54,7 +54,6 @@ namespace ScriptCanvas AZStd::string GetDisplayGroup() const { return "OutputGroup"; } - void OnInputSignal(const SlotId& slot) override; void OnSlotRemoved(const SlotId& slotId) override; private: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp index 80646e66a1..21b2ead10e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp @@ -131,63 +131,6 @@ namespace ScriptCanvas return isValid; } - void WeightedRandomSequencer::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = WeightedRandomSequencerProperty::GetInSlotId(this); - - if (slotId == inSlotId) - { - int runningTotal = 0; - - AZStd::vector< WeightedStruct > weightedStructs; - weightedStructs.reserve(m_weightedPairings.size()); - - for (const WeightedPairing& weightedPairing : m_weightedPairings) - { - const Datum* datum = FindDatum(weightedPairing.m_weightSlotId); - - if (datum) - { - WeightedStruct weightedStruct; - weightedStruct.m_executionSlotId = weightedPairing.m_executionSlotId; - - if (datum->GetType().IS_A(ScriptCanvas::Data::Type::Number())) - { - int weight = aznumeric_cast((*datum->GetAs())); - - runningTotal += weight; - weightedStruct.m_totalWeight = runningTotal; - } - - weightedStructs.emplace_back(weightedStruct); - } - } - - // We have no weights. So just trigger the first execution output - // Weighted pairings is controlled to never be empty. - if (runningTotal == 0) - { - if (!m_weightedPairings.empty()) - { - SignalOutput(m_weightedPairings.front().m_executionSlotId); - } - - return; - } - - int weightedResult = MathNodeUtilities::GetRandomIntegral(1, runningTotal); - - for (const WeightedStruct& weightedStruct : weightedStructs) - { - if (weightedResult <= weightedStruct.m_totalWeight) - { - SignalOutput(weightedStruct.m_executionSlotId); - break; - } - } - } - } - SlotId WeightedRandomSequencer::HandleExtension(AZ::Crc32 extensionId) { auto weightedPairing = AddWeightedPair(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h index f58f89690d..d8be2a95c6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h @@ -22,9 +22,7 @@ namespace ScriptCanvas class WeightedRandomSequencer : public Node { - public: - SCRIPTCANVAS_NODE(WeightedRandomSequencer); static void ReflectDataTypes(AZ::ReflectContext* reflectContext); @@ -42,11 +40,7 @@ namespace ScriptCanvas bool OnValidateNode(ValidationResults& validationResults); - void OnInputSignal(const SlotId& slot); - - SlotId HandleExtension(AZ::Crc32 extensionId) override; - - + SlotId HandleExtension(AZ::Crc32 extensionId) override; bool CanDeleteSlot(const SlotId& slotId) const override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Divide.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Divide.h index 7320fff037..fad147241a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Divide.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Divide.h @@ -51,21 +51,6 @@ namespace ScriptCanvas nodeConfig.m_type = AZ::Uuid("DC17E19F-3829-410D-9A0B-AD60C6066DAA"); return nodeConfig; } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - const Data::NumberType lhsValue = *lhs.GetAs(); - const Data::NumberType rhsValue = *rhs.GetAs(); - - if (AZ::IsClose(rhsValue, 0.0, 0.0001)) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Divide by zero"); - return Datum(); - } - - return Datum(lhsValue / rhsValue); - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Multiply.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Multiply.h index c0761502c0..76ccf3cd96 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Multiply.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Multiply.h @@ -50,12 +50,6 @@ namespace ScriptCanvas nodeConfig.m_type = AZ::Uuid("E9BB45A1-AE96-47B0-B2BF-2927D420A28C"); return nodeConfig; } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() * *rhs.GetAs()); - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h index ecffc724cc..65563bec0b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Subtract.h @@ -50,12 +50,6 @@ namespace ScriptCanvas nodeConfig.m_type = AZ::Uuid("D0615D0A-027F-47F6-A02B-E35DAF22F431"); return nodeConfig; } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() - *rhs.GetAs()); - } }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h index ed53b66878..bcff3378c9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h @@ -52,12 +52,6 @@ namespace ScriptCanvas nodeConfig.m_type = AZ::Uuid("C1B42FEC-0545-4511-9FAC-11E0387FEDF0"); return nodeConfig; } - - protected: - Datum Evaluate(const Datum& lhs, const Datum& rhs) override - { - return Datum(*lhs.GetAs() + *rhs.GetAs()); - } }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp index 6b5b2770de..ed676034d8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.cpp @@ -91,70 +91,6 @@ namespace ScriptCanvas } } } - - void OperatorAt::KeyNotFound(const Datum* containerDatum) - { - Datum defaultDatum; - AZStd::vector types = ScriptCanvas::Data::GetContainedTypes(GetSourceAZType()); - - int index = Data::IsMapContainerType(containerDatum->GetType()) ? 1 : 0; - - Data::Type type = Data::FromAZType(types[index]); - defaultDatum.SetType(type); - - PushOutput(defaultDatum, *GetSlot(*m_outputSlots.begin())); - SignalOutput(GetSlotId("Key Not Found")); - } - - void OperatorAt::InvokeOperator() - { - Slot* inputSlot = GetFirstInputSourceSlot(); - - if (inputSlot) - { - SlotId sourceSlotId = inputSlot->GetId(); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - const Datum* inputKeyDatum = FindDatum(*m_inputSlots.begin()); - AZ::Outcome valueOutcome = BehaviorContextMethodHelper::CallMethodOnDatumUnpackOutcomeSuccess(*containerDatum, "At", *inputKeyDatum); - if (!valueOutcome.IsSuccess()) - { - KeyNotFound(containerDatum); - return; - } - - if (Data::IsVectorContainerType(containerDatum->GetType())) - { - PushOutput(valueOutcome.TakeValue(), *GetSlot(*m_outputSlots.begin())); - SignalOutput(GetSlotId("Out")); - } - else if (Data::IsSetContainerType(containerDatum->GetType()) || Data::IsMapContainerType(containerDatum->GetType())) - { - Datum keyDatum = valueOutcome.TakeValue(); - if (keyDatum.Empty()) - { - KeyNotFound(containerDatum); - } - else - { - PushOutput(keyDatum, *GetSlot(*m_outputSlots.begin())); - SignalOutput(GetSlotId("Out")); - } - } - } - } - } - - void OperatorAt::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h index e20de1a02b..ceae2211a0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorAt.h @@ -36,9 +36,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); - void KeyNotFound(const Datum* containerDatum); }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp index 99607c37f3..dcfe5fed56 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp @@ -48,43 +48,6 @@ namespace ScriptCanvas } } - void OperatorBack::InvokeOperator() - { - const SlotSet& slotSets = GetSourceSlots(); - - if (!slotSets.empty()) - { - SlotId sourceSlotId = (*slotSets.begin()); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - const Datum* inputKeyDatum = FindDatum(*m_inputSlots.begin()); - AZ::Outcome valueOutcome = BehaviorContextMethodHelper::CallMethodOnDatumUnpackOutcomeSuccess(*containerDatum, "Back", *inputKeyDatum); - if (!valueOutcome.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to call Back on container: %s", valueOutcome.GetError().c_str()); - return; - } - - if (Data::IsVectorContainerType(containerDatum->GetType())) - { - PushOutput(valueOutcome.TakeValue(), *GetSlot(*m_outputSlots.begin())); - } - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorBack::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h index 41c4b2cbc1..2b6746156d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h @@ -35,7 +35,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; void InvokeOperator(); }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp index 36890c9720..38118ed8c1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.cpp @@ -67,36 +67,6 @@ namespace ScriptCanvas } //// } - - void OperatorClear::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - - if (slotId != inSlotId) - { - return; - } - - SlotId sourceSlotId = OperatorClearProperty::GetSourceSlotId(this); - - if (const Datum* containerDatum = FindDatum(sourceSlotId)) - { - if (Datum::IsValidDatum(containerDatum)) - { - AZ::Outcome clearOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Clear"); - if (!clearOutcome.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to call Clear on container: %s", clearOutcome.GetError().c_str()); - return; - } - - // Push the source container as an output to support chaining - PushOutput(*containerDatum, *OperatorClearProperty::GetContainerSlot(this)); - } - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h index a0ccad1379..2b7e24682f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorClear.h @@ -41,10 +41,6 @@ namespace ScriptCanvas OperatorClear() = default; void OnInit() override; - - protected: - - void OnInputSignal(const SlotId& slotId) override; }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp index 71ee545397..e62b671268 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.cpp @@ -70,49 +70,6 @@ namespace ScriptCanvas } //// } - - void OperatorEmpty::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorEmptyProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - SlotId sourceSlotId = OperatorEmptyProperty::GetSourceSlotId(this); - - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - // Is the container empty? - auto emptyOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Empty"); - if (!emptyOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to call Empty on container: %s", emptyOutcome.GetError().c_str()); - return; - } - - Datum emptyResult = emptyOutcome.TakeValue(); - bool isEmpty = *emptyResult.GetAs(); - - PushOutput(Datum(isEmpty), *GetSlot(OperatorEmptyProperty::GetIsEmptySlotId(this))); - - if (isEmpty) - { - SignalOutput(OperatorEmptyProperty::GetTrueSlotId(this)); - } - else - { - SignalOutput(OperatorEmptyProperty::GetFalseSlotId(this)); - } - } - else - { - PushOutput(Datum(true), *GetSlot(OperatorEmptyProperty::GetIsEmptySlotId(this))); - SignalOutput(OperatorEmptyProperty::GetFalseSlotId(this)); - } - - SignalOutput(OperatorEmptyProperty::GetOutSlotId(this)); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h index 5cc26c126e..148142d3c8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorEmpty.h @@ -21,22 +21,15 @@ namespace ScriptCanvas class OperatorEmpty : public Node { public: - SCRIPTCANVAS_NODE(OperatorEmpty); - void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; static bool OperatorEmptyVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement); OperatorEmpty() = default; - // Node... void OnInit() override; - //// - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp index 15328b42fb..92c753c5b8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.cpp @@ -95,47 +95,6 @@ namespace ScriptCanvas } } - void OperatorErase::InvokeOperator() - { - Slot* inputSlot = GetFirstInputSourceSlot(); - Slot* outputSlot = GetFirstOutputSourceSlot(); - - if (inputSlot && outputSlot) - { - SlotId sourceSlotId = inputSlot->GetId(); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - const Datum* inputKeyDatum = FindDatum(*m_inputSlots.begin()); - AZ::Outcome valueOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Erase", *inputKeyDatum); - - if (valueOutcome.IsSuccess()) - { - // Push the source container as an output to support chaining - PushOutput(*containerDatum, (*outputSlot)); - - auto outcomeInnerResult = valueOutcome.GetValue().GetAs< AZ::Outcome>(); - if (outcomeInnerResult && !outcomeInnerResult->IsSuccess()) - { - SignalOutput(GetSlotId("Element Not Found")); - return; - } - } - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorErase::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h index dc5d8c4c0c..95ddfcb275 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorErase.h @@ -39,8 +39,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); private: bool m_missedElementNotFound = false; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp index 794ee8aeb0..bd97e4cd4e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.cpp @@ -46,43 +46,6 @@ namespace ScriptCanvas } } - void OperatorFront::InvokeOperator() - { - const SlotSet& slotSets = GetSourceSlots(); - - if (!slotSets.empty()) - { - SlotId sourceSlotId = (*slotSets.begin()); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - const Datum* inputKeyDatum = FindDatum(*m_inputSlots.begin()); - AZ::Outcome valueOutcome = BehaviorContextMethodHelper::CallMethodOnDatumUnpackOutcomeSuccess(*containerDatum, "Front", *inputKeyDatum); - if (!valueOutcome.IsSuccess()) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to call Front on container: %s", valueOutcome.GetError().c_str()); - return; - } - - if (Data::IsVectorContainerType(containerDatum->GetType())) - { - PushOutput(valueOutcome.TakeValue(), *GetSlot(*m_outputSlots.begin())); - } - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorFront::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h index cb41f6a479..f28c46e0f8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h @@ -35,7 +35,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; void InvokeOperator(); }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp index bce98a6776..9af3f183b1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp @@ -84,108 +84,6 @@ namespace ScriptCanvas } } - void OperatorInsert::InvokeOperator() - { - Slot* inputSlot = GetFirstInputSourceSlot(); - Slot* outputSlot = GetFirstOutputSourceSlot(); - - if (inputSlot && outputSlot) - { - SlotId sourceSlotId = inputSlot->GetId(); - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - AZ::BehaviorMethod* method = GetOperatorMethod("Insert"); - AZ_Assert(method, "The contract must have failed because you should not be able to invoke an operator for a type that does not have the method"); - - AZStd::array params; - - AZ::BehaviorValueParameter* paramFirst(params.begin()); - AZ::BehaviorValueParameter* paramIter = paramFirst; - - if (Data::IsVectorContainerType(GetSourceAZType())) - { - // Container - auto behaviorParameter = method->GetArgument(0); - AZ::Outcome param0 = containerDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param0.GetValue()); - ++paramIter; - - // Get the size of the container - auto sizeOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Size"); - if (!sizeOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to get size of container: %s", sizeOutcome.GetError().c_str()); - return; - } - - auto inputSlotIterator = m_inputSlots.begin(); - - // Index - behaviorParameter = method->GetArgument(1); - const Datum* indexDatum = FindDatum(*inputSlotIterator); - AZ::Outcome param2 = indexDatum->ToBehaviorValueParameter(*behaviorParameter); - - paramIter->Set(param2.GetValue()); - ++paramIter; - - // Value to insert - behaviorParameter = method->GetArgument(2); - ++inputSlotIterator; - const Datum* inputDatum = FindDatum(*inputSlotIterator); - AZ::Outcome param1 = inputDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param1.GetValue()); - ++paramIter; - } - else if (Data::IsMapContainerType(GetSourceAZType())) - { - auto inputSlotIterator = m_inputSlots.begin(); - const Datum* keyDatum = FindDatum(*inputSlotIterator++); - const Datum* valueDatum = FindDatum(*inputSlotIterator); - - if (keyDatum && valueDatum) - { - // Container - const AZ::BehaviorParameter* behaviorParameter = method->GetArgument(0); - AZ::Outcome param0 = containerDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param0.GetValue()); - ++paramIter; - - // Key - behaviorParameter = method->GetArgument(1); - AZ::Outcome param1 = keyDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param1.GetValue()); - ++paramIter; - - // Value to insert - behaviorParameter = method->GetArgument(2); - AZ::Outcome param2 = valueDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param2.GetValue()); - ++paramIter; - } - } - - AZStd::vector resultSlotIDs; - resultSlotIDs.push_back(); - BehaviorContextMethodHelper::Call(*this, false, method, paramFirst, paramIter, resultSlotIDs); - - // Push the source container as an output to support chaining - PushOutput(*containerDatum, (*outputSlot)); - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorInsert::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h index 970c8ab780..0fda9b0654 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.h @@ -33,9 +33,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp index e449d04d34..cf8eb306c4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.cpp @@ -42,73 +42,6 @@ namespace ScriptCanvas m_inputSlots.insert(AddSlot(slotConfiguration)); } } - - void OperatorPushBack::InvokeOperator() - { - Slot* inputSlot = GetFirstInputSourceSlot(); - Slot* outputSlot = GetFirstOutputSourceSlot(); - - if (inputSlot && outputSlot) - { - const Datum* containerDatum = FindDatum(inputSlot->GetId()); - - if (Datum::IsValidDatum(containerDatum)) - { - AZ::BehaviorMethod* method = GetOperatorMethod("PushBack"); - AZ_Assert(method, "The contract must have failed because you should not be able to invoke an operator for a type that does not have the method"); - - AZStd::array params; - - AZ::BehaviorValueParameter* paramFirst(params.begin()); - AZ::BehaviorValueParameter* paramIter = paramFirst; - - if (Data::IsVectorContainerType(GetSourceAZType())) - { - // Container - auto behaviorParameter = method->GetArgument(0); - - AZ::Outcome param0 = containerDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param0.GetValue()); - ++paramIter; - - const auto& inputSlotIterator = m_inputSlots.begin(); - - // Value to push - behaviorParameter = method->GetArgument(1); - const Datum* inputDatum = FindDatum(*inputSlotIterator); - AZ_Assert(inputDatum, "Unable to GetInput for Input slot Id"); - if (inputDatum) - { - AZ::Outcome param1 = inputDatum->ToBehaviorValueParameter(*behaviorParameter); - paramIter->Set(param1.GetValue()); - ++paramIter; - } - } - else if (Data::IsMapContainerType(GetSourceAZType())) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "PushBack is not a supported operation on maps"); - return; - } - - AZStd::vector resultSlotIDs; - resultSlotIDs.push_back(); - BehaviorContextMethodHelper::Call(*this, false, method, paramFirst, paramIter, resultSlotIDs); - - PushOutput(*containerDatum, (*outputSlot)); - } - } - - SignalOutput(GetSlotId("Out")); - } - - void OperatorPushBack::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorBaseProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - InvokeOperator(); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h index 695d6a6f93..5f74dd9dc9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorPushBack.h @@ -32,9 +32,6 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void OnInputSignal(const SlotId& slotId) override; - void InvokeOperator(); - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp index 29c5e61a21..40fbe6f54b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp @@ -85,42 +85,6 @@ namespace ScriptCanvas } //// } - - void OperatorSize::OnInputSignal(const SlotId& slotId) - { - const SlotId inSlotId = OperatorSizeProperty::GetInSlotId(this); - if (slotId == inSlotId) - { - - SlotId sourceSlotId = OperatorSizeProperty::GetSourceSlotId(this); - SlotId sizeSlotId = OperatorSizeProperty::GetSizeSlotId(this); - - const Datum* containerDatum = FindDatum(sourceSlotId); - - if (Datum::IsValidDatum(containerDatum)) - { - // Get the size of the container - auto sizeOutcome = BehaviorContextMethodHelper::CallMethodOnDatum(*containerDatum, "Size"); - if (!sizeOutcome) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Failed to get size of container: %s", sizeOutcome.GetError().c_str()); - return; - } - - // Index - Datum sizeResult = sizeOutcome.TakeValue(); - - PushOutput(sizeResult, *GetSlot(sizeSlotId)); - } - else - { - Datum zero(0); - PushOutput(zero, *GetSlot(sizeSlotId)); - } - - SignalOutput(OperatorSizeProperty::GetOutSlotId(this)); - } - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h index 3199b09ebd..71c89c75e9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h @@ -33,9 +33,6 @@ namespace ScriptCanvas // Node... void OnInit() override; //// - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp index 7d6fb74768..376a6154a9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp @@ -55,68 +55,6 @@ namespace ScriptCanvas } } - void OperatorArithmetic::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas); - - if (!m_scrapedInputs) - { - m_scrapedInputs = true; - - AZStd::vector< Slot* > groupedSlots = GetSlotsWithDynamicGroup(GetArithmeticDynamicTypeGroup()); - - SlotId fallbackId; - - for (Slot* groupedSlot : groupedSlots) - { - if (groupedSlot->IsInput()) - { - SlotId groupedSlotId = groupedSlot->GetId(); - - if (!fallbackId.IsValid()) - { - fallbackId = groupedSlotId; - } - - if ((groupedSlot->IsVariableReference() && groupedSlot->GetVariableReference().IsValid()) || IsConnected(groupedSlotId) || IsValidArithmeticSlot(groupedSlotId)) - { - const Datum* inputDatum = groupedSlot->FindDatum(); - - if (inputDatum && inputDatum->GetType().IsValid() && inputDatum->GetType().GetType() != Data::eType::BehaviorContextObject) - { - m_applicableInputs.emplace_back(inputDatum); - } - } - } - else if (groupedSlot->IsOutput()) - { - m_resultSlot = groupedSlot; - } - - m_outSlot = GetSlotByName("Out")->GetId(); - } - - // If none of our inputs are valid input slots. Just use the first one we found to fall into a default use case. - if (m_applicableInputs.empty()) - { - const Datum* inputDatum = FindDatum(fallbackId); - - if (inputDatum && inputDatum->GetType().IsValid()) - { - m_applicableInputs.emplace_back(inputDatum); - } - } - - if (!m_applicableInputs.empty()) - { - const Datum* datum = m_applicableInputs.front(); - m_result.SetType(datum->GetType()); - } - } - - InvokeOperator(); - } - void OperatorArithmetic::OnConfigured() { auto slotList = GetSlotsWithDynamicGroup(GetArithmeticDynamicTypeGroup()); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h index 716c9111af..4fcd6a1905 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h @@ -85,8 +85,7 @@ namespace ScriptCanvas // Node void OnSlotDisplayTypeChanged(const SlotId& slotId, const Data::Type& dataType) override final; void OnDynamicGroupDisplayTypeChanged(const AZ::Crc32& dynamicGroup, const Data::Type& dataType) override final; - void OnInputSignal(const SlotId& slotId) override; - + void OnConfigured() override; void OnInit() override; void OnActivate() override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp index 27a8e5f846..9ba4a7f4ae 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.cpp @@ -104,98 +104,6 @@ namespace ScriptCanvas } } - void OperatorDivideByNumber::OnInputSignal(const SlotId& slotId) - { - if (slotId != OperatorDivideByNumberProperty::GetInSlotId(this)) - { - return; - } - - Data::Type type = GetDisplayType(AZ::Crc32("DivideGroup")); - - if (!type.IsValid()) - { - return; - } - - const Datum* operand = FindDatum(m_operandId); - - if (operand == nullptr) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Operand is nullptr"); - return; - } - - const float divisorValue = aznumeric_cast(OperatorDivideByNumberProperty::GetDivisor(this)); - - if (AZ::IsClose(divisorValue, 0.f, std::numeric_limits::epsilon())) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Division by zero"); - return; - } - - Datum result; - - switch (type.GetType()) - { - case Data::eType::Number: - { - const Data::NumberType* number = operand->GetAs(); - Data::NumberType resultValue = (*number) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Vector2: - { - const Data::Vector2Type* vector = operand->GetAs(); - AZ::Vector2 resultValue = (*vector) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Vector3: - { - const Data::Vector3Type* vector = operand->GetAs(); - AZ::Vector3 resultValue = (*vector) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Vector4: - { - const Data::Vector4Type* vector = operand->GetAs(); - AZ::Vector4 resultValue = (*vector) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Quaternion: - { - const Data::QuaternionType* quaternion = operand->GetAs(); - Data::QuaternionType resultValue = (*quaternion) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Matrix3x3: - { - const Data::Matrix3x3Type* matrix = operand->GetAs(); - Data::Matrix3x3Type resultValue = (*matrix) / divisorValue; - result = Datum(resultValue); - } - break; - case Data::eType::Color: - { - const Data::ColorType *color = operand->GetAs(); - Data::ColorType resultValue = (*color) / divisorValue; - result = Datum(resultValue); - } - break; - default: - result = Datum(); - AZ_Error("Script Canvas", false, "Divide by Number does not support the provided data type."); - break; - } - - PushOutput(result, (*OperatorDivideByNumberProperty::GetResultSlot(this))); - SignalOutput(OperatorDivideByNumberProperty::GetOutSlotId(this)); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h index 10df09a42e..bb33242ad4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h @@ -42,7 +42,6 @@ namespace ScriptCanvas // Nodes... void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; //// protected: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp index b52b6d8da2..9cde2d7322 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.cpp @@ -70,58 +70,6 @@ namespace ScriptCanvas ConfigureSlots(); } } - - void OperatorLength::OnInputSignal(const SlotId& slotId) - { - if (slotId != OperatorLengthProperty::GetInSlotId(this)) - { - return; - } - - Data::Type type = GetDisplayType(AZ::Crc32("SourceGroup")); - - if (!type.IsValid()) - { - return; - } - - Datum result; - const Datum* operand = FindDatum(OperatorLengthProperty::GetSourceSlotId(this)); - - switch (type.GetType()) - { - case Data::eType::Vector2: - { - const AZ::Vector2* vector = operand->GetAs(); - result = Datum(vector->GetLength()); - } - break; - case Data::eType::Vector3: - { - const AZ::Vector3* vector = operand->GetAs(); - result = Datum(vector->GetLength()); - } - break; - case Data::eType::Vector4: - { - const AZ::Vector4* vector = operand->GetAs(); - result = Datum(vector->GetLength()); - } - break; - case Data::eType::Quaternion: - { - const AZ::Quaternion* vector = operand->GetAs(); - result = Datum(vector->GetLength()); - } - break; - default: - AZ_Assert(false, "Length operator not defined for type: %s", Data::ToAZType(type).ToString().c_str()); - break; - } - - PushOutput(result, (*OperatorLengthProperty::GetLengthSlot(this))); - SignalOutput(OperatorLengthProperty::GetOutSlotId(this)); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h index f49c384439..188d8c2583 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLength.h @@ -38,10 +38,7 @@ namespace ScriptCanvas OperatorLength() = default; ~OperatorLength() = default; - // Node... void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - //// }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp index 079073fa64..d5cbadbfee 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp @@ -51,133 +51,10 @@ namespace ScriptCanvas //////// } - void LerpBetween::OnDeactivate() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } - void LerpBetween::OnConfigured() { SetupInternalSlotReferences(); - } - - void LerpBetween::OnSystemTick() - { - // Ping pong between the system and the normal tick bus for a consistent starting point for the lerp - AZ::SystemTickBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusConnect(); - } - - void LerpBetween::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint timePoint) - { - bool lerpComplete = false; - - m_counter += deltaTime; - - if (m_counter >= m_duration) - { - lerpComplete = true; - m_counter = m_duration; - } - - float percent = m_counter/m_duration; - - SignalLerpStep(percent); - } - - void LerpBetween::OnInputSignal(const SlotId& slotId) - { - if (slotId == LerpBetweenProperty::GetCancelSlotId(this)) - { - CancelLerp(); - } - else if (slotId == LerpBetweenProperty::GetInSlotId(this)) - { - CancelLerp(); - - AZ::SystemTickBus::Handler::BusConnect(); - - float speedOnlyTime = 0.0; - float maxDuration = 0.0; - - const Datum* durationDatum = FindDatum(m_maximumTimeSlotId); - const Datum* speedDatum = FindDatum(m_speedSlotId); - - if (durationDatum) - { - maxDuration = static_cast((*durationDatum->GetAs())); - } - - Data::Type displayType = GetDisplayType(AZ::Crc32("LerpGroup")); - - if (displayType == Data::Type::Number()) - { - SetupStartStop(displayType); - - if (!m_differenceDatum.GetType().IsValid()) - { - return; - } - - Data::NumberType difference = (*m_differenceDatum.GetAs()); - Data::NumberType speed = (*speedDatum->GetAs()); - - if (AZ::IsClose(speed, 0.0, Data::ToleranceEpsilon())) - { - speedOnlyTime = -1.0f; - } - else - { - speedOnlyTime = fabsf(static_cast(difference)/static_cast(speed)); - } - } - else if (displayType == Data::Type::Vector2()) - { - SetupStartStop(displayType); - speedOnlyTime = CalculateVectorSpeedTime(speedDatum); - } - else if (displayType == Data::Type::Vector3()) - { - SetupStartStop(displayType); - speedOnlyTime = CalculateVectorSpeedTime(speedDatum); - } - else if (displayType == Data::Type::Vector4()) - { - SetupStartStop(displayType); - speedOnlyTime = CalculateVectorSpeedTime(speedDatum); - } - - m_counter = 0; - - if (speedOnlyTime >= 0.0f && maxDuration >= 0.0f) - { - m_duration = AZStd::min(speedOnlyTime, maxDuration); - } - else if (speedOnlyTime >= 0.0f) - { - m_duration = speedOnlyTime; - } - else if (maxDuration >= 0.0f) - { - m_duration = maxDuration; - } - else - { - AZ_Error("ScriptCanvas", false, "Lerp Between not given a valid speed or duration to perofrm the lerp at. Defaulting to 1 second duration"); - m_duration = 1.0; - } - - if (AZ::IsClose(m_duration, 0.0f, AZ::Constants::FloatEpsilon)) - { - CancelLerp(); - - SignalLerpStep(1.0f); - } - - SignalOutput(LerpBetweenProperty::GetOutSlotId(this)); - } - } + } void LerpBetween::SetupInternalSlotReferences() { @@ -189,52 +66,7 @@ namespace ScriptCanvas m_stepSlotId = LerpBetweenProperty::GetStepSlotId(this); m_percentSlotId = LerpBetweenProperty::GetPercentSlotId(this); } - - void LerpBetween::CancelLerp() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } - - void LerpBetween::SignalLerpStep(float percent) - { - Data::Type displayType = GetDisplayType(AZ::Crc32("LerpGroup")); - - Datum stepDatum(displayType, Datum::eOriginality::Original); - stepDatum.SetToDefaultValueOfType(); - - if (displayType == Data::Type::Number()) - { - CalculateLerpStep(percent, stepDatum); - } - else if (displayType == Data::Type::Vector2()) - { - CalculateLerpStep(percent, stepDatum); - } - else if (displayType == Data::Type::Vector3()) - { - CalculateLerpStep(percent, stepDatum); - } - else if (displayType == Data::Type::Vector4()) - { - CalculateLerpStep(percent, stepDatum); - } - - if (AZ::IsClose(percent, 1.0f, AZ::Constants::FloatEpsilon)) - { - SignalOutput(LerpBetweenProperty::GetLerpCompleteSlotId(this)); - AZ::TickBus::Handler::BusDisconnect(); - } - - Datum percentDatum(ScriptCanvas::Data::Type::Number(), Datum::eOriginality::Original); - percentDatum.Set(percent); - - PushOutput(percentDatum, *GetSlot(m_percentSlotId)); - PushOutput(stepDatum, *GetSlot(m_stepSlotId)); - - SignalOutput(LerpBetweenProperty::GetTickSlotId(this)); - } - + bool LerpBetween::IsGroupConnected() const { bool hasConnections = false; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h index cb54f2f236..7b8b7d2143 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h @@ -27,8 +27,6 @@ namespace ScriptCanvas //! Deprecated: see NodeableNodeOverloadedLerp class LerpBetween : public Node - , public AZ::SystemTickBus::Handler - , public AZ::TickBus::Handler { public: @@ -54,98 +52,14 @@ namespace ScriptCanvas ~LerpBetween() override = default; void OnInit() override; - void OnDeactivate() override; void OnConfigured() override; - - // SystemTickBus... - void OnSystemTick() override; - //// - - // TickBus... - void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; - //// - - // Node... - void OnInputSignal(const SlotId& slotId) override; - //// - + private: void SetupInternalSlotReferences(); - - void CancelLerp(); - - void SignalLerpStep(float percent); - bool IsGroupConnected() const; bool IsInGroup(const SlotId& slotId) const; - - template - void CalculateLerpStep(float percent, Datum& stepDatum) - { - const DataType* startValue = m_startDatum.GetAs(); - const DataType* differenceValue = m_differenceDatum.GetAs(); - - if (startValue == nullptr || differenceValue == nullptr) - { - return; - } - - DataType stepValue = (*startValue) + (*differenceValue) * percent; - stepDatum.Set(stepValue); - } - - template - void SetupStartStop(Data::Type displayType) - { - const Datum* startDatum = FindDatum(m_startSlotId); - const Datum* endDatum = FindDatum(m_stopSlotId); - - m_startDatum = (*startDatum); - m_differenceDatum = Datum(displayType, Datum::eOriginality::Original); - - const DataType* startValue = startDatum->GetAs(); - const DataType* endValue = endDatum->GetAs(); - - if (startValue == nullptr || endValue == nullptr) - { - m_differenceDatum.SetToDefaultValueOfType(); - } - else - { - DataType difference = (*endValue) - (*startValue); - m_differenceDatum.Set(difference); - } - } - - template - float CalculateVectorSpeedTime(const Datum* speedDatum) - { - const DataType* dataType = speedDatum->GetAs(); - - float speedLength = 0.0f; - - if (dataType) - { - speedLength = dataType->GetLength(); - } - - if (AZ::IsClose(speedLength, 0.0f, AZ::Constants::FloatEpsilon)) - { - return -1.0; - } - - float differenceLength = 0.0; - const DataType* differenceValue = m_differenceDatum.GetAs(); - - if (differenceValue) - { - differenceLength = differenceValue->GetLength(); - } - - return fabsf(static_cast(differenceLength/speedLength)); - } - + AZStd::unordered_set< SlotId > m_groupedSlotIds; float m_duration; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h index 7401b60d21..9882ff4564 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h @@ -121,13 +121,6 @@ namespace ScriptCanvas virtual void OnSourceConnected([[maybe_unused]] const SlotId& slotId) {} virtual void OnSourceDisconnected([[maybe_unused]] const SlotId& slotId) {} - //! Implements the operator's behavior, the vector of Datums represents the list of operands. - virtual void Evaluate(const OperatorOperands& operands, Datum& result) - { - AZ_UNUSED(operands); - AZ_UNUSED(result); - } - private: OperatorConfiguration m_operatorConfiguration; @@ -180,32 +173,6 @@ namespace ScriptCanvas } } }; - - // Base class for an small helper object that wraps the function to invoke - class OperationHelper - { - public: - - Datum operator()(const AZStd::vector& operands, Datum& result) - { - AZStd::vector::const_iterator operand = operands.begin(); - result = *operand; - for (++operand; operand != operands.end(); ++operand) - { - result = Operator(result, *operand); - } - - return result; - } - - protected: - virtual Datum Operator(const Datum&, const Datum&) = 0; - }; - -// Helper macro to invoke an operator function for a specialized type -#define CallOperatorFunction(Operator, DataType, Type) \ - if (DataType == Data::FromAZType(azrtti_typeid())) { Operator operation; operation(operands, result); } - } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/ProjectSettings.json b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/ProjectSettings.json new file mode 100644 index 0000000000..0cf5ea5033 --- /dev/null +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": "No Configurations" +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/String/v16/Browse.VC.db b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/String/v16/Browse.VC.db new file mode 100644 index 0000000000000000000000000000000000000000..0bd6c3064248f7d9a078ec2376c1505aa698394f GIT binary patch literal 294912 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 Oh+568O6&kh(*7SD>(z$< literal 0 HcmV?d00001 diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/VSWorkspaceState.json b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/VSWorkspaceState.json new file mode 100644 index 0000000000..6b6114114f --- /dev/null +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/slnx.sqlite b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/slnx.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..9b538ebad69051f86689708a3c34f11e6e486cb2 GIT binary patch literal 90112 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 Ay8r+H literal 0 HcmV?d00001 diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.cpp index b88b2edbd3..ec43c1fc8b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.cpp @@ -52,32 +52,6 @@ namespace ScriptCanvas } } - void Contains::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Contains::OnInputSignal"); - - AZStd::string sourceString = ContainsProperty::GetSource(this); - AZStd::string patternString = ContainsProperty::GetPattern(this); - - bool caseSensitive = ContainsProperty::GetCaseSensitive(this); - bool searchFromEnd = ContainsProperty::GetSearchFromEnd(this); - - auto index = AzFramework::StringFunc::Find(sourceString.c_str(), patternString.c_str(), 0, searchFromEnd, caseSensitive); - if (index != AZStd::string::npos) - { - const SlotId outputIndexSlotId = ContainsProperty::GetIndexSlotId(this); - if (auto* indexSlot = GetSlot(outputIndexSlotId)) - { - Datum outputIndex(index); - PushOutput(outputIndex, *indexSlot); - } - - SignalOutput(GetSlotId("True")); - return; - } - - SignalOutput(GetSlotId("False")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.h index e2756f6ebf..d877972a1a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Contains.h @@ -29,10 +29,6 @@ namespace ScriptCanvas void OnInit() override; void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; - protected: - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp index 1b71390e0c..d05f2cd5ac 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp @@ -13,20 +13,7 @@ namespace ScriptCanvas { namespace String { - void Format::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Format::OnInputSignal"); - - Datum output = Datum(ProcessFormat()); - - const SlotId outputTextSlotId = FormatProperty::GetStringSlotId(this); - if (auto* slot = GetSlot(outputTextSlotId)) - { - PushOutput(output, *slot); - } - - SignalOutput(GetSlotId("Out")); - } + } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.h index 6e5c50d2ae..2fd606a422 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.h @@ -23,12 +23,8 @@ namespace ScriptCanvas class Format : public Internal::StringFormatted { - protected: - + public: SCRIPTCANVAS_NODE(Format); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.cpp deleted file mode 100644 index 26f3716b6a..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "Print.h" - -#include -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace String - { - void Print::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { -#if !defined(PERFORMANCE_BUILD) && !defined(_RELEASE) - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Print::OnInputSignal"); - - AZStd::string text = ProcessFormat(); - - AZ_TracePrintf("Script Canvas", "%s\n", text.c_str()); - LogNotificationBus::Event(GetOwningScriptCanvasId(), &LogNotifications::LogMessage, text); - - AZ::EntityId assetNodeId{}; - ScriptCanvas::RuntimeRequestBus::EventResult(assetNodeId, GetOwningScriptCanvasId(), &ScriptCanvas::RuntimeRequests::FindAssetNodeIdByRuntimeNodeId, GetEntityId()); - - SC_EXECUTION_TRACE_ANNOTATE_NODE((*this), (AnnotateNodeSignal(CreateGraphInfo(GetOwningScriptCanvasId(), GetGraphIdentifier()), AnnotateNodeSignal::AnnotationLevel::Info, text, AZ::NamedEntityId(assetNodeId, GetNodeName())))); -#endif - SignalOutput(GetSlotId("Out")); - - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.h index 0f971f99e7..1c16e30cd6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Print.h @@ -8,9 +8,7 @@ #pragma once #include - #include - #include namespace ScriptCanvas @@ -23,12 +21,8 @@ namespace ScriptCanvas class Print : public Internal::StringFormatted { - protected: - + public: SCRIPTCANVAS_NODE(Print); - - void OnInputSignal(const SlotId&) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.cpp index 56a7ae2ef8..57e2510baa 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.cpp @@ -51,28 +51,6 @@ namespace ScriptCanvas } } - void Replace::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Replace::OnInputSignal"); - - AZStd::string sourceString = ReplaceProperty::GetSource(this); - AZStd::string replaceString = ReplaceProperty::GetReplace(this); - AZStd::string withString = ReplaceProperty::GetWith(this); - - bool caseSensitive = ReplaceProperty::GetCaseSensitive(this); - - AzFramework::StringFunc::Replace(sourceString, replaceString.c_str(), withString.c_str(), caseSensitive); - - const SlotId outputResultSlotId = ReplaceProperty::GetResultSlotId(this); - - ScriptCanvas::Datum output(sourceString); - if (auto* outputSlot = GetSlot(outputResultSlotId)) - { - PushOutput(output, *outputSlot); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.h index 6c69818ac9..db31a85a82 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Replace.h @@ -28,11 +28,6 @@ namespace ScriptCanvas void OnInit() override; void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; - - protected: - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.cpp index ad36615e26..959b8ef3c8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.cpp @@ -31,108 +31,15 @@ namespace ScriptCanvas } } - void StartsWith::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::StartsWith::OnInputSignal"); - - AZStd::string sourceString = StartsWithProperty::GetSource(this); - AZStd::string patternString = StartsWithProperty::GetPattern(this); - - bool caseSensitive = StartsWithProperty::GetCaseSensitive(this); - - if (AzFramework::StringFunc::StartsWith(sourceString.c_str(), patternString.c_str(), caseSensitive)) - { - SignalOutput(GetSlotId("True")); - } - else - { - SignalOutput(GetSlotId("False")); - } - } - - void EndsWith::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::EndssWith::OnInputSignal"); - - AZStd::string sourceString = EndsWithProperty::GetSource(this); - AZStd::string patternString = EndsWithProperty::GetPattern(this); - - bool caseSensitive = EndsWithProperty::GetCaseSensitive(this); - - if (AzFramework::StringFunc::EndsWith(sourceString.c_str(), patternString.c_str(), caseSensitive)) - { - SignalOutput(GetSlotId("True")); - } - else - { - SignalOutput(GetSlotId("False")); - } - } - void Split::CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const { ReplaceStringUtilityNodeOutputSlot(this, replacementNode, outSlotIdMap); } - void Split::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Split::OnInputSignal"); - - AZStd::string sourceString = SplitProperty::GetSource(this); - AZStd::string delimiterString = SplitProperty::GetDelimiters(this); - - AZStd::vector stringArray; - - AzFramework::StringFunc::Tokenize(sourceString.c_str(), stringArray, delimiterString.c_str(), false, false); - - const SlotId outputResultSlotId = SplitProperty::GetStringArraySlotId(this); - if (auto* outputSlot = GetSlot(outputResultSlotId)) - { - ScriptCanvas::Datum output(ScriptCanvas::Data::FromAZType(azrtti_typeid>()), ScriptCanvas::Datum::eOriginality::Original, &stringArray, azrtti_typeid>()); - PushOutput(output, *outputSlot); - } - - SignalOutput(GetSlotId("Out")); - } - void Join::CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const { ReplaceStringUtilityNodeOutputSlot(this, replacementNode, outSlotIdMap); } - - void Join::OnInputSignal(const SlotId&) - { - AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Join::OnInputSignal"); - - AZStd::vector sourceArray = JoinProperty::GetStringArray(this); - AZStd::string separatorString = JoinProperty::GetSeparator(this); - - AZStd::string result; - size_t index = 0; - const size_t length = sourceArray.size(); - for (auto string : sourceArray) - { - if (index < length - 1) - { - result.append(AZStd::string::format("%s%s", string.c_str(), separatorString.c_str())); - } - else - { - result.append(string); - } - ++index; - } - - const SlotId outputResultSlotId = JoinProperty::GetStringSlotId(this); - if (auto* outputSlot = GetSlot(outputResultSlotId)) - { - ScriptCanvas::Datum output(result); - PushOutput(output, *outputSlot); - } - - SignalOutput(GetSlotId("Out")); - } - } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h index c1dad1f0e5..c325414ca3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h @@ -24,11 +24,7 @@ namespace ScriptCanvas { public: SCRIPTCANVAS_NODE(StartsWith); - protected: - - void OnInputSignal(const SlotId& slotId) override; - - }; + }; //! Deprecated: see class String's reflection of method "Ends With" class EndsWith @@ -36,10 +32,6 @@ namespace ScriptCanvas { public: SCRIPTCANVAS_NODE(EndsWith); - protected: - - void OnInputSignal(const SlotId& slotId) override; - }; //! Deprecated: see class String's reflection of method "Ends With" @@ -55,9 +47,6 @@ namespace ScriptCanvas protected: static const char* k_defaultDelimiter; - - void OnInputSignal(const SlotId& slotId) override; - }; //! Deprecated: see class String's reflection of method "Join" @@ -73,9 +62,6 @@ namespace ScriptCanvas protected: static const char* k_defaultSeparator; - - void OnInputSignal(const SlotId& slotId) override; - }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.cpp index ee06418e68..f9afd2b80c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.cpp @@ -38,28 +38,11 @@ namespace ScriptCanvas } } - void TimeDelay::OnInputSignal(const SlotId& slotId) - { - if (slotId == TimeDelayProperty::GetInSlotId(this)) - { - if (!IsActive()) - { - StartTimer(); - } - } - } - bool TimeDelay::AllowInstantResponse() const { return true; } - void TimeDelay::OnTimeElapsed() - { - StopTimer(); - SignalOutput(TimeDelayProperty::GetOutSlotId(this)); - } - ////////////// // TickDelay ////////////// @@ -85,56 +68,6 @@ namespace ScriptCanvas { } - void TickDelay::OnDeactivate() - { - AZ::TickBus::Handler::BusDisconnect(); - AZ::SystemTickBus::Handler::BusDisconnect(); - } - - void TickDelay::OnInputSignal(const SlotId&) - { - m_tickCounter = TickDelayProperty::GetTicks(this); - - if (m_tickCounter >= 0) - { - if (!AZ::SystemTickBus::Handler::BusIsConnected()) - { - AZ::SystemTickBus::Handler::BusConnect(); - } - } - } - - void TickDelay::OnSystemTick() - { - AZ::SystemTickBus::Handler::BusDisconnect(); - - if (!AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusDisconnect(); - } - - m_tickOrder = TickDelayProperty::GetTickOrder(this); - AZ::TickBus::Handler::BusConnect(); - } - - void TickDelay::OnTick(float, AZ::ScriptTimePoint) - { - --m_tickCounter; - - if (m_tickCounter <= 0) - { - const SlotId outSlot = TickDelayProperty::GetOutSlotId(this); - - SignalOutput(outSlot); - AZ::TickBus::Handler::BusDisconnect(); - } - } - - int TickDelay::GetTickOrder() - { - return m_tickOrder; - } - ////////////// // CountDown ////////////// @@ -148,86 +81,12 @@ namespace ScriptCanvas , m_currentTime(0.) {} - void Countdown::OnInputSignal(const SlotId& slot) - { - SlotId inSlotId = CountdownProperty::GetInSlotId(this); - SlotId resetSlotId = CountdownProperty::GetResetSlotId(this); - SlotId cancelSlotId = CountdownProperty::GetCancelSlotId(this); - - if (slot == resetSlotId || (slot == inSlotId && !AZ::TickBus::Handler::BusIsConnected())) - { - // If we're resetting, we need to disconnect. - AZ::TickBus::Handler::BusDisconnect(); - - m_countdownSeconds = CountdownProperty::GetTime(this); - m_looping = CountdownProperty::GetLoop(this); - m_holdTime = CountdownProperty::GetHold(this); - - m_currentTime = m_countdownSeconds; - - AZ::TickBus::Handler::BusConnect(); - } - else if (slot == cancelSlotId) - { - m_holding = false; - m_currentTime = 0.f; - - AZ::TickBus::Handler::BusDisconnect(); - } - } - bool Countdown::IsOutOfDate(const VersionData& graphVersion) const { AZ_UNUSED(graphVersion); return !CountdownProperty::GetCancelSlotId(this).IsValid(); } - void Countdown::OnTick(float deltaTime, AZ::ScriptTimePoint) - { - m_currentTime -= static_cast(deltaTime); - - if (m_currentTime <= 0.f) - { - if (m_holding) - { - m_holding = false; - m_currentTime = m_countdownSeconds; - return; - } - else - { - const SlotId outSlot = CountdownProperty::GetOutSlotId(this); - - if (Slot* elapsedSlot = CountdownProperty::GetElapsedSlot(this)) - { - float elapsedTime = m_countdownSeconds - m_currentTime; - - Datum o(Data::Type::Number(), Datum::eOriginality::Copy); - o.Set(elapsedTime); - - PushOutput(o, *elapsedSlot); - } - - SignalOutput(outSlot); - } - - if (!m_looping) - { - AZ::TickBus::Handler::BusDisconnect(); - } - else - { - m_holding = m_holdTime > 0.f; - m_currentTime = m_holding ? m_holdTime : m_countdownSeconds; - } - } - } - - void Countdown::OnDeactivate() - { - AZ::TickBus::Handler::BusDisconnect(); - } - UpdateResult Countdown::OnUpdateNode() { // Add in the missing cancel slot diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h index 1809bece64..f859c9900c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h @@ -36,10 +36,8 @@ namespace ScriptCanvas TimeDelay() = default; - void OnInputSignal(const SlotId&) override; bool AllowInstantResponse() const override; - void OnTimeElapsed() override; const char* GetBaseTimeSlotToolTip() const override { return "The amount of time to delay before the Out is signalled."; } @@ -48,8 +46,6 @@ namespace ScriptCanvas // Deprecated: see TimeDelayNodeableNode class TickDelay : public Node - , AZ::TickBus::Handler - , AZ::SystemTickBus::Handler { public: @@ -59,18 +55,6 @@ namespace ScriptCanvas void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; - void OnDeactivate() override; - void OnInputSignal(const SlotId&) override; - - // SystemTickBus... - void OnSystemTick() override; - //// - - // TickBus... - void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override; - int GetTickOrder() override; - //// - protected: int m_tickCounter; @@ -80,7 +64,6 @@ namespace ScriptCanvas //! Deprecated: see DelayNodeableNode class Countdown : public Node - , AZ::TickBus::Handler { public: @@ -101,8 +84,6 @@ namespace ScriptCanvas //! Internal counter to track time elapsed float m_currentTime; - void OnInputSignal(const SlotId&) override; - bool ShowHoldTime() const { // TODO: This only works on the property grid. If a true value is connected to the "SetLoop" slot, @@ -114,12 +95,6 @@ namespace ScriptCanvas protected: - void OnDeactivate() override; - - // AZ::TickBus - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - //// - UpdateResult OnUpdateNode() override; }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.cpp index c1e47e21b9..e7f9413166 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.cpp @@ -21,48 +21,6 @@ namespace ScriptCanvas , m_elapsedTime(0.f) , m_currentTime(0.) {} - - void Duration::OnInputSignal(const SlotId&) - { - m_durationSeconds = DurationProperty::GetDuration(this); - m_elapsedTime = 0.f; - - m_currentTime = m_durationSeconds; - - AZ::TickBus::Handler::BusConnect(); - } - - void Duration::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time) - { - const SlotId outSlot = DurationProperty::GetOutSlotId(this); - const SlotId doneSlot = DurationProperty::GetDoneSlotId(this); - const SlotId elapsedSlot = DurationProperty::GetElapsedSlotId(this); - - if (m_currentTime > 0.f) - { - Datum o(Data::Type::Number(), Datum::eOriginality::Copy); - o.Set(m_elapsedTime); - if (auto* slot = GetSlot(elapsedSlot)) - { - PushOutput(o, *slot); - } - - SignalOutput(outSlot); - - m_currentTime -= static_cast(deltaTime); - m_elapsedTime += static_cast(deltaTime); - } - else - { - SignalOutput(doneSlot); - AZ::TickBus::Handler::BusDisconnect(); - } - } - - void Duration::OnDeactivate() - { - AZ::TickBus::Handler::BusDisconnect(); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h index dd6c7868cf..481f0c97be 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h @@ -25,7 +25,6 @@ namespace ScriptCanvas //! Deprecated: see DurationNodeableNode class Duration : public Node - , AZ::TickBus::Handler { public: @@ -41,14 +40,6 @@ namespace ScriptCanvas //! Internal counter to track time elapsed float m_currentTime; - - void OnInputSignal(const SlotId&) override; - - protected: - - void OnDeactivate() override; - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp index 62ed77ab2f..350a64923e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.cpp @@ -38,22 +38,6 @@ namespace ScriptCanvas } } - void HeartBeat::OnInputSignal(const SlotId& slotId) - { - if (slotId == HeartBeatProperty::GetStartSlotId(this)) - { - StartTimer(); - } - else if (slotId == HeartBeatProperty::GetStopSlotId(this)) - { - StopTimer(); - } - } - - void HeartBeat::OnTimeElapsed() - { - SignalOutput(HeartBeatProperty::GetPulseSlotId(this)); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h index 967376e932..680e974429 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h @@ -27,14 +27,11 @@ namespace ScriptCanvas void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; - void OnInputSignal(const SlotId&) override; - const char* GetBaseTimeSlotName() const override { return "Interval"; } const char* GetBaseTimeSlotToolTip() const override { return "The amount of time between pulses."; } protected: - void OnTimeElapsed() override; }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp index 0465c49b43..b2cffe79af 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp @@ -21,49 +21,6 @@ namespace ScriptCanvas , m_milliseconds(0.f) {} - void Timer::OnTick([[maybe_unused]] float deltaTime, AZ::ScriptTimePoint time) - { - const SlotId millisecondsSlot = TimerProperty::GetMillisecondsSlotId(this); - - double milliseconds = time.GetMilliseconds() - m_start.GetMilliseconds(); - Datum objms(Data::Type::Number(), Datum::eOriginality::Copy); - objms.Set(milliseconds); - if (auto* slot = GetSlot(millisecondsSlot)) - { - PushOutput(objms, *slot); - } - - const SlotId secondsSlot = TimerProperty::GetSecondsSlotId(this); - - double seconds = time.GetSeconds() - m_start.GetSeconds(); - Datum objs(Data::Type::Number(), Datum::eOriginality::Copy); - objs.Set(seconds); - if (auto* slot = GetSlot(secondsSlot)) - { - PushOutput(objs, *slot); - } - - const SlotId outSlot = TimerProperty::GetOutSlotId(this); - SignalOutput(outSlot); - - } - - void Timer::OnInputSignal(const SlotId& slotId) - { - const SlotId startSlot = TimerProperty::GetStartSlotId(this); - const SlotId stopSlot = TimerProperty::GetStopSlotId(this); - - if (slotId == startSlot) - { - AZ::TickBus::Handler::BusConnect(); - m_start = AZ::ScriptTimePoint(); - } - else if (slotId == stopSlot) - { - AZ::TickBus::Handler::BusDisconnect(); - } - } - void Timer::OnDeactivate() { AZ::TickBus::Handler::BusDisconnect(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h index 58ba646891..fa5f4309ed 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h @@ -25,7 +25,6 @@ namespace ScriptCanvas //! Deprecated: See TimerNodeableNode class Timer : public Node - , AZ::TickBus::Handler { public: @@ -39,12 +38,7 @@ namespace ScriptCanvas protected: AZ::ScriptTimePoint m_start; - - void OnInputSignal(const SlotId& slotId) override; - void OnDeactivate() override; - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp index 301db76008..55eded5b2f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp @@ -15,13 +15,7 @@ namespace ScriptCanvas { namespace UnitTesting { - void AddFailure::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - ScriptCanvas::UnitTesting::Bus::Event(GetOwningScriptCanvasId(), &ScriptCanvas::UnitTesting::BusTraits::AddFailure, *report); - - SignalOutput(GetSlotId("Out")); - } + } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h index 1c0e5a6fd4..88d7ab5e24 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h @@ -23,9 +23,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(AddFailure); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp deleted file mode 100644 index ee9b8975b0..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "AddSuccess.h" - -#include "UnitTestBus.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace UnitTesting - { - void AddSuccess::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddSuccess - , *report); - - SignalOutput(GetSlotId("Out")); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h index c6793ad432..68f494bb72 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h @@ -23,9 +23,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(AddSuccess); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp deleted file mode 100644 index 5b77bea492..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "Checkpoint.h" - -#include "UnitTestBus.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace UnitTesting - { - void Checkpoint::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - - ScriptCanvas::UnitTesting::Bus::Event(GetOwningScriptCanvasId(), &ScriptCanvas::UnitTesting::BusTraits::Checkpoint, *report); - - SignalOutput(GetSlotId("Out")); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h index 551d250b6b..db7c666a78 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h @@ -22,9 +22,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(Checkpoint); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp index 019286355b..142ef9932a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectEqual::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_EQUALITY_IMPLEMENTATIONS(ExpectEqual); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h index bfb5b4ffb2..623a928aa2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectEqual); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp index 77bf80fd73..c128f4c30f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.cpp @@ -33,20 +33,6 @@ namespace ScriptCanvas } //// } - - void ExpectFalse::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto value = FindDatum(GetSlotId("Candidate"))->GetAs(); - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::ExpectFalse - , *value - , *report); - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h index ca18f6f2d5..a50cba74d0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectFalse.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectFalse); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp index 28e2f7a8bd..ded5ae7050 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectGreaterThan::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_COMPARE_IMPLEMENTATIONS(ExpectGreaterThan); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h index d9d7f8630d..94219fab60 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThan.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectGreaterThan); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp index 7b782094de..6e2931112d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectGreaterThanEqual::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_COMPARE_IMPLEMENTATIONS(ExpectGreaterThanEqual); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h index 7ef46a9dc9..2607e2569f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectGreaterThanEqual); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp index 327cfb49b3..1ea4afcf5a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.cpp @@ -48,41 +48,6 @@ namespace ScriptCanvas SetDynamicGroup(referenceSlot->GetId(), AZ_CRC("DynamicGroup", 0x219a2e3a)); } } - //// - } - - void ExpectLessThan::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_COMPARE_IMPLEMENTATIONS(ExpectLessThan); - } - - SignalOutput(GetSlotId("Out")); } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h index fb9ca5737c..bc8e70a3be 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThan.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectLessThan); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp index 3649816abc..2357ab5068 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectLessThanEqual::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_COMPARE_IMPLEMENTATIONS(ExpectLessThanEqual); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h index 577aa4f8ff..0408a58a35 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectLessThanEqual.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectLessThanEqual); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp index 6b5d3fa98c..1182d7db4f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.cpp @@ -50,40 +50,6 @@ namespace ScriptCanvas } //// } - - void ExpectNotEqual::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - auto lhs = FindDatum(GetSlotId("Candidate")); - if (!lhs) - { - return; - } - - auto rhs = FindDatum(GetSlotId("Reference")); - if (!rhs) - { - return; - } - - if (lhs->GetType() != rhs->GetType()) - { - ScriptCanvas::UnitTesting::Bus::Event - ( GetOwningScriptCanvasId() - , &ScriptCanvas::UnitTesting::BusTraits::AddFailure - , "Type mismatch in comparison operator"); - - SignalOutput(GetSlotId("Out")); - return; - } - - - switch (lhs->GetType().GetType()) - { - SCRIPT_CANVAS_UNIT_TEST_LEGACY_NODE_EQUALITY_IMPLEMENTATIONS(ExpectNotEqual); - } - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h index effc011b5a..57b7d09a80 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectNotEqual.h @@ -25,8 +25,6 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectNotEqual); void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp index ae0ec8a168..d7b2ca8cf0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp @@ -33,16 +33,6 @@ namespace ScriptCanvas } //// } - - void ExpectTrue::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto value = FindDatum(GetSlotId("Candidate"))->GetAs(); - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - - ScriptCanvas::UnitTesting::Bus::Event(GetOwningScriptCanvasId(), &ScriptCanvas::UnitTesting::BusTraits::ExpectTrue, *value, *report); - - SignalOutput(GetSlotId("Out")); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h index 6d94dc7403..12d28af093 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h @@ -24,9 +24,7 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectTrue); - void OnInit() override; - void OnInputSignal(const SlotId& slotId) override; - + void OnInit() override; }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp deleted file mode 100644 index e7613695e8..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "MarkComplete.h" - -#include "UnitTestBus.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace UnitTesting - { - void MarkComplete::OnInputSignal([[maybe_unused]] const SlotId& slotId) - { - const auto report = FindDatum(GetSlotId("Report"))->GetAs(); - ScriptCanvas::UnitTesting::Bus::Event(GetOwningScriptCanvasId(), &ScriptCanvas::UnitTesting::BusTraits::MarkComplete, *report); - SignalOutput(GetSlotId("Out")); - } - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h index 9f86fe5b28..126746019f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h @@ -23,9 +23,6 @@ namespace ScriptCanvas public: SCRIPTCANVAS_NODE(MarkComplete); - - void OnInputSignal(const SlotId& slotId) override; - }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp index ece0357626..058489374f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include namespace ScriptCanvas @@ -412,37 +411,6 @@ namespace ScriptCanvas return AZ::Edit::PropertyVisibility::Show; } - AZ::Crc32 GraphVariable::GetScriptInputControlVisibility() const - { - AZ::Data::AssetType assetType = AZ::Data::AssetType::CreateNull(); - - ScriptCanvas::RuntimeRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetType); - - if (assetType == azrtti_typeid()) - { - return m_inputControlVisibility; - } - else - { - return AZ::Edit::PropertyVisibility::Hide; - } - } - - AZ::Crc32 GraphVariable::GetFunctionInputControlVisibility() const - { - AZ::Data::AssetType assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::RuntimeRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetType); - - if (assetType == azrtti_typeid()) - { - return AZ::Edit::PropertyVisibility::Show; - } - else - { - return AZ::Edit::PropertyVisibility::Hide; - } - } - AZ::Crc32 GraphVariable::GetVisibility() const { return m_visibility; @@ -552,7 +520,7 @@ namespace ScriptCanvas bool GraphVariable::IsInFunction() const { AZ::Data::AssetType assetType = AZ::Data::AssetType::CreateNull(); - ScriptCanvas::RuntimeRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::RuntimeRequests::GetAssetType); + ScriptCanvas::GraphRequestBus::EventResult(assetType, m_scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetType); return assetType == azrtti_typeid(); } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h index b6ad7fcf30..90086ac7f7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h @@ -140,10 +140,8 @@ namespace ScriptCanvas AZ::Crc32 GetInputControlVisibility() const; AZ::Crc32 GetScopeControlVisibility() const; - AZ::Crc32 GetScriptInputControlVisibility() const; AZ::Crc32 GetNetworkSettingsVisibility() const; - AZ::Crc32 GetFunctionInputControlVisibility() const; - + AZ::Crc32 GetVisibility() const; void SetVisibility(AZ::Crc32 visibility); diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index 312bd2679a..74e0e2e70c 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -35,7 +35,6 @@ set(FILES Include/ScriptCanvas/Core/NodeBus.h Include/ScriptCanvas/Core/EBusNodeBus.h Include/ScriptCanvas/Core/NodelingBus.h - Include/ScriptCanvas/Core/SignalBus.h Include/ScriptCanvas/Core/ContractBus.h Include/ScriptCanvas/Core/Attributes.h Include/ScriptCanvas/Core/Connection.cpp @@ -169,7 +168,6 @@ set(FILES Include/ScriptCanvas/Execution/NativeHostDeclarations.cpp Include/ScriptCanvas/Execution/NativeHostDefinitions.h Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp - Include/ScriptCanvas/Execution/RuntimeBus.h Include/ScriptCanvas/Execution/RuntimeComponent.h Include/ScriptCanvas/Execution/RuntimeComponent.cpp Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.h @@ -199,8 +197,6 @@ set(FILES Include/ScriptCanvas/Grammar/DebugMap.cpp Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.h Include/ScriptCanvas/Grammar/ExecutionTraversalListeners.cpp - Include/ScriptCanvas/Grammar/FunctionsLegacySupport.h - Include/ScriptCanvas/Grammar/FunctionsLegacySupport.cpp Include/ScriptCanvas/Grammar/GrammarContext.h Include/ScriptCanvas/Grammar/GrammarContext.cpp Include/ScriptCanvas/Grammar/GrammarContextBus.h @@ -223,7 +219,6 @@ set(FILES Include/ScriptCanvas/Execution/NativeHostDeclarations.h Include/ScriptCanvas/Execution/NativeHostDefinitions.cpp Include/ScriptCanvas/Execution/NativeHostDefinitions.h - Include/ScriptCanvas/Execution/RuntimeBus.h Include/ScriptCanvas/Execution/RuntimeComponent.cpp Include/ScriptCanvas/Execution/RuntimeComponent.h Include/ScriptCanvas/Internal/Nodeables/BaseTimer.cpp @@ -300,7 +295,6 @@ set(FILES Include/ScriptCanvas/Libraries/Core/SetVariable.cpp Include/ScriptCanvas/Libraries/Core/SetVariable.h Include/ScriptCanvas/Libraries/Core/SetVariable.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Core/Start.cpp Include/ScriptCanvas/Libraries/Core/Start.h Include/ScriptCanvas/Libraries/Core/Start.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Core/UnaryOperator.cpp @@ -324,7 +318,6 @@ set(FILES Include/ScriptCanvas/Libraries/Logic/Gate.cpp Include/ScriptCanvas/Libraries/Logic/Gate.h Include/ScriptCanvas/Libraries/Logic/Gate.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/Logic/Indexer.cpp Include/ScriptCanvas/Libraries/Logic/Indexer.h Include/ScriptCanvas/Libraries/Logic/Indexer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/IsNull.cpp @@ -332,7 +325,6 @@ set(FILES Include/ScriptCanvas/Libraries/Logic/IsNull.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/Logic.cpp Include/ScriptCanvas/Libraries/Logic/Logic.h - Include/ScriptCanvas/Libraries/Logic/Multiplexer.cpp Include/ScriptCanvas/Libraries/Logic/Multiplexer.h Include/ScriptCanvas/Libraries/Logic/Multiplexer.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/Logic/Not.h @@ -429,7 +421,6 @@ set(FILES Include/ScriptCanvas/Libraries/String/Format.cpp Include/ScriptCanvas/Libraries/String/Format.h Include/ScriptCanvas/Libraries/String/Format.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/String/Print.cpp Include/ScriptCanvas/Libraries/String/Print.h Include/ScriptCanvas/Libraries/String/Print.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/String/Replace.cpp @@ -446,10 +437,8 @@ set(FILES Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.h Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.cpp Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.h Include/ScriptCanvas/Libraries/UnitTesting/AddSuccess.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.cpp Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.h Include/ScriptCanvas/Libraries/UnitTesting/Checkpoint.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/ExpectEqual.cpp @@ -476,7 +465,6 @@ set(FILES Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.cpp Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.ScriptCanvasGrammar.xml - Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.cpp Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.h Include/ScriptCanvas/Libraries/UnitTesting/MarkComplete.ScriptCanvasGrammar.xml Include/ScriptCanvas/Libraries/UnitTesting/UnitTestBus.h diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.cpp b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.cpp index cf866d9f83..727f73be39 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.cpp @@ -33,25 +33,6 @@ namespace TestNodes AddSlot(slotConfiguration); } - void TestResult::OnInputSignal(const ScriptCanvas::SlotId&) - { - auto valueDatum = FindDatum(GetSlotId("Value")); - if (!valueDatum) - { - return; - } - - valueDatum->ToString(m_string); - - // technically, I should remove this, make it an object that holds a string, with an untyped slot, and this could be a local value - if (!m_string.empty()) - { - AZ_TracePrintf("Script Canvas", "%s\n", m_string.c_str()); - } - - SignalOutput(GetSlotId(ScriptCanvas::CommonSlots::GeneralOutSlot::GetName())); - } - void TestResult::Reflect(AZ::ReflectContext* context) { AZ::SerializeContext* serializeContext = azrtti_cast(context); @@ -105,11 +86,6 @@ namespace TestNodes AddSlot(ScriptCanvas::DataSlotConfiguration(Data::Type::Number(), "Get Number", ScriptCanvas::ConnectionType::Output)); } - void ContractNode::OnInputSignal(const ScriptCanvas::SlotId&) - { - SignalOutput(GetSlotId(ScriptCanvas::CommonSlots::GeneralOutSlot::GetName())); - } - ////////////////////////////////////////////////////////////////////////////// void InfiniteLoopNode::Reflect(AZ::ReflectContext* reflection) { @@ -121,11 +97,6 @@ namespace TestNodes } } - void InfiniteLoopNode::OnInputSignal(const ScriptCanvas::SlotId&) - { - SignalOutput(GetSlotId("Before Infinity")); - } - void InfiniteLoopNode::OnInit() { AddSlot(ScriptCanvas::CommonSlots::GeneralInSlot()); @@ -159,13 +130,6 @@ namespace TestNodes AddSlot(slotConfiguration); } - void UnitTestErrorNode::OnInputSignal(const ScriptCanvas::SlotId&) - { - SCRIPTCANVAS_REPORT_ERROR((*this), "Unit test error!"); - - SignalOutput(GetSlotId("Out")); - } - ////////////////////////////////////////////////////////////////////////////// void AddNodeWithRemoveSlot::Reflect(AZ::ReflectContext* reflection) @@ -205,30 +169,6 @@ namespace TestNodes return Node::RemoveSlot(slotId, true, emitWarning); } - void AddNodeWithRemoveSlot::OnInputSignal(const ScriptCanvas::SlotId& slotId) - { - if (slotId == GetSlotId("In")) - { - ScriptCanvas::Data::NumberType result{}; - for (const ScriptCanvas::SlotId& dynamicSlotId : m_dynamicSlotIds) - { - if (auto numberInput = FindDatum(dynamicSlotId)) - { - if (auto argValue = numberInput->GetAs()) - { - result += *argValue; - } - } - } - - auto resultType = GetSlotDataType(m_resultSlotId); - EXPECT_TRUE(resultType.IsValid()); - ScriptCanvas::Datum output(result);; - PushOutput(output, *GetSlot(m_resultSlotId)); - SignalOutput(GetSlotId("Out")); - } - } - void AddNodeWithRemoveSlot::OnInit() { Node::AddSlot(ScriptCanvas::CommonSlots::GeneralInSlot()); @@ -290,28 +230,6 @@ namespace TestNodes } ////////////////////////////////////////////////////////////////////////////// - - void StringView::OnInputSignal(const ScriptCanvas::SlotId&) - { - auto viewDatum = FindDatum(GetSlotId("View")); - - if (!viewDatum) - { - return; - } - - ScriptCanvas::Data::StringType result; - viewDatum->ToString(result); - - ScriptCanvas::Datum output(result); - auto resultSlot = GetSlot(m_resultSlotId); - if (resultSlot) - { - PushOutput(output, *resultSlot); - } - SignalOutput(GetSlotId("Out")); - } - void StringView::Reflect(AZ::ReflectContext* context) { AZ::SerializeContext* serializeContext = azrtti_cast(context); @@ -354,36 +272,6 @@ namespace TestNodes return addedSlotId; } - - void InsertSlotConcatNode::OnInputSignal(const ScriptCanvas::SlotId& slotId) - { - if (slotId == GetSlotId(ScriptCanvas::CommonSlots::GeneralInSlot::GetName())) - { - ScriptCanvas::Data::StringType result{}; - - for (const ScriptCanvas::Slot* concatSlot : GetAllSlotsByDescriptor(ScriptCanvas::SlotDescriptors::DataIn())) - { - if (auto inputDatum = FindDatum(concatSlot->GetId())) - { - ScriptCanvas::Data::StringType stringArg; - if (inputDatum->ToString(stringArg)) - { - result += stringArg; - } - } - } - - auto resultSlotId = GetSlotId("Result"); - auto resultType = GetSlotDataType(resultSlotId); - EXPECT_TRUE(resultType.IsValid()); - if (auto resultSlot = GetSlot(resultSlotId)) - { - PushOutput(ScriptCanvas::Datum(result), *resultSlot); - } - SignalOutput(GetSlotId("Out")); - } - } - void InsertSlotConcatNode::OnInit() { Node::AddSlot(ScriptCanvas::CommonSlots::GeneralInSlot()); diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.h index 8963cb4708..3790ab735f 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestNodes.h @@ -32,7 +32,6 @@ namespace TestNodes protected: void OnInit() override; - void OnInputSignal(const ScriptCanvas::SlotId&) override; private: @@ -49,9 +48,6 @@ namespace TestNodes void OnInit() override; - protected: - - void OnInputSignal(const ScriptCanvas::SlotId&) override; }; ////////////////////////////////////////////////////////////////////////////// @@ -64,9 +60,6 @@ namespace TestNodes static void Reflect(AZ::ReflectContext* reflection); protected: - - void OnInputSignal(const ScriptCanvas::SlotId&) override; - void OnInit() override; }; @@ -84,8 +77,6 @@ namespace TestNodes void OnInit() override; - void OnInputSignal(const ScriptCanvas::SlotId&) override; - }; ////////////////////////////////////////////////////////////////////////////// @@ -101,8 +92,6 @@ namespace TestNodes bool RemoveSlot(const ScriptCanvas::SlotId& slotId, bool emitWarning = true); protected: - void OnInputSignal(const ScriptCanvas::SlotId& slotId) override; - void OnInit() override; AZStd::vector m_dynamicSlotIds; @@ -120,8 +109,6 @@ namespace TestNodes void OnInit() override; - void OnInputSignal(const ScriptCanvas::SlotId&) override; - public: static void Reflect(AZ::ReflectContext* context); @@ -141,9 +128,7 @@ namespace TestNodes ScriptCanvas::SlotId InsertSlot(AZ::s64 index, AZStd::string_view slotName); protected: - void OnInputSignal(const ScriptCanvas::SlotId& slotId) override; - - void OnInit() override; + void OnInit() override; }; ////////////////////////////////////////////////////////////////////////////// diff --git a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h index dcc4d2eb3f..ba48af6ac3 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h +++ b/Gems/ScriptCanvasTesting/Code/Source/Framework/ScriptCanvasTestUtilities.h @@ -69,23 +69,6 @@ namespace ScriptCanvasTests return GetTestNode(scriptCanvasId, entityOut); } - ScriptCanvas::Node* CreateDataNodeByType(const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const ScriptCanvas::Data::Type& type, AZ::EntityId& nodeIDout); - - template - ScriptCanvas::Node* CreateDataNode(const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const t_Value& value, AZ::EntityId& nodeIDout) - { - using namespace ScriptCanvas; - const Data::Type operandType = Data::FromAZType(azrtti_typeid()); - Node* node = CreateDataNodeByType(scriptCanvasId, operandType, nodeIDout); - - EXPECT_NE(node, nullptr); - if (node) - { - node->SetInput_UNIT_TEST("Set", value); - } - return node; - } - template ScriptCanvas::VariableId CreateVariable(ScriptCanvas::ScriptCanvasId scriptCanvasId, const t_Value& value, AZStd::string_view variableName) { diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp index c602bde1f2..c1fdbc2b60 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_BehaviorContext.cpp @@ -19,145 +19,6 @@ using namespace ScriptCanvasTests; using namespace ScriptCanvasEditor; using namespace TestNodes; -// Tests the basic footprint of the ebus node both before and after graph activation to make sure all internal bookeeping is correct. -TEST_F(ScriptCanvasTestFixture, BehaviorContext_BusHandlerNodeFootPrint) -{ - using namespace ScriptCanvas; - - TemplateEventTestHandler::Reflect(m_serializeContext); - TemplateEventTestHandler::Reflect(m_behaviorContext); - - auto graphEntity = aznew AZ::Entity; - SystemRequestBus::Broadcast(&SystemRequests::CreateGraphOnEntity, graphEntity); - ScriptCanvas::Graph* graph = AZ::EntityUtils::FindFirstDerivedComponent(graphEntity); - graphEntity->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId uuidEventHandlerId; - auto uuidEventHandler = CreateTestNode(graphUniqueId, uuidEventHandlerId); - uuidEventHandler->InitializeBus("TemplateEventTestHandler"); - AZ::Uuid uuidBusId = AZ::Uuid::CreateName("TemplateEventBus"); - uuidEventHandler->SetInput_UNIT_TEST(ScriptCanvas::Nodes::Core::EBusEventHandler::c_busIdName, uuidBusId); //Set Uuid bus id - - { - auto eventEntry = uuidEventHandler->FindEvent("VectorCreatedEvent"); - EXPECT_NE(nullptr, eventEntry); - EXPECT_EQ(eventEntry->m_parameterSlotIds.size(), 1); - EXPECT_TRUE(eventEntry->m_resultSlotId.IsValid()); - - { - const Slot* outputSlot = uuidEventHandler->GetSlot(eventEntry->m_eventSlotId); - EXPECT_EQ(outputSlot->GetDescriptor(), SlotDescriptors::ExecutionOut()); - } - - { - const Slot* dataSlot = uuidEventHandler->GetSlot(eventEntry->m_parameterSlotIds[0]); - - EXPECT_EQ(dataSlot->GetDescriptor(), SlotDescriptors::DataOut()); - EXPECT_EQ(dataSlot->GetDataType(), Data::Type::Vector3()); - - const Datum* datum = uuidEventHandler->FindDatum(eventEntry->m_parameterSlotIds[0]); - EXPECT_EQ(nullptr, datum); - - ModifiableDatumView datumView; - uuidEventHandler->FindModifiableDatumView(eventEntry->m_parameterSlotIds[0], datumView); - - EXPECT_FALSE(datumView.IsValid()); - } - - { - const Slot* resultSlot = uuidEventHandler->GetSlot(eventEntry->m_resultSlotId); - - EXPECT_EQ(resultSlot->GetDescriptor(), SlotDescriptors::DataIn()); - EXPECT_EQ(resultSlot->GetDataType(), Data::Type::Vector3()); - - const Datum* datum = uuidEventHandler->FindDatum(eventEntry->m_resultSlotId); - EXPECT_NE(nullptr, datum); - - if (datum) - { - EXPECT_TRUE(datum->IS_A()); - } - - ModifiableDatumView datumView; - uuidEventHandler->FindModifiableDatumView(eventEntry->m_resultSlotId, datumView); - - EXPECT_TRUE(datumView.IsValid()); - - if (datumView.IsValid()) - { - const Datum* datum2 = datumView.GetDatum(); - EXPECT_TRUE(datum2->IS_A()); - } - } - } - - graphEntity->Activate(); - - { - auto eventEntry = uuidEventHandler->FindEvent("VectorCreatedEvent"); - EXPECT_NE(nullptr, eventEntry); - EXPECT_EQ(eventEntry->m_parameterSlotIds.size(), 1); - EXPECT_TRUE(eventEntry->m_resultSlotId.IsValid()); - - { - const Slot* outputSlot = uuidEventHandler->GetSlot(eventEntry->m_eventSlotId); - EXPECT_EQ(outputSlot->GetDescriptor(), SlotDescriptors::ExecutionOut()); - } - - { - const Slot* dataSlot = uuidEventHandler->GetSlot(eventEntry->m_parameterSlotIds[0]); - - EXPECT_EQ(dataSlot->GetDescriptor(), SlotDescriptors::DataOut()); - EXPECT_EQ(dataSlot->GetDataType(), Data::Type::Vector3()); - - const Datum* datum = uuidEventHandler->FindDatum(eventEntry->m_parameterSlotIds[0]); - EXPECT_EQ(nullptr, datum); - - ModifiableDatumView datumView; - uuidEventHandler->FindModifiableDatumView(eventEntry->m_parameterSlotIds[0], datumView); - - EXPECT_FALSE(datumView.IsValid()); - } - - { - const Slot* resultSlot = uuidEventHandler->GetSlot(eventEntry->m_resultSlotId); - - EXPECT_EQ(resultSlot->GetDescriptor(), SlotDescriptors::DataIn()); - EXPECT_EQ(resultSlot->GetDataType(), Data::Type::Vector3()); - - const Datum* datum = uuidEventHandler->FindDatum(eventEntry->m_resultSlotId); - EXPECT_NE(nullptr, datum); - - if (datum) - { - EXPECT_TRUE(datum->IS_A()); - } - - ModifiableDatumView datumView; - uuidEventHandler->FindModifiableDatumView(eventEntry->m_resultSlotId, datumView); - - EXPECT_TRUE(datumView.IsValid()); - - if (datumView.IsValid()) - { - const Datum* datum2 = datumView.GetDatum(); - EXPECT_TRUE(datum2->IS_A()); - } - } - } - - delete graphEntity; - - m_serializeContext->EnableRemoveReflection(); - m_behaviorContext->EnableRemoveReflection(); - TemplateEventTestHandler::Reflect(m_serializeContext); - TemplateEventTestHandler::Reflect(m_behaviorContext); - m_serializeContext->DisableRemoveReflection(); - m_behaviorContext->DisableRemoveReflection(); -} - void ReflectSignCorrectly() { AZ::BehaviorContext* behaviorContext(nullptr); diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp index d5f4c221c8..9e4252a4f2 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Core.cpp @@ -470,213 +470,11 @@ TEST_F(ScriptCanvasTestFixture, Contracts) graph->GetEntity()->Deactivate(); delete graph->GetEntity(); } -// -// TEST_F(ScriptCanvasTestFixture, BinaryOperationTest) -// { -// -// using namespace ScriptCanvas::Nodes; -// using namespace ScriptCanvas::Nodes::Comparison; -// -// TestBehaviorContextObject::Reflect(m_serializeContext); -// TestBehaviorContextObject::Reflect(m_behaviorContext); -// -// BinaryOpTest(1, 1, true); -// BinaryOpTest(1, 0, false); -// BinaryOpTest(0, 1, false); -// BinaryOpTest(0, 0, true); -// -// BinaryOpTest(1, 1, false); -// BinaryOpTest(1, 0, true); -// BinaryOpTest(0, 1, true); -// BinaryOpTest(0, 0, false); -// -// BinaryOpTest(1, 1, false); -// BinaryOpTest(1, 0, true); -// BinaryOpTest(0, 1, false); -// BinaryOpTest(0, 0, false); -// -// BinaryOpTest(1, 1, true); -// BinaryOpTest(1, 0, true); -// BinaryOpTest(0, 1, false); -// BinaryOpTest(0, 0, true); -// -// BinaryOpTest(1, 1, false); -// BinaryOpTest(1, 0, false); -// BinaryOpTest(0, 1, true); -// BinaryOpTest(0, 0, false); -// -// BinaryOpTest(1, 1, true); -// BinaryOpTest(1, 0, false); -// BinaryOpTest(0, 1, true); -// BinaryOpTest(0, 0, true); -// -// BinaryOpTest(true, true, true); -// BinaryOpTest(true, false, false); -// BinaryOpTest(false, true, false); -// BinaryOpTest(false, false, true); -// -// BinaryOpTest(true, true, false); -// BinaryOpTest(true, false, true); -// BinaryOpTest(false, true, true); -// BinaryOpTest(false, false, false); -// -// AZStd::string string0("a string"); -// AZStd::string string1("b string"); -// -// BinaryOpTest(string1, string1, true); -// BinaryOpTest(string1, string0, false); -// BinaryOpTest(string0, string1, false); -// BinaryOpTest(string0, string0, true); -// -// BinaryOpTest(string1, string1, false); -// BinaryOpTest(string1, string0, true); -// BinaryOpTest(string0, string1, true); -// BinaryOpTest(string0, string0, false); -// -// BinaryOpTest(string1, string1, false); -// BinaryOpTest(string1, string0, true); -// BinaryOpTest(string0, string1, false); -// BinaryOpTest(string0, string0, false); -// -// BinaryOpTest(string1, string1, true); -// BinaryOpTest(string1, string0, true); -// BinaryOpTest(string0, string1, false); -// BinaryOpTest(string0, string0, true); -// -// BinaryOpTest(string1, string1, false); -// BinaryOpTest(string1, string0, false); -// BinaryOpTest(string0, string1, true); -// BinaryOpTest(string0, string0, false); -// -// BinaryOpTest(string1, string1, true); -// BinaryOpTest(string1, string0, false); -// BinaryOpTest(string0, string1, true); -// BinaryOpTest(string0, string0, true); -// -// const AZ::Vector3 vectorOne(1.0f, 1.0f, 1.0f); -// const AZ::Vector3 vectorZero(0.0f, 0.0f, 0.0f); -// -// BinaryOpTest(vectorOne, vectorOne, true); -// BinaryOpTest(vectorOne, vectorZero, false); -// BinaryOpTest(vectorZero, vectorOne, false); -// BinaryOpTest(vectorZero, vectorZero, true); -// -// BinaryOpTest(vectorOne, vectorOne, false); -// BinaryOpTest(vectorOne, vectorZero, true); -// BinaryOpTest(vectorZero, vectorOne, true); -// BinaryOpTest(vectorZero, vectorZero, false); -// -// const TestBehaviorContextObject zero(0); -// const TestBehaviorContextObject one(1); -// const TestBehaviorContextObject otherOne(1); -// -// BinaryOpTest(one, one, true); -// BinaryOpTest(one, zero, false); -// BinaryOpTest(zero, one, false); -// BinaryOpTest(zero, zero, true); -// -// BinaryOpTest(one, one, false); -// BinaryOpTest(one, zero, true); -// BinaryOpTest(zero, one, true); -// BinaryOpTest(zero, zero, false); -// -// BinaryOpTest(one, one, false); -// BinaryOpTest(one, zero, true); -// BinaryOpTest(zero, one, false); -// BinaryOpTest(zero, zero, false); -// -// BinaryOpTest(one, one, true); -// BinaryOpTest(one, zero, true); -// BinaryOpTest(zero, one, false); -// BinaryOpTest(zero, zero, true); -// -// BinaryOpTest(one, one, false); -// BinaryOpTest(one, zero, false); -// BinaryOpTest(zero, one, true); -// BinaryOpTest(zero, zero, false); -// -// BinaryOpTest(one, one, true); -// BinaryOpTest(one, zero, false); -// BinaryOpTest(zero, one, true); -// BinaryOpTest(zero, zero, true); -// -// BinaryOpTest(one, otherOne, true); -// BinaryOpTest(otherOne, one, true); -// -// BinaryOpTest(one, otherOne, false); -// BinaryOpTest(otherOne, one, false); -// -// BinaryOpTest(one, otherOne, false); -// BinaryOpTest(otherOne, one, false); -// -// BinaryOpTest(one, otherOne, true); -// BinaryOpTest(otherOne, one, true); -// -// BinaryOpTest(one, otherOne, false); -// BinaryOpTest(otherOne, one, false); -// -// BinaryOpTest(one, otherOne, true); -// BinaryOpTest(otherOne, one, true); -// -// // force failures, to verify crash proofiness -// BinaryOpTest(one, zero, false, true); -// BinaryOpTest(one, zero, true, true); -// BinaryOpTest(one, zero, true, true); -// BinaryOpTest(one, zero, true, true); -// BinaryOpTest(one, zero, false, true); -// BinaryOpTest(one, zero, false, true); -// -// m_serializeContext->EnableRemoveReflection(); -// m_behaviorContext->EnableRemoveReflection(); -// TestBehaviorContextObject::Reflect(m_serializeContext); -// TestBehaviorContextObject::Reflect(m_behaviorContext); -// m_serializeContext->DisableRemoveReflection(); -// m_behaviorContext->DisableRemoveReflection(); -// } const int k_executionCount = 998; -TEST_F(ScriptCanvasTestFixture, ExecutionLength) -{ - - using namespace ScriptCanvas; - - ScriptCanvas::Graph* graph(nullptr); - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - EXPECT_TRUE(graph != nullptr); - graph->GetEntity()->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startID; - CreateTestNode(graphUniqueId, startID); - - AZ::EntityId previousID = startID; - - for (int i = 0; i < k_executionCount; ++i) - { - AZ::EntityId printNodeID; - TestResult* printNode = CreateTestNode(graphUniqueId, printNodeID); - printNode->SetInput_UNIT_TEST("Value", i); - EXPECT_TRUE(Connect(*graph, previousID, "Out", printNodeID, "In")); - previousID = printNodeID; - } - - AZ::Entity* graphEntity = graph->GetEntity(); - { - ScriptCanvasEditor::ScopedOutputSuppression suppressOutput; - graphEntity->Activate(); - } - - ReportErrors(graph); - - graphEntity->Deactivate(); - delete graphEntity; -} - TEST_F(ScriptCanvasTestFixture, While) { - RunUnitTestGraph("LY_SC_UnitTest_While", ScriptCanvas::ExecutionMode::Interpreted); } diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp index e7657cff65..107bb32cd6 100644 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp +++ b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_RuntimeInterpreted.cpp @@ -931,181 +931,3 @@ TEST_F(ScriptCanvasTestFixture, InterpretedExecutionOutPerformance) { RunUnitTestGraph("LY_SC_UnitTest_ExecutionOutPerformance", ExecutionMode::Interpreted); } - -#if defined(FUNCTION_LEGACY_SUPPORT_ENABLED) - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraph_UserNodeable) -{ - ExpectParse("LY_SC_UnitTest_Subgraph_UserNodeableD"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraph_UserNodeableLatent) -{ - ExpectParse("LY_SC_UnitTest_Subgraph_UserNodeableLatent"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedUseFunctionWithOnGraphStart) -{ - RunUnitTestGraph("LY_SC_UnitTest_UseFunctionWithOnGraphStart"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedUseSubgraphWithStartAndEBus) -{ - RunUnitTestGraph("LY_SC_UnitTests_UseSubgraphWithStartAndEBus"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedDeviousStateFunctionFixGraph) -{ - RunUnitTestGraph("LY_SC_UnitTest_DeviousStateFunctionFixGraph"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedCallFunctionLocalValues) -{ - RunUnitTestGraph("LY_SC_UnitTest_CallFunctionLocalValues"); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunctionLocalObjects) -{ - ExpectParse("LY_SC_UnitTest_FunctionLocalObjects"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedFunctionLocalObjectsCall) -{ - RunUnitTestGraph("LY_SC_UnitTest_FunctionLocalObjectsCall", ExecutionMode::Interpreted, DurationSpec::Ticks(31)); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunctionWithOnGraphStart) -{ - ExpectParse("LY_SC_UnitTest_FunctionWithOnGraphStart"); -} - -TEST_F(ScriptCanvasTestFixture, NodeableDurationSubgraphDirectionExposedOutWithOutput) -{ - RunUnitTestGraph("LY_SC_UnitTest_NodeableDurationSubgraphDirectionExposedOutWithOutput", ExecutionMode::Interpreted, DurationSpec::Ticks(3)); -} - -TEST_F(ScriptCanvasTestFixture, ParseOrderedSequencerFunction) -{ - ExpectParse("LY_SC_UnitTest_OrderedSequencerFunction"); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunction_Names_With_Spaces) -{ - ExpectParse("LY_SC_UnitTest_Function Names With Spaces"); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunctionNameEvilVersion) -{ - ExpectParse("LY_SC_UnitTest_Function Names(With) Random+Strings Evil~Version"); -} - -TEST_F(ScriptCanvasTestFixture, ParseFunctionNameEvilVersionInFolder) -{ - ExpectParse("TestFunction/LY_SC_UnitTest_Function Names(With) Random+Strings Evil~Version-In^Forder"); -} - -TEST_F(ScriptCanvasTestFixture, ParseNodeableDurationFunction) -{ - ExpectParse("LY_SC_UnitTest_NodeableDurationFunction"); -} - -TEST_F(ScriptCanvasTestFixture, ParseNodeableDurationFunctionDirectExposure) -{ - ExpectParse("LY_SC_UnitTest_NodeableDurationFunctionDirectExposure"); -} - -TEST_F(ScriptCanvasTestFixture, ParseNodeableDurationFunctionDirectExposureWithOutput) -{ - ExpectParse("LY_SC_UnitTest_NodeableDurationFunctionDirectExposureWithOutput"); -} - - -TEST_F(ScriptCanvasTestFixture, ParseFunctionBranchSingleNamedOutJustReturns) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionBranchSingleNamedOutJustReturns"); -} - -TEST_F(ScriptCanvasTestFixture, ParseExposeAnyOut) -{ - ExpectParse("LY_SC_UnitTest_ExposeAnyOut"); -} - -TEST_F(ScriptCanvasTestFixture, ParseMultipleInputNoParseError) -{ - ExpectParse("LY_SC_UnitTest_MultipleInputNoParseError"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphMultipleInError) -{ - ExpectParseError("LY_SC_UnitTest_InterpretedSubgraphMultipleInError"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphMultipleOutError) -{ - ExpectParseError("LY_SC_UnitTest_InterpretedSubgraphMultipleOutError"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphOutInLoop) -{ - ExpectParseError("LY_SC_UnitTest_InterpretedSubgraphOutInLoop"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphOutMidCycleMissingSlots) -{ - ExpectParseError("LY_SC_UnitTest_InterpretedSubgraphOutMidCycleMissingSlots"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphComplexityError) -{ - ExpectParseError("LY_SC_UnitTest_SubgraphComplexityError"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphReturnValueFromIn) -{ - ExpectParseError("LY_SC_UnitTest_SubgraphReturnValueFromIn"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedSubgraphReturnValueFromInOut) -{ - ExpectParseError("LY_SC_UnitTest_SubgraphReturnValueFromInOut"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedVerifyByValueCorrectness) -{ - RunUnitTestGraph("LY_SC_UnitTest_VerifyByValueCorrectness", ExecutionMode::Interpreted); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedFunctionNoInputOneOutputCall) -{ - RunUnitTestGraph("LY_SC_UnitTest_FunctionNoInputOneOutputCall", ExecutionMode::Interpreted); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedFunctionAddVector3Call) -{ - RunUnitTestGraph("LY_SC_UnitTest_FunctionAddVector3Call", ExecutionMode::Interpreted); -} -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunction) -{ - ExpectParse("LY_SC_UnitTest_ParseFunction"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunctionBranch) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionBranch"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunctionBranchDefaultOut) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionBranchDefaultOut"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunctionDefaultOut) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionDefaultOut"); -} - -TEST_F(ScriptCanvasTestFixture, InterpretedParseFunctionOut) -{ - ExpectParse("LY_SC_UnitTest_ParseFunctionOut"); -} -#endif diff --git a/Gems/StartingPointInput/Code/Source/InputNode.cpp b/Gems/StartingPointInput/Code/Source/InputNode.cpp deleted file mode 100644 index e0f9de3657..0000000000 --- a/Gems/StartingPointInput/Code/Source/InputNode.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace StartingPointInput -{ - void InputNode::OnPostActivate() - { - //if (GetExecutionType() == ScriptCanvas::ExecutionType::Runtime) - //{ - // const ScriptCanvas::SlotId eventNameSlotId = InputNodeProperty::GetEventNameSlotId(this); - - // m_eventName = (*(FindDatum(eventNameSlotId)->GetAs())); - // InputEventNotificationBus::Handler::BusConnect(InputEventNotificationId(m_eventName.c_str())); - //} - } - - void InputNode::OnDeactivate() - { - InputEventNotificationBus::Handler::BusDisconnect(); - } - - void InputNode::OnInputChanged(const ScriptCanvas::Datum& input, const ScriptCanvas::SlotId& slotId) - { - // we got a new event name, we need to drop our connection to the old and connect to the new event - const ScriptCanvas::SlotId eventNameSlotId = InputNodeProperty::GetEventNameSlotId(this); - - if (slotId == eventNameSlotId) - { - InputEventNotificationBus::Handler::BusDisconnect(); - - m_eventName = (*input.GetAs()); - InputEventNotificationBus::Handler::BusConnect(InputEventNotificationId(m_eventName.c_str())); - } - } - - void InputNode::OnPressed(float value) - { - m_value = value; - const ScriptCanvas::Datum output = ScriptCanvas::Datum(m_value); - const ScriptCanvas::SlotId pressedSlotId = InputNodeProperty::GetPressedSlotId(this); - const ScriptCanvas::SlotId valueId = InputNodeProperty::GetValueSlotId(this); - - if (auto* slot = GetSlot(valueId)) - { - PushOutput(output, *slot); - } - - SignalOutput(pressedSlotId); - } - - void InputNode::OnHeld(float value) - { - m_value = value; - const ScriptCanvas::Datum output = ScriptCanvas::Datum(m_value); - const ScriptCanvas::SlotId heldSlotId = InputNodeProperty::GetHeldSlotId(this); - const ScriptCanvas::SlotId valueId = InputNodeProperty::GetValueSlotId(this); - if (auto* slot = GetSlot(valueId)) - { - PushOutput(output, *slot); - } - SignalOutput(heldSlotId); - } - - void InputNode::OnReleased(float value) - { - m_value = value; - const ScriptCanvas::Datum output = ScriptCanvas::Datum(m_value); - const ScriptCanvas::SlotId releasedSlotId = InputNodeProperty::GetReleasedSlotId(this); - const ScriptCanvas::SlotId valueId = InputNodeProperty::GetValueSlotId(this); - - if (auto* slot = GetSlot(valueId)) - { - PushOutput(output, *slot); - } - SignalOutput(releasedSlotId); - } -} diff --git a/Gems/StartingPointInput/Code/Source/InputNode.h b/Gems/StartingPointInput/Code/Source/InputNode.h index d71c302f2b..c4e85f2a5b 100644 --- a/Gems/StartingPointInput/Code/Source/InputNode.h +++ b/Gems/StartingPointInput/Code/Source/InputNode.h @@ -10,18 +10,15 @@ #include #include - -#include - #include namespace StartingPointInput { ////////////////////////////////////////////////////////////////////////// /// Input handles raw input from any source and outputs Pressed, Held, and Released input events + /// This nodes id deprecated in favor of its nodeable counterpart. class InputNode : public ScriptCanvas::Node - , protected InputEventNotificationBus::Handler { public: @@ -35,21 +32,5 @@ namespace StartingPointInput AZStd::string m_eventName; float m_value; - - ////////////////////////////////////////////////////////////////////////// - /// ScriptCanvas_Node - void OnInputChanged(const ScriptCanvas::Datum& input, const ScriptCanvas::SlotId& slotId) override; - - protected: - ////////////////////////////////////////////////////////////////////////// - /// Node - void OnPostActivate() override; - void OnDeactivate() override; - - ////////////////////////////////////////////////////////////////////////// - /// InputEventNotificationBus::Handler - void OnPressed(float value) override; - void OnHeld(float value) override; - void OnReleased(float value) override; }; } diff --git a/Gems/StartingPointInput/Code/startingpointinput_files.cmake b/Gems/StartingPointInput/Code/startingpointinput_files.cmake index 933f32ec66..000c361b5b 100644 --- a/Gems/StartingPointInput/Code/startingpointinput_files.cmake +++ b/Gems/StartingPointInput/Code/startingpointinput_files.cmake @@ -17,7 +17,6 @@ set(FILES Source/InputLibrary.h Source/InputLibrary.cpp Source/InputNode.h - Source/InputNode.cpp Source/InputHandlerNodeable.h Source/InputHandlerNodeable.cpp Source/InputHandlerNodeable.ScriptCanvasNodeable.xml From 0a910a31aa148739ea0b9d2a34d7be3c2dbd2da3 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 6 Jul 2021 15:05:37 -0700 Subject: [PATCH 07/67] The Great ScriptCanvas Purge, Part V Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Code/Asset/EditorAssetSystemComponent.cpp | 2 +- .../Asset/RuntimeAssetSystemComponent.cpp | 4 +- .../Builder/ScriptCanvasBuilderComponent.cpp | 27 -- .../Builder/ScriptCanvasBuilderComponent.h | 1 - .../Builder/ScriptCanvasBuilderWorker.cpp | 4 +- .../Code/Builder/ScriptCanvasBuilderWorker.h | 33 -- .../ScriptCanvasBuilderWorkerUtility.cpp | 3 +- .../Assets/ScriptCanvasAssetHelpers.cpp | 32 +- .../Assets/ScriptCanvasAssetInstance.cpp | 154 --------- .../Editor/Assets/ScriptCanvasAssetInstance.h | 46 --- .../Assets/ScriptCanvasAssetReference.cpp | 57 ---- .../Assets/ScriptCanvasAssetReference.h | 70 ---- .../ScriptCanvasAssetReferenceContainer.h | 234 ------------- .../Assets/ScriptCanvasAssetTracker.cpp | 1 - .../Code/Editor/Components/EditorGraph.cpp | 11 - .../Framework/ScriptCanvasGraphUtilities.inl | 1 - .../Framework/ScriptCanvasTraceUtilities.h | 11 - .../FunctionNodeDescriptorComponent.h | 2 - .../ScriptCanvasFunctionAssetHandler.h | 68 ---- .../ScriptCanvas/Bus/EditorScriptCanvasBus.h | 4 - .../ScriptCanvas/Components/EditorGraph.h | 3 - .../Code/Editor/Nodes/EditorLibrary.cpp | 56 ---- .../Code/Editor/Nodes/EditorLibrary.h | 32 -- .../Editor/Nodes/ScriptCanvasAssetNode.cpp | 200 ----------- .../Code/Editor/Nodes/ScriptCanvasAssetNode.h | 91 ----- .../Code/Editor/ReflectComponent.cpp | 7 - .../Code/Editor/ScriptCanvasEditorGem.cpp | 2 - .../Code/Editor/SystemComponent.cpp | 16 +- .../FunctionNodePaletteTreeItemTypes.h | 3 - .../Widgets/NodePalette/NodePaletteModel.cpp | 68 ---- .../Widgets/NodePalette/NodePaletteModel.h | 2 - .../ScriptCanvasNodePaletteDockWidget.cpp | 2 +- .../ScriptCanvasStatisticsDialog.cpp | 10 +- .../VariablePanel/GraphVariablesTableView.cpp | 3 - .../VariablePanel/VariableDockWidget.cpp | 4 +- .../Code/Editor/View/Windows/MainWindow.cpp | 18 +- .../Tools/UpgradeTool/UpgradeHelper.cpp | 2 - .../Windows/Tools/UpgradeTool/UpgradeTool.cpp | 10 - .../Tools/UpgradeTool/VersionExplorer.cpp | 21 -- ....cpp => SubgraphInterfaceAssetHandler.cpp} | 2 +- ...dler.h => SubgraphInterfaceAssetHandler.h} | 0 .../Code/Include/ScriptCanvas/Core/Graph.cpp | 2 - .../Internal/Nodes/BaseTimerNode.h | 2 +- .../Internal/Nodes/ExpressionNodeBase.cpp | 5 - .../Internal/Nodes/ExpressionNodeBase.h | 5 - .../Libraries/Core/FunctionCallNode.h | 1 - .../ScriptCanvas/Libraries/Core/Method.cpp | 5 - .../Libraries/Core/ReceiveScriptEvent.cpp | 11 - .../Libraries/Core/ReceiveScriptEvent.h | 1 - .../Libraries/Math/MathExpression.cpp | 11 - .../Libraries/Math/MathExpression.h | 1 - .../Operators/Containers/OperatorBack.h | 2 - .../Operators/Containers/OperatorFront.h | 2 - .../Operators/Math/OperatorArithmetic.cpp | 14 - .../Operators/Math/OperatorArithmetic.h | 3 +- .../ScriptCanvas/Libraries/Time/Timer.cpp | 5 - .../ScriptCanvas/Libraries/Time/Timer.h | 5 - .../Code/Source/ScriptCanvasCommonGem.cpp | 2 - .../Code/scriptcanvasgem_common_files.cmake | 5 +- ...scriptcanvasgem_editor_builder_files.cmake | 1 - .../Code/scriptcanvasgem_editor_files.cmake | 11 - .../ScriptCanvasActions/GraphActions.cpp | 13 - .../GraphCreationTests.cpp | 13 - ...criptcanvastesting_editor_tests_msvc.cmake | 1 - .../Code/Tests/ScriptCanvas_Async.cpp | 316 ------------------ ...criptcanvastestingeditor_tests_files.cmake | 1 - 66 files changed, 24 insertions(+), 1731 deletions(-) delete mode 100644 Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.h delete mode 100644 Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.h delete mode 100644 Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReferenceContainer.h delete mode 100644 Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h delete mode 100644 Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.h delete mode 100644 Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp delete mode 100644 Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h rename Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/{Functions/RuntimeFunctionAssetHandler.cpp => SubgraphInterfaceAssetHandler.cpp} (98%) rename Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/{Functions/RuntimeFunctionAssetHandler.h => SubgraphInterfaceAssetHandler.h} (100%) delete mode 100644 Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Async.cpp diff --git a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp index 97bba9b7e6..e698fcc298 100644 --- a/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/EditorAssetSystemComponent.cpp @@ -28,7 +28,7 @@ AZ_PUSH_DISABLE_WARNING(4251 4800 4244, "-Wunknown-warning-option") #include AZ_POP_DISABLE_WARNING -#include +#include namespace ScriptCanvasEditor { diff --git a/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp index e993b21b26..38995f8dca 100644 --- a/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp @@ -2,7 +2,7 @@ * 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 - * + *s */ #include @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace ScriptCanvas { diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp index ea714f356f..a953edeae8 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp @@ -102,30 +102,9 @@ namespace ScriptCanvasBuilder AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::RegisterSourceAssetType, azrtti_typeid(), ScriptCanvasEditor::ScriptCanvasAsset::Description::GetFileFilter()); } - { - AssetBuilderSDK::AssetBuilderDesc builderDescriptor; - builderDescriptor.m_name = "Script Canvas Function Builder"; - builderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern("*.scriptcanvas_fn", AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); - builderDescriptor.m_busId = ScriptCanvasBuilder::FunctionWorker::GetUUID(); - builderDescriptor.m_createJobFunction = AZStd::bind(&FunctionWorker::CreateJobs, &m_scriptCanvasFunctionBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - builderDescriptor.m_processJobFunction = AZStd::bind(&FunctionWorker::ProcessJob, &m_scriptCanvasFunctionBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - // changing the version number invalidates all assets and will rebuild everything. - builderDescriptor.m_version = m_scriptCanvasFunctionBuilder.GetVersionNumber(); - // changing the analysis fingerprint just invalidates analysis (ie, not the assets themselves) - // which will cause the "CreateJobs" function to be called, for each asset, even if the - // source file has not changed, but won't actually do the jobs unless the source file has changed - // or the fingerprint of the individual job is different. - builderDescriptor.m_analysisFingerprint = m_scriptCanvasFunctionBuilder.GetFingerprintString(); - builderDescriptor.AddFlags(AssetBuilderSDK::AssetBuilderDesc::BF_DeleteLastKnownGoodProductOnFailure, s_scriptCanvasProcessJobKey); - builderDescriptor.m_productsToKeepOnFailure[s_scriptCanvasProcessJobKey] = { AZ_CRC("SubgraphInterface", 0xdfe6dc72) }; - AssetBuilderSDK::AssetBuilderBus::Broadcast(&AssetBuilderSDK::AssetBuilderBus::Handler::RegisterBuilderInformation, builderDescriptor); - ScriptCanvas::Grammar::RequestBus::Handler::BusConnect(); - } - m_sharedHandlers = HandleAssetTypes(); AssetHandlers workerHandlers(m_sharedHandlers); m_scriptCanvasBuilder.Activate(workerHandlers); - m_scriptCanvasFunctionBuilder.Activate(workerHandlers); ScriptCanvas::Translation::RequestBus::Handler::BusConnect(); ScriptCanvas::Grammar::RequestBus::Handler::BusConnect(); @@ -135,15 +114,9 @@ namespace ScriptCanvasBuilder { // Finish all queued work AZ::Data::AssetBus::ExecuteQueuedEvents(); - AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::UnregisterSourceAssetType, azrtti_typeid()); - AzToolsFramework::ToolsAssetSystemBus::Broadcast(&AzToolsFramework::ToolsAssetSystemRequests::UnregisterSourceAssetType, azrtti_typeid()); - m_scriptCanvasBuilder.BusDisconnect(); - m_scriptCanvasFunctionBuilder.BusDisconnect(); - m_sharedHandlers.DeleteOwnedHandlers(); - ScriptCanvas::Translation::RequestBus::Handler::BusDisconnect(); ScriptCanvas::Grammar::RequestBus::Handler::BusDisconnect(); } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.h index bd6a09433a..5d57863ec3 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.h @@ -54,7 +54,6 @@ namespace ScriptCanvasBuilder SharedHandlers m_sharedHandlers; Worker m_scriptCanvasBuilder; - FunctionWorker m_scriptCanvasFunctionBuilder; ScriptCanvas::Translation::Context m_translationContext; ScriptCanvas::Grammar::Context m_grammarContext; }; diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp index 6b163a5027..b9d1dd5a7c 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.cpp @@ -8,7 +8,6 @@ #include "precompiled.h" #include -#include #include #include #include @@ -18,9 +17,8 @@ #include #include -#include +#include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h index df432578d4..ae87a0bd20 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorker.h @@ -175,37 +175,4 @@ namespace ScriptCanvasBuilder // cached on first time query mutable AZStd::string m_fingerprintString; }; - - class FunctionWorker - : public AssetBuilderSDK::AssetBuilderCommandBus::Handler - { - public: - static AZ::Uuid GetUUID(); - - FunctionWorker() = default; - FunctionWorker(const FunctionWorker&) = delete; - - void Activate(const AssetHandlers& handlers); - - //! Asset Builder Callback Functions - void CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) const; - - const char* GetFingerprintString() const; - - int GetVersionNumber() const; - - void ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) const; - - void ShutDown() override {}; - - private: - AZ::Data::AssetHandler* m_editorAssetHandler = nullptr; - AZ::Data::AssetHandler* m_runtimeAssetHandler = nullptr; - AZ::Data::AssetHandler* m_subgraphInterfaceHandler = nullptr; - - mutable AZStd::vector> m_sourceDependencies; - - // cached on first time query - mutable AZStd::string m_fingerprintString; - }; } diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp index 73d32ba16a..7f6269a698 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderWorkerUtility.cpp @@ -17,10 +17,9 @@ #include #include #include -#include +#include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp index caec55e9fe..6eae2ff603 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetHelpers.cpp @@ -148,37 +148,13 @@ namespace ScriptCanvasEditor } - bool IsValidSourceFile(const AZStd::string& filePath, ScriptCanvas::ScriptCanvasId scriptCanvasId) + bool IsValidSourceFile(const AZStd::string& filePath, [[maybe_unused]] ScriptCanvas::ScriptCanvasId scriptCanvasId) { - bool isValidSourceFile = true; - - if (scriptCanvasId.IsValid()) + ScriptCanvasAssetDescription assetDescription; + return AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false); { - bool isRuntimeGraph = false; - EditorGraphRequestBus::EventResult(isRuntimeGraph, scriptCanvasId, &EditorGraphRequests::IsRuntimeGraph); - - if (isRuntimeGraph) - { - ScriptCanvasAssetDescription assetDescription; - - if (!AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false)) - { - isValidSourceFile = false; - } - } - // Assume it's a function for now - else - { - ScriptCanvasEditor::ScriptCanvasFunctionDescription assetDescription; - - if (!AZ::StringFunc::EndsWith(filePath, assetDescription.GetExtensionImpl(), false)) - { - isValidSourceFile = false; - } - } + return true; } - - return isValidSourceFile; } } } diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.cpp deleted file mode 100644 index 30f2ecdb64..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "precompiled.h" - -#include -#include -#include - -namespace ScriptCanvasEditor -{ - ScriptCanvasAssetInstance::~ScriptCanvasAssetInstance() - { - } - - void ScriptCanvasAssetInstance::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - // TODO: This results in more data being saved per instance, but is needed to make Id remapping transparent. - // Allow a way to enumerate the elements for Id Remapping, while disallowing serialization - ->Field("m_data", &ScriptCanvasAssetInstance::m_scriptCanvasData) - ->Field("m_assetRef", &ScriptCanvasAssetInstance::m_assetRef) - ->Field("m_entityInstanceMap", &ScriptCanvasAssetInstance::m_baseToInstanceMap) - ->Field("m_dataFlags", &ScriptCanvasAssetInstance::m_entityToDataFlags) - ->Field("m_dataPatch", &ScriptCanvasAssetInstance::m_dataPatch) - ; - } - } - - ScriptCanvasAssetReference& ScriptCanvasAssetInstance::GetReference() - { - return m_assetRef; - } - - const ScriptCanvasAssetReference& ScriptCanvasAssetInstance::GetReference() const - { - return m_assetRef; - } - - ScriptCanvas::ScriptCanvasData& ScriptCanvasAssetInstance::GetScriptCanvasData() - { - return m_scriptCanvasData; - } - - const ScriptCanvas::ScriptCanvasData& ScriptCanvasAssetInstance::GetScriptCanvasData() const - { - return m_scriptCanvasData; - } - - void ScriptCanvasAssetInstance::ComputeDataPatch() - { - if (!m_assetRef.GetAsset().IsReady()) - { - return; - } - - ScriptCanvas::ScriptCanvasData& baseData = m_assetRef.GetAsset().Get()->GetScriptCanvasData(); - - AZ::SerializeContext* serializeContext{}; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - - decltype(m_baseToInstanceMap) entityIdReverseLookUp; - for (const auto& baseToInstancePair : m_baseToInstanceMap) - { - entityIdReverseLookUp.emplace(baseToInstancePair.second, baseToInstancePair.first); - } - - // remap entity ids to the "original" - AZ::IdUtils::Remapper::ReplaceIdsAndIdRefs(&m_scriptCanvasData, [&entityIdReverseLookUp](AZ::EntityId sourceId, [[maybe_unused]] bool isEntityId, const AZ::IdUtils::Remapper::IdGenerator&) -> AZ::EntityId - { - auto findIt = entityIdReverseLookUp.find(sourceId); - return findIt != entityIdReverseLookUp.end() ? findIt->second : sourceId; - }, serializeContext); - - // compute the delta (what we changed from the base slice) - m_dataPatch.Create(&baseData, &m_scriptCanvasData, AZ::DataPatch::FlagsMap(), GetDataFlagsForPatching(), serializeContext); - - // remap entity ids back to the "instance onces" - AZ::IdUtils::Remapper::ReplaceIdsAndIdRefs(&m_scriptCanvasData, [this](AZ::EntityId sourceId, [[maybe_unused]] bool isEntityId, const AZ::IdUtils::Remapper::IdGenerator&) -> AZ::EntityId { - auto findIt = m_baseToInstanceMap.find(sourceId); - return findIt != m_baseToInstanceMap.end() ? findIt->second : sourceId; - }, serializeContext); - - } - - void ScriptCanvasAssetInstance::ApplyDataPatch() - { - if (!m_assetRef.GetAsset().IsReady()) - { - return; - } - - ScriptCanvas::ScriptCanvasData& baseData = m_assetRef.GetAsset().Get()->GetScriptCanvasData(); - - AZ::SerializeContext* serializeContext{}; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - // An empty map indicates its a fresh instance (i.e. has never be instantiated and then serialized). - if (m_baseToInstanceMap.empty()) - { - // Generate new Ids and populate the map. - AZ_Assert(!m_dataPatch.IsValid(), "Data patch is valid for scene slice instance, but base scene to instantiated scene Id map is not!"); - serializeContext->CloneObjectInplace(m_scriptCanvasData, &baseData); - AZ::IdUtils::Remapper::GenerateNewIdsAndFixRefs(&m_scriptCanvasData, m_baseToInstanceMap); - } - else - { - // Clone entities while applying any data patches. - AZ_Assert(m_dataPatch.IsValid(), "Data patch is not valid for existing scene slice instance!"); - ScriptCanvas::ScriptCanvasData* patchedSceneData = m_dataPatch.Apply(&baseData, serializeContext); - - // Remap Ids & references. - AZ::IdUtils::Remapper::GenerateNewIdsAndFixRefs(patchedSceneData, m_baseToInstanceMap); - serializeContext->CloneObjectInplace(m_scriptCanvasData, patchedSceneData); - } - } - - AZ::DataPatch::FlagsMap ScriptCanvasAssetInstance::GetDataFlagsForPatching() const - { - // Collect all entities' data flags - AZ::DataPatch::FlagsMap dataFlags; - - for (auto& baseIdInstanceIdPair : m_baseToInstanceMap) - { - // Make the addressing relative to InstantiatedContainer (m_dataFlags stores flags relative to the individual entity) - AZ::DataPatch::AddressType addressPrefix; - addressPrefix.push_back(AZ_CRC("Entities", 0x50ec64e5)); - addressPrefix.push_back(static_cast(baseIdInstanceIdPair.first)); - - auto findIt = m_entityToDataFlags.find(baseIdInstanceIdPair.second); - if (findIt != m_entityToDataFlags.end()) - { - for (auto& addressDataFlagsPair : findIt->second) - { - const AZ::DataPatch::AddressType& originalAddress = addressDataFlagsPair.first; - - AZ::DataPatch::AddressType prefixedAddress; - prefixedAddress.reserve(addressPrefix.size() + originalAddress.size()); - prefixedAddress.insert(prefixedAddress.end(), addressPrefix.begin(), addressPrefix.end()); - prefixedAddress.insert(prefixedAddress.end(), originalAddress.begin(), originalAddress.end()); - - dataFlags.emplace(AZStd::move(prefixedAddress), addressDataFlagsPair.second); - } - } - } - - return dataFlags; - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.h deleted file mode 100644 index 5e86636d90..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetInstance.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once -#include -#include - -namespace ScriptCanvasEditor -{ - class ScriptCanvasAssetInstance - { - public: - AZ_TYPE_INFO(ScriptCanvasAssetInstance, "{96B16AAB-DB63-4D32-9FC9-7A5DE440B0B7}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasAssetInstance, AZ::SystemAllocator, 0); - - ScriptCanvasAssetInstance() = default; - ~ScriptCanvasAssetInstance(); - static void Reflect(AZ::ReflectContext* context); - - const AZStd::unordered_map& GetBaseToInstanceMap() const { return m_baseToInstanceMap; } - ScriptCanvasAssetReference& GetReference(); - const ScriptCanvasAssetReference& GetReference() const; - - ScriptCanvas::ScriptCanvasData& GetScriptCanvasData(); - const ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() const; - - void ComputeDataPatch(); - void ApplyDataPatch(); - - private: - ScriptCanvasAssetInstance(const ScriptCanvasAssetInstance&) = delete; - AZ::DataPatch::FlagsMap GetDataFlagsForPatching() const; - - ScriptCanvas::ScriptCanvasData m_scriptCanvasData; - ScriptCanvasAssetReference m_assetRef; - AZStd::unordered_map m_baseToInstanceMap; - AZStd::unordered_map m_entityToDataFlags; - - AZ::DataPatch m_dataPatch; - bool m_canApplyPatch; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.cpp deleted file mode 100644 index e4d620ba57..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "precompiled.h" - -#include -#include -#include - -namespace ScriptCanvasEditor -{ - void ScriptCanvasAssetReference::Reflect(AZ::ReflectContext* context) - { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->DataContainer() - ; - } - } - - ScriptCanvasAssetReference::ScriptCanvasAssetReference(AZ::Data::Asset sliceAsset, bool storeInObjectStream) - { - SetAsset(sliceAsset); - SetAssetDataStoredInternally(storeInObjectStream); - } - - void ScriptCanvasAssetReference::SetAsset(AZ::Data::Asset sliceAsset) - { - m_asset = sliceAsset; - } - - const AZ::Data::Asset& ScriptCanvasAssetReference::GetAsset() const - { - return m_asset; - } - - AZ::Data::Asset& ScriptCanvasAssetReference::GetAsset() - { - return m_asset; - } - - void ScriptCanvasAssetReference::SetAssetDataStoredInternally(bool storeInObjectStream) - { - m_storeInObjectStream = storeInObjectStream; - } - - bool ScriptCanvasAssetReference::GetAssetDataStoredInternally() const - { - return m_storeInObjectStream; - } - -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.h deleted file mode 100644 index 526296b1c1..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReference.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once -#include -#include - -namespace ScriptCanvas -{ - class ScriptCanvasData; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasAsset; - - class ScriptCanvasAssetReference - { - public: - AZ_TYPE_INFO(ScriptCanvasAssetReference, "{C1B24507-887C-4E20-A259-BFEEDD7EDF9D}"); - AZ_CLASS_ALLOCATOR(ScriptCanvasAssetReference, AZ::SystemAllocator, 0); - - ScriptCanvasAssetReference() = default; - ScriptCanvasAssetReference(AZ::Data::Asset scriptCanvasAsset, bool storeInObjectStream = false); - static void Reflect(AZ::ReflectContext* context); - - /*! - \param scriptCanvasAsset asset reference to store - \param storeInObjectStream bool which determines if the asset data will serialized out as part of the ObjectStream when serializing - */ - void SetAsset(AZ::Data::Asset scriptCanvasAsset); - const AZ::Data::Asset& GetAsset() const; - AZ::Data::Asset& GetAsset(); - - /*! - \param storeInObjectStream bool which determines if the asset data will serialized out as part of the ObjectStream when serializing - */ - void SetAssetDataStoredInternally(bool storeInObjectStream); - - /*! - Indicates if this scriptCanvas reference contains an asset whose data is stored internally in this class. - \return true if the asset is asset data is serialize as part of this class object stream - */ - bool GetAssetDataStoredInternally() const; - - private: - bool m_storeInObjectStream = false; ///< If true the asset data is stored in the object stream with this class - AZ::Data::Asset m_asset; - friend class ScriptCanvasAssetReferenceContainer; - }; -} - -namespace AZStd -{ - template<> - struct hash - { - using argument_type = ScriptCanvasEditor::ScriptCanvasAssetReference; - using result_type = AZStd::size_t; - AZ_FORCE_INLINE size_t operator()(const argument_type& key) const - { - AZStd::hash hasher; - return hasher(key.GetAsset().GetId()); - } - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReferenceContainer.h b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReferenceContainer.h deleted file mode 100644 index efff707234..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetReferenceContainer.h +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include - -namespace ScriptCanvasEditor -{ - class ScriptCanvasAssetReferenceContainer - : public AZ::SerializeContext::IDataContainer - { - public: - ScriptCanvasAssetReferenceContainer() - { - m_storeInObjectStreamElement.m_name = "m_storeInObjectStream"; - m_storeInObjectStreamElement.m_nameCrc = AZ_CRC("m_storeInObjectStream", 0xf5a45371); - m_storeInObjectStreamElement.m_typeId = azrtti_typeid(); - m_storeInObjectStreamElement.m_offset = 0; - m_storeInObjectStreamElement.m_dataSize = sizeof(bool); - m_storeInObjectStreamElement.m_azRtti = nullptr; - m_storeInObjectStreamElement.m_genericClassInfo = AZ::SerializeGenericTypeInfo::GetGenericInfo(); - m_storeInObjectStreamElement.m_editData = nullptr; - m_storeInObjectStreamElement.m_flags = 0; - - m_assetElement.m_name = "m_asset"; - m_assetElement.m_nameCrc = AZ_CRC("m_asset", 0x4e58e538); - m_assetElement.m_typeId = AZ::SerializeGenericTypeInfo>::GetClassTypeId(); - m_assetElement.m_offset = m_storeInObjectStreamElement.m_dataSize; - m_assetElement.m_dataSize = sizeof(AZ::Data::Asset); - m_assetElement.m_azRtti = AZ::GetRttiHelper>(); - m_assetElement.m_genericClassInfo = AZ::SerializeGenericTypeInfo>::GetGenericInfo(); - m_assetElement.m_editData = nullptr; - m_assetElement.m_flags = 0; - - m_baseDataElement.m_name = "m_scriptCanvasData"; - m_baseDataElement.m_nameCrc = AZ_CRC("m_scriptCanvasData", 0x78a93f93); - m_baseDataElement.m_typeId = AZ::SerializeGenericTypeInfo::GetClassTypeId(); - m_baseDataElement.m_offset = m_assetElement.m_offset + m_assetElement.m_dataSize; - m_baseDataElement.m_dataSize = sizeof(ScriptCanvas::ScriptCanvasData); - m_baseDataElement.m_azRtti = AZ::GetRttiHelper(); - m_baseDataElement.m_genericClassInfo = AZ::SerializeGenericTypeInfo::GetGenericInfo(); - m_baseDataElement.m_editData = nullptr; - m_baseDataElement.m_flags = 0; - } - /// Null if element with this name can't be found. - const AZ::SerializeContext::ClassElement* GetElement(AZ::u32 elementNameCrc) const override - { - if (m_storeInObjectStreamElement.m_nameCrc == elementNameCrc) - { - return &m_storeInObjectStreamElement; - } - if (m_assetElement.m_nameCrc == elementNameCrc) - { - return &m_assetElement; - } - if (m_baseDataElement.m_nameCrc == elementNameCrc) - { - return &m_baseDataElement; - } - - return nullptr; - } - - bool GetElement(AZ::SerializeContext::ClassElement& classElement, const AZ::SerializeContext::DataElement& dataElement) const override - { - if (m_storeInObjectStreamElement.m_nameCrc == dataElement.m_nameCrc) - { - classElement = m_storeInObjectStreamElement; - return true; - } - if (m_assetElement.m_nameCrc == dataElement.m_nameCrc) - { - classElement = m_assetElement; - return true; - } - if (m_baseDataElement.m_nameCrc == dataElement.m_nameCrc) - { - classElement = m_baseDataElement; - return true; - } - return false; - } - - /// Enumerate elements in the array. - void EnumElements(void* instance, const ElementCB& cb) override - { - auto assetRef = reinterpret_cast(instance); - - if (!cb(&assetRef->m_storeInObjectStream, m_storeInObjectStreamElement.m_typeId, m_storeInObjectStreamElement.m_genericClassInfo ? m_storeInObjectStreamElement.m_genericClassInfo->GetClassData() : nullptr, &m_storeInObjectStreamElement)) - { - return; - } - - if (!cb(&assetRef->m_asset, m_assetElement.m_typeId, m_assetElement.m_genericClassInfo ? m_assetElement.m_genericClassInfo->GetClassData() : nullptr, &m_assetElement)) - { - return; - } - - if (assetRef->m_storeInObjectStream && assetRef->m_asset.Get()) - { - cb(&assetRef->m_asset.Get()->GetScriptCanvasData(), m_baseDataElement.m_typeId, m_baseDataElement.m_genericClassInfo ? m_baseDataElement.m_genericClassInfo->GetClassData() : nullptr, &m_baseDataElement); - } - } - - void EnumTypes(const ElementTypeCB& cb) override - { - cb(m_storeInObjectStreamElement.m_typeId, &m_storeInObjectStreamElement); - cb(m_assetElement.m_typeId, &m_assetElement); - cb(m_baseDataElement.m_typeId, &m_baseDataElement); - } - - /// Return number of elements in the container. - size_t Size(void* instance) const override - { - auto assetRef = reinterpret_cast(instance); - return assetRef->m_storeInObjectStream && assetRef->m_asset.Get() ? m_numClassElements : m_numClassElements - 1; - } - - /// Returns the capacity of the container. Returns 0 for objects without fixed capacity. - size_t Capacity(void*) const override - { - return m_numClassElements; - } - - /// Returns true if elements pointers don't change on add/remove. If false you MUST enumerate all elements. - bool IsStableElements() const override { return true; } - - /// Returns true if the container is fixed size, otherwise false. - bool IsFixedSize() const override { return false; } - - /// Returns if the container is fixed capacity, otherwise false - bool IsFixedCapacity() const override { return true; } - - /// Returns true if the container is a smart pointer. - bool IsSmartPointer() const override { return false; } - - /// Returns true if elements can be retrieved by index. - bool CanAccessElementsByIndex() const override { return false; } - - /// Reserve element - void* ReserveElement(void* instance, const AZ::SerializeContext::ClassElement* classElement) override - { - auto assetRef = reinterpret_cast(instance); - if (classElement->m_nameCrc == m_storeInObjectStreamElement.m_nameCrc) - { - return &assetRef->m_storeInObjectStream; - } - if (classElement->m_nameCrc == m_assetElement.m_nameCrc) - { - if (assetRef->m_storeInObjectStream) - { - assetRef->m_asset.SetFlags(static_cast(AZ::Data::AssetLoadBehavior::NoLoad)); - } - return &assetRef->m_asset; - } - if (assetRef->m_storeInObjectStream && classElement->m_nameCrc == m_baseDataElement.m_nameCrc) - { - auto* scriptCanvasAsset = aznew ScriptCanvasAsset(assetRef->m_asset.GetId(), AZ::Data::AssetData::AssetStatus::Ready); - assetRef->m_asset = { scriptCanvasAsset, AZ::Data::AssetLoadBehavior::Default }; - return &assetRef->m_asset.Get()->GetScriptCanvasData(); - } - - return instance; - } - - /// Get an element's address by its index (called before the element is loaded). - void* GetElementByIndex(void*, const AZ::SerializeContext::ClassElement*, size_t) override - { - return nullptr; - } - - /// Store element - void StoreElement(void* instance, void* element) override - { - auto assetRef = reinterpret_cast(instance); - if (assetRef->m_storeInObjectStream && assetRef->m_asset.Get() && element == &assetRef->m_asset.Get()->GetScriptCanvasData()) - { - auto existingAsset = AZ::Data::AssetManager::Instance().FindAsset(assetRef->m_asset.GetId(), assetRef->m_asset.GetAutoLoadBehavior()); - if (existingAsset.IsReady()) - { - assetRef->m_asset = existingAsset; - } - } - } - - /// Remove element in the container. - bool RemoveElement(void* instance, const void* element, AZ::SerializeContext* deletePointerDataContext) override - { - if (deletePointerDataContext) - { - auto assetRef = reinterpret_cast(instance); - if (&assetRef->m_storeInObjectStream == element) - { - DeletePointerData(deletePointerDataContext, &m_storeInObjectStreamElement, &assetRef->m_storeInObjectStream); - } - else if (&assetRef->m_asset == element) - { - DeletePointerData(deletePointerDataContext, &m_assetElement, &assetRef->m_asset); - } - } - return false; - } - - /// Remove elements (removed array of elements) regardless if the container is Stable or not (IsStableElements) - size_t RemoveElements(void* instance, const void** elements, size_t numElements, AZ::SerializeContext* deletePointerDataContext) override - { - if (deletePointerDataContext) - { - for (size_t i = 0; i < numElements; ++i) - { - RemoveElement(instance, elements[i], deletePointerDataContext); - } - } - return 0; - } - - /// Clear elements in the instance. - void ClearElements(void*, AZ::SerializeContext*) override - { - } - - AZ::SerializeContext::ClassElement m_storeInObjectStreamElement; - AZ::SerializeContext::ClassElement m_assetElement; - AZ::SerializeContext::ClassElement m_baseDataElement; - const size_t m_numClassElements = 3; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp index 4979f5e0e8..24d9aa5ba7 100644 --- a/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Assets/ScriptCanvasAssetTracker.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp index a8dd5904fc..8078ef7a78 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp @@ -60,7 +60,6 @@ AZ_POP_DISABLE_WARNING #include #include -#include #include #include #include @@ -3127,16 +3126,6 @@ namespace ScriptCanvasEditor } } - bool Graph::IsRuntimeGraph() const - { - return GetAssetType() == azrtti_typeid(); - } - - bool Graph::IsFunctionGraph() const - { - return GetAssetType() == azrtti_typeid(); - } - bool Graph::CanExposeEndpoint(const GraphCanvas::Endpoint& endpoint) { bool isEnabled = false; diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl index 0eb3c3a719..96febf8553 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasGraphUtilities.inl @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index b3c4993063..7b6b99d967 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -42,17 +42,6 @@ namespace ScriptCanvasEditor { class ScriptCanvasAsset; - struct LoadTestFunctionResult - { - AZStd::string_view m_graphPath; - AZStd::unique_ptr m_entity; - ScriptCanvas::RuntimeComponent* m_runtimeComponent = nullptr; - bool m_nativeFunctionFound = false; - AZ::Data::Asset m_editorAsset; - AZ::Data::Asset m_runtimeAsset; - AZ::Data::Asset m_scriptAsset; - }; - struct LoadTestGraphResult { AZStd::string_view m_graphPath; diff --git a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h index d121762c93..68782be5cd 100644 --- a/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h +++ b/Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.h @@ -10,8 +10,6 @@ #include #include - -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h deleted file mode 100644 index f9953aba99..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include -#include -#include -#include -#include -#include - -namespace AZ -{ - class SerializeContext; -} - -namespace ScriptCanvasEditor -{ - class ScriptCanvasFunctionAsset; - - /** - * Manages editor Script Canvas graph assets. - */ - class ScriptCanvasFunctionAssetHandler - : public ScriptCanvasAssetHandler - { - public: - AZ_CLASS_ALLOCATOR(ScriptCanvasFunctionAssetHandler, AZ::SystemAllocator, 0); - AZ_RTTI(ScriptCanvasFunctionAssetHandler, "{CE1EB0B7-D8DA-4B9B-858B-A34DF5092BC2}", ScriptCanvasAssetHandler); - - ScriptCanvasFunctionAssetHandler(AZ::SerializeContext* context = nullptr); - ~ScriptCanvasFunctionAssetHandler(); - - AZ::Data::AssetPtr CreateAsset(const AZ::Data::AssetId& id, const AZ::Data::AssetType& type) override; - AZ::Data::AssetHandler::LoadResult LoadAssetData( - const AZ::Data::Asset& asset, - AZStd::shared_ptr stream, - const AZ::Data::AssetFilterCB& assetLoadFilterCB) override; - bool SaveAssetData(const AZ::Data::Asset& asset, AZ::IO::GenericStream* stream) override; - - bool SaveAssetData(const ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData, AZ::IO::GenericStream* stream); - - bool SaveAssetData(const ScriptCanvasEditor::ScriptCanvasFunctionAsset* assetData, AZ::IO::GenericStream* stream, AZ::DataStream::StreamType streamType); - - // Called by asset database on registration. - void GetAssetTypeExtensions(AZStd::vector& extensions) override; - void GetHandledAssetTypes(AZStd::vector& assetTypes) override; - - // Provides editor with information about script canvas graph assets. - AZ::Data::AssetType GetAssetType() const override; - const char* GetAssetTypeDisplayName() const override; - - bool CanCreateComponent(const AZ::Data::AssetId& assetId) const override; - - const char* GetGroup() const override; - const char* GetBrowserIcon() const override; - - static AZ::Data::AssetType GetAssetTypeStatic(); - - ScriptCanvasEditor::ScriptCanvasFunctionAsset* m_scriptCanvasAsset; - - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h index d9b2be8035..27477b4127 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Bus/EditorScriptCanvasBus.h @@ -154,10 +154,6 @@ namespace ScriptCanvasEditor virtual bool ConvertReferenceToVariableNode(const GraphCanvas::Endpoint& endpoint) = 0; virtual void QueueVersionUpdate(const AZ::EntityId& graphCanvasNodeId) = 0; - - virtual bool IsRuntimeGraph() const = 0; - virtual bool IsFunctionGraph() const = 0; - virtual bool CanExposeEndpoint(const GraphCanvas::Endpoint& endpoint) = 0; virtual ScriptCanvas::Endpoint ConvertToScriptCanvasEndpoint(const GraphCanvas::Endpoint& endpoinnt) const = 0; diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h index 777a84c4fa..8b01177f79 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h @@ -267,9 +267,6 @@ namespace ScriptCanvasEditor void QueueVersionUpdate(const AZ::EntityId& graphCanvasNodeId) override; - bool IsRuntimeGraph() const override; - bool IsFunctionGraph() const override; - bool CanExposeEndpoint(const GraphCanvas::Endpoint& endpoint) override; ScriptCanvas::Endpoint ConvertToScriptCanvasEndpoint(const GraphCanvas::Endpoint& endpoint) const override; diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.cpp deleted file mode 100644 index fcdc7b2780..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "precompiled.h" - -#include - -#include -#include - - -namespace ScriptCanvasEditor -{ - namespace Library - { - void Editor::Reflect(AZ::ReflectContext* reflection) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflection); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - - AZ::EditContext* editContext = serializeContext->GetEditContext(); - if (editContext) - { - editContext->Class("Editor", "") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/All.png") - ; - } - } - } - - void Editor::InitNodeRegistry(ScriptCanvas::NodeRegistry& nodeRegistry) - { - ScriptCanvas::Library::AddNodeToRegistry(nodeRegistry); - } - - AZStd::vector Editor::GetComponentDescriptors() - { - return AZStd::vector({ - ScriptCanvasAssetNode::CreateDescriptor(), - }); - } - } - - AZStd::vector GetLibraryDescriptors() - { - return Library::Editor::GetComponentDescriptors(); - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.h b/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.h deleted file mode 100644 index 4ea81a869a..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/EditorLibrary.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace AZ -{ - class ReflectContext; - class ComponentDescriptor; -} - -namespace ScriptCanvasEditor -{ - namespace Library - { - struct Editor : public ScriptCanvas::Library::LibraryDefinition - { - AZ_RTTI(Editor, "{59697735-4B64-4DC5-8380-02B2999FFCFE}", ScriptCanvas::Library::LibraryDefinition); - - static void Reflect(AZ::ReflectContext*); - static void InitNodeRegistry(ScriptCanvas::NodeRegistry& nodeRegistry); - static AZStd::vector GetComponentDescriptors(); - }; - } - - AZStd::vector GetLibraryDescriptors(); -} diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp deleted file mode 100644 index 9363d5a337..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.cpp +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#include "precompiled.h" -#include - -#include -#include - -namespace ScriptCanvasEditor -{ - /** - * \note when we reflecting we can check if the class is inheriting from IEventHandler - * and use the this->events. - */ - class ScriptCanvasAssetNodeEventHandler - : public AZ::SerializeContext::IEventHandler - { - void OnReadBegin(void* classPtr) - { - auto* scriptCanvasAssetNode = reinterpret_cast(classPtr); - scriptCanvasAssetNode->ComputeDataPatch(); - } - }; - - void ScriptCanvasAssetNode::Reflect(AZ::ReflectContext* context) - { - AZ::SerializeContext* serializeContext = azrtti_cast(context); - if (!serializeContext) - { - return; - } - - serializeContext->Class() - ->Version(0) - ->EventHandler() - ->Field("m_assetInstance", &ScriptCanvasAssetNode::m_scriptCanvasAssetInstance) - ; - - if (AZ::EditContext* editContext = serializeContext->GetEditContext()) - { - editContext->Class("ScriptCanvas Asset", "Script Canvas Asset Node which contains a reference to another ScriptCanvas graph") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/ScriptCanvas/Placeholder.png") - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List) - ; - } - } - - ScriptCanvasAssetNode::ScriptCanvasAssetNode(const AZ::Data::Asset& scriptCanvasAsset, bool storeAssetDataInternally) - { - SetAssetDataStoredInternally(storeAssetDataInternally); - SetAsset(scriptCanvasAsset); - } - - ScriptCanvasAssetNode::~ScriptCanvasAssetNode() - { - } - - void ScriptCanvasAssetNode::OnInit() - { - if (GetAsset().GetId().IsValid()) - { - AZ::Data::AssetBus::Handler::BusConnect(GetAsset().GetId()); - AZ::Entity* scriptCanvasEntity = GetScriptCanvasEntity(); - if (scriptCanvasEntity) - { - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Constructed) - { - scriptCanvasEntity->Init(); - } - if (scriptCanvasEntity->GetState() == AZ::Entity::State::Init) - { - scriptCanvasEntity->Activate(); - } - } - } - } - - bool ScriptCanvasAssetNode::GetAssetDataStoredInternally() const - { - return m_scriptCanvasAssetInstance.GetReference().GetAssetDataStoredInternally(); - } - - void ScriptCanvasAssetNode::SetAssetDataStoredInternally(bool storeInObjectStream) - { - m_scriptCanvasAssetInstance.GetReference().SetAssetDataStoredInternally(storeInObjectStream); - } - - ScriptCanvas::ScriptCanvasData& ScriptCanvasAssetNode::GetScriptCanvasData() - { - return m_scriptCanvasAssetInstance.GetScriptCanvasData(); - } - - const ScriptCanvas::ScriptCanvasData& ScriptCanvasAssetNode::GetScriptCanvasData() const - { - return m_scriptCanvasAssetInstance.GetScriptCanvasData(); - } - - AZ::Entity* ScriptCanvasAssetNode::GetScriptCanvasEntity() const - { - return GetScriptCanvasData().GetScriptCanvasEntity(); - } - - AZ::Data::Asset& ScriptCanvasAssetNode::GetAsset() - { - return m_scriptCanvasAssetInstance.GetReference().GetAsset(); - } - - const AZ::Data::Asset& ScriptCanvasAssetNode::GetAsset() const - { - return m_scriptCanvasAssetInstance.GetReference().GetAsset(); - } - - void ScriptCanvasAssetNode::SetAsset(const AZ::Data::Asset& scriptCanvasAsset) - { - m_scriptCanvasAssetInstance.GetReference().SetAsset(scriptCanvasAsset); - if (scriptCanvasAsset.GetId().IsValid()) - { - auto onAssetReady = [](ScriptCanvasMemoryAsset&) {}; - AssetTrackerRequestBus::Broadcast(&AssetTrackerRequests::Load, scriptCanvasAsset.GetId(), azrtti_typeid(), onAssetReady); - - AZ::Data::AssetBus::Handler::BusConnect(scriptCanvasAsset.GetId()); - ApplyDataPatch(); - } - } - - void ScriptCanvasAssetNode::OnAssetReloaded(AZ::Data::Asset asset) - { - SetAsset(asset); - if (!GetAsset().IsReady()) - { - AZ_Error("Script Canvas", false, "Reloaded graph with id %s is not valid", asset.GetId().ToString().data()); - return; - } - - // Update data patches against the old version of the asset. - ApplyDataPatch(); - } - - void ScriptCanvasAssetNode::OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType) - { - AZ::Data::AssetBus::Handler::BusDisconnect(assetId); - } - - void ScriptCanvasAssetNode::ComputeDataPatch() - { - m_scriptCanvasAssetInstance.ComputeDataPatch(); - } - - void ScriptCanvasAssetNode::ApplyDataPatch() - { - m_scriptCanvasAssetInstance.ApplyDataPatch(); - } - - bool ScriptCanvasAssetNode::Visit(const VisitCB& preVisitCB, const VisitCB & postVisitCB) - { - AZStd::unordered_set visitedGraphs; - return Visit(preVisitCB, postVisitCB, visitedGraphs); - } - - bool ScriptCanvasAssetNode::Visit(const VisitCB& preVisitCB, const VisitCB & postVisitCB, AZStd::unordered_set& visitedGraphs) - { - const AZ::Data::AssetId& visitedAssetId = GetAsset().GetId(); - if (visitedGraphs.count(visitedAssetId) > 0) - { - AZ_Error("Script Canvas", false, "The Script Canvas Asset %s has already been visited, processing will stop", visitedAssetId.ToString().data()); - return false; - } - - if (!preVisitCB || preVisitCB(*this)) - { - auto graph = GetScriptCanvasEntity() ? AZ::EntityUtils::FindFirstDerivedComponent(GetScriptCanvasEntity()) : nullptr; - if (graph) - { - for (AZ::Entity* nodeEntity : graph->GetNodeEntities()) - { - if (auto childAssetNode = AZ::EntityUtils::FindFirstDerivedComponent(nodeEntity)) - { - // Visit ScriptCanvasAssetNodes that are in the asset referenced by @assetNode - if (!childAssetNode->Visit(preVisitCB, postVisitCB, visitedGraphs)) - { - break; - } - - } - } - } - } - - // Visit siblings ScriptCanvasAssetNodes - bool visitSiblings = !postVisitCB || postVisitCB(*this); - visitedGraphs.insert(visitedAssetId); - return visitSiblings; - } -} diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h b/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h deleted file mode 100644 index 5b3e07cfbd..0000000000 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/ScriptCanvasAssetNode.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - -#pragma once - -#include - -#include -#include -#include -#include - -namespace ScriptCanvasEditor -{ - //! A group of entities in a scene - class ScriptCanvasAssetNode - : public ScriptCanvas::Node - , protected AZ::Data::AssetBus::Handler - { - public: - AZ_COMPONENT(ScriptCanvasAssetNode, "{65A34956-B6ED-4EB2-966C-5BC844F7B05E}", ScriptCanvas::Node); - - static void Reflect(AZ::ReflectContext* context); - - ScriptCanvasAssetNode() = default; - ScriptCanvasAssetNode(const AZ::Data::Asset& scriptCanvasAsset, bool storeAssetDataInternally); - ~ScriptCanvasAssetNode() override; - - // AZ::Component - static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC("ScriptCanvas_AssetService", 0x17a357ae)); - } - - static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC("ScriptCanvas_AssetService", 0x17a357ae)); - } - - static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) - { - (void)dependent; - } - - static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) - { - (void)required; - } - //// - - void OnInit() override; - - // Retrieves the asset associated with this node - AZ::Data::Asset& GetAsset(); - const AZ::Data::Asset& GetAsset() const; - // Sets the asset associated with this node - void SetAsset(const AZ::Data::Asset& scriptCanvasAsset); - - bool GetAssetDataStoredInternally() const; - void SetAssetDataStoredInternally(bool storeInObjectStream); - - ScriptCanvas::ScriptCanvasData& GetScriptCanvasData(); - const ScriptCanvas::ScriptCanvasData& GetScriptCanvasData() const; - - AZ::Entity* GetScriptCanvasEntity() const; - - using VisitCB = AZStd::function; - bool Visit(const VisitCB& preVisitCB, const VisitCB & postVisitCB); - bool Visit(const VisitCB& preVisitCB, const VisitCB & postVisitCB, AZStd::unordered_set& visitedGraphs); - //// - - protected: - // AssetBus::Handler - void OnAssetReloaded(AZ::Data::Asset asset) override; - void OnAssetUnloaded(const AZ::Data::AssetId assetId, const AZ::Data::AssetType) override; - //// - - friend class ScriptCanvasAssetNodeEventHandler; - void ComputeDataPatch(); - void ApplyDataPatch(); - - private: - ScriptCanvasAssetNode(const ScriptCanvasAssetNode&) = delete; - //! References to the Script Canvas asset used by this component - ScriptCanvasAssetInstance m_scriptCanvasAssetInstance; - }; -} diff --git a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp index 2d45f0c644..435aa27331 100644 --- a/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ReflectComponent.cpp @@ -13,10 +13,6 @@ #include #include -#include -#include - -#include #include #include @@ -36,12 +32,9 @@ namespace ScriptCanvasEditor void ReflectComponent::Reflect(AZ::ReflectContext* context) { ScriptCanvas::ScriptCanvasData::Reflect(context); - ScriptCanvasAssetReference::Reflect(context); - ScriptCanvasAssetInstance::Reflect(context); ScriptCanvasAssetHolder::Reflect(context); EditorSettings::EditorWorkspace::Reflect(context); EditorSettings::ScriptCanvasEditorSettings::Reflect(context); - Library::Editor::Reflect(context); LiveLoggingUserSettings::Reflect(context); UndoData::Reflect(context); diff --git a/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp b/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp index a9aa8cd0e9..d462695025 100644 --- a/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -118,7 +117,6 @@ namespace ScriptCanvas auto libraryDescriptors = ScriptCanvasEditor::GetLibraryDescriptors(); m_descriptors.insert(m_descriptors.end(), libraryDescriptors.begin(), libraryDescriptors.end()); - ScriptCanvasEditor::Library::Editor::InitNodeRegistry(GetNodeRegistry().Get()); } AZ::ComponentTypeList ScriptCanvasModule::GetRequiredSystemComponents() const diff --git a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp index 6ab9c9b640..a451787ede 100644 --- a/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Editor/SystemComponent.cpp @@ -47,8 +47,6 @@ #include #include -#include - namespace ScriptCanvasEditor { static const size_t cs_jobThreads = 1; @@ -332,12 +330,6 @@ namespace ScriptCanvasEditor isScriptCanvasAsset = true; } - ScriptCanvasFunctionDescription scriptCanvasFunctionAssetDescription; - if (!isScriptCanvasAsset && AZStd::wildcard_match(AZStd::string::format("*%s", scriptCanvasFunctionAssetDescription.GetExtensionImpl()).c_str(), fullSourceFileName)) - { - isScriptCanvasAsset = true; - } - if (isScriptCanvasAsset) { auto scriptCanvasEditorCallback = [this]([[maybe_unused]] const char* fullSourceFileNameInCall, const AZ::Uuid& sourceUUIDInCall) @@ -412,7 +404,7 @@ namespace ScriptCanvasEditor nullptr, [this](const AZ::Data::AssetId, const AZ::Data::AssetInfo& assetInfo) { - if (assetInfo.m_assetType == azrtti_typeid() || assetInfo.m_assetType == azrtti_typeid()) + if (assetInfo.m_assetType == azrtti_typeid()) { AddAssetToUpgrade(assetInfo); } @@ -456,11 +448,7 @@ namespace ScriptCanvasEditor if (query == m_assetsToConvert.end()) { - if (assetInfo.m_assetType == azrtti_typeid()) - { - m_assetsToConvert.push_front(assetInfo); - } - else if (assetInfo.m_assetType == azrtti_typeid()) + if (assetInfo.m_assetType == azrtti_typeid()) { m_assetsToConvert.push_back(assetInfo); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h index 26b2eb27d6..8ae511934c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/FunctionNodePaletteTreeItemTypes.h @@ -15,9 +15,6 @@ #include #include - -#include - #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index 9c9a19cd9c..0dada0f7aa 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -1316,56 +1316,6 @@ namespace ScriptCanvasEditor return identifiers; } - AZStd::vector NodePaletteModel::RegisterFunctionInformation(ScriptCanvasFunctionAsset* functionAsset) - { - const AZ::Data::AssetId& assetId = functionAsset->GetId(); - - FunctionNodeModelInformation* modelInformation = aznew FunctionNodeModelInformation(); - - modelInformation->m_functionAssetId = assetId; - modelInformation->m_titlePaletteOverride = "FunctionNodeTitlePalette"; - modelInformation->m_nodeIdentifier = ScriptCanvas::NodeUtils::ConstructFunctionNodeIdentifier(assetId); - - // Temporary until I drive data from the function asset itself - AZStd::string rootPath; - AZ::Data::AssetInfo assetInfo = AssetHelpers::GetAssetInfo(assetId, rootPath); - AZStd::string absolutePath; - - AzFramework::StringFunc::Path::Join(rootPath.c_str(), assetInfo.m_relativePath.c_str(), absolutePath); - - AZStd::string category = "User Functions"; - AZStd::string relativePath; - - if (AzFramework::StringFunc::Path::GetFolderPath(assetInfo.m_relativePath.c_str(), relativePath)) - { - AZStd::to_lower(relativePath.begin(), relativePath.end()); - - const AZStd::string root = "scriptcanvas/functions/"; - if (relativePath.starts_with(root)) - { - relativePath = relativePath.substr(root.size(), relativePath.size() - root.size()); - } - - category.append("/"); - category.append(relativePath); - } - - modelInformation->m_categoryPath = category; - - AzFramework::StringFunc::Path::Normalize(absolutePath); - - AzFramework::StringFunc::Path::GetFileName(absolutePath.c_str(), modelInformation->m_displayName); - //// - - m_registeredNodes.emplace(AZStd::make_pair(modelInformation->m_nodeIdentifier, modelInformation)); - m_assetMapping.insert(AZStd::make_pair(assetId, modelInformation->m_nodeIdentifier)); - - AZStd::vector nodeTypeIdentifiers; - nodeTypeIdentifiers.push_back(modelInformation->m_nodeIdentifier); - - return nodeTypeIdentifiers; - } - void NodePaletteModel::RegisterCategoryInformation(const AZStd::string& category, const CategoryInformation& categoryInformation) { auto categoryIter = m_categoryInformation.find(category); @@ -1552,24 +1502,6 @@ namespace ScriptCanvasEditor AZ_TracePrintf("NodePaletteModel", "Could not refresh node palette properly, the asset failed to load correctly."); } } - else if (productEntry->GetAssetType() == azrtti_typeid()) - { - const AZ::Data::AssetId& assetId = productEntry->GetAssetId(); - - auto functionAsset = AZ::Data::AssetManager::Instance().GetAsset(assetId, azrtti_typeid(), AZ::Data::AssetLoadBehavior::PreLoad); - functionAsset.BlockUntilLoadComplete(); - - if (functionAsset.IsReady()) - { - ScriptCanvasFunctionAsset* data = functionAsset.GetAs(); - - return RegisterFunctionInformation(data); - } - else - { - AZ_TracePrintf("NodePaletteModel", "Could not refresh node palette properly, the asset failed to load correctly."); - } - } } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h index 2286e8e453..03da4cea27 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.h @@ -22,7 +22,6 @@ #include -#include #include #include @@ -87,7 +86,6 @@ namespace ScriptCanvasEditor // Asset Based Registrations AZStd::vector RegisterScriptEvent(ScriptEvents::ScriptEventsAsset* scriptEventAsset); - AZStd::vector RegisterFunctionInformation(ScriptCanvasFunctionAsset* functionAsset); void RegisterCategoryInformation(const AZStd::string& category, const CategoryInformation& categoryInformation); const CategoryInformation* FindCategoryInformation(const AZStd::string& categoryStyle) const; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp index dfeb439c3d..3afa9100d0 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp @@ -223,7 +223,7 @@ namespace ScriptCanvasEditor void ScriptCanvasRootPaletteTreeItem::SetActiveScriptCanvasId(const ScriptCanvas::ScriptCanvasId& scriptCanvasId) { - ScriptCanvas::RuntimeRequestBus::EventResult(m_previousAssetId, scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetId); + ScriptCanvas::GraphRequestBus::EventResult(m_previousAssetId, scriptCanvasId, &ScriptCanvas::GraphRequests::GetAssetId); for (auto functionTreePair : m_globalFunctionTreeItems) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp index caa39d4ca4..7aa03224e4 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/StatisticsDialog/ScriptCanvasStatisticsDialog.cpp @@ -16,7 +16,6 @@ #include #include -#include #include namespace @@ -181,8 +180,7 @@ namespace ScriptCanvasEditor { AZ::Data::AssetInfo assetInfo; AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - if (assetInfo.m_assetType == azrtti_typeid() - || assetInfo.m_assetType == azrtti_typeid()) + if (assetInfo.m_assetType == azrtti_typeid()) { m_scriptCanvasAssetTreeRoot->RegisterAsset(assetId, assetInfo.m_assetType); } @@ -197,8 +195,7 @@ namespace ScriptCanvasEditor { AZ::Data::AssetInfo assetInfo; AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - if (assetInfo.m_assetType == azrtti_typeid() - || assetInfo.m_assetType == azrtti_typeid()) + if (assetInfo.m_assetType == azrtti_typeid()) { m_scriptCanvasAssetTreeRoot->RemoveAsset(assetId); } @@ -440,8 +437,7 @@ namespace ScriptCanvasEditor { const AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry* productEntry = static_cast(entry); - if (productEntry->GetAssetType() == azrtti_typeid() - || productEntry->GetAssetType() == azrtti_typeid()) + if (productEntry->GetAssetType() == azrtti_typeid()) { const AZ::Data::AssetId& assetId = productEntry->GetAssetId(); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp index aad178b91d..95e782c137 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp @@ -1053,9 +1053,6 @@ namespace ScriptCanvasEditor AZ::SerializeContext* serializeContext = AZ::EntityUtils::GetApplicationSerializeContext(); AZ::Utils::LoadObjectFromBufferInPlace(byteArray.constData(), static_cast(byteArray.size()), copiedVariableData, serializeContext); - bool isRuntimeGraph = false; - EditorGraphRequestBus::EventResult(isRuntimeGraph, scriptCanvasId, &EditorGraphRequests::IsRuntimeGraph); - ScriptCanvas::GraphVariableManagerRequests* requests = ScriptCanvas::GraphVariableManagerRequestBus::FindFirstHandler(scriptCanvasId); if (requests == nullptr) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp index 9307084e2a..a6ae834f3e 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariableDockWidget.cpp @@ -758,7 +758,7 @@ namespace ScriptCanvasEditor auto owningGraph = ScriptCanvas::GraphRequestBus::FindFirstHandler(m_scriptCanvasId); - if (runtimeRequests == nullptr) + if (owningGraph == nullptr) { return; } @@ -769,7 +769,7 @@ namespace ScriptCanvasEditor if (propertiesComponent) { - ScriptCanvas::GraphVariable* graphVariable = runtimeRequests->FindVariableById(varId);; + ScriptCanvas::GraphVariable* graphVariable = owningGraph->FindVariableById(varId);; propertiesComponent->SetVariable(graphVariable); selection.push_back(propertiesComponent->GetEntityId()); diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp index fcbd1a1680..7c6c161246 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp @@ -150,8 +150,6 @@ #include #include -#include -#include #include #include @@ -264,14 +262,7 @@ namespace ScriptCanvasEditor if (editorRequests) { - if (editorRequests->IsFunctionGraph()) - { - assetSaveData.m_assetType = azrtti_typeid(); - } - else - { - assetSaveData.m_assetType = azrtti_typeid(); - } + assetSaveData.m_assetType = azrtti_typeid(); } activeAssets.push_back(assetSaveData); @@ -1303,8 +1294,7 @@ namespace ScriptCanvasEditor return AZ::Failure(AZStd::string("Unknown AssetId")); } - if (assetInfo.m_assetType != azrtti_typeid() && - assetInfo.m_assetType != azrtti_typeid()) + if (assetInfo.m_assetType != azrtti_typeid()) { return AZ::Failure(AZStd::string("Invalid AssetId provided, it's not a Script Canvas supported type")); } @@ -3680,10 +3670,6 @@ namespace ScriptCanvasEditor { buttonEnabled = false; } - else - { - EditorGraphRequestBus::EventResult(buttonEnabled, GetActiveScriptCanvasId(), &EditorGraphRequests::IsRuntimeGraph); - } m_assignToSelectedEntity->setEnabled(buttonEnabled); } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp index e35435f5dd..382f2a6784 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeHelper.cpp @@ -16,8 +16,6 @@ #include "UpgradeHelper.h" -#include - #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp index 02fb5b567d..c3ccd3105c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/UpgradeTool.cpp @@ -12,8 +12,6 @@ #include "UpgradeTool.h" -#include - #include #include #include @@ -284,10 +282,6 @@ namespace ScriptCanvasEditor { tmpFilesaved = AZ::Utils::SaveObjectToStream(fileStream, AZ::DataStream::ST_XML, &asset.GetAs()->GetScriptCanvasData()); } - else if (asset.GetType() == azrtti_typeid()) - { - tmpFilesaved = AZ::Utils::SaveObjectToStream(fileStream, AZ::DataStream::ST_XML, &asset.GetAs()->GetScriptCanvasData()); - } fileStream.Close(); } @@ -708,10 +702,6 @@ namespace ScriptCanvasEditor { scriptCanvasEntity = UpgradeGraph(asset, this); } - else if (asset.GetType() == azrtti_typeid()) - { - scriptCanvasEntity = UpgradeGraph(asset, this); - } if (!scriptCanvasEntity) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp index 9ec399f616..4bee3ab351 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/Tools/UpgradeTool/VersionExplorer.cpp @@ -16,8 +16,6 @@ #include "VersionExplorer.h" -#include - #include #include #include @@ -323,10 +321,6 @@ namespace ScriptCanvasEditor { m_scriptCanvasEntity = UpgradeGraphProcess(asset, this); } - else if (asset.GetType() == azrtti_typeid()) - { - m_scriptCanvasEntity = UpgradeGraphProcess(asset, this); - } if (!m_scriptCanvasEntity) { @@ -358,10 +352,6 @@ namespace ScriptCanvasEditor { tmpFilesaved = AZ::Utils::SaveObjectToStream(fileStream, AZ::DataStream::ST_XML, &asset.GetAs()->GetScriptCanvasData()); } - else if (asset.GetType() == azrtti_typeid()) - { - tmpFilesaved = AZ::Utils::SaveObjectToStream(fileStream, AZ::DataStream::ST_XML, &asset.GetAs()->GetScriptCanvasData()); - } fileStream.Close(); } @@ -647,17 +637,6 @@ namespace ScriptCanvasEditor scriptCanvasEntity = scriptCanvasAsset->GetScriptCanvasEntity(); AZ_Assert(scriptCanvasEntity, "The Script Canvas asset must have a valid entity"); } - else if (asset.GetType() == azrtti_typeid()) - { - ScriptCanvasFunctionAsset* scriptCanvasAsset = asset.GetAs(); - if (!scriptCanvasAsset) - { - return; - } - - scriptCanvasEntity = scriptCanvasAsset->GetScriptCanvasEntity(); - AZ_Assert(scriptCanvasEntity, "The Script Canvas asset must have a valid entity"); - } auto graphComponent = scriptCanvasEntity->FindComponent(); AZ_Assert(graphComponent, "The Script Canvas entity must have a Graph component"); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp similarity index 98% rename from Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.cpp rename to Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp index 2f20fbbabb..66d01691a8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include @@ -19,6 +18,7 @@ #include #include +#include namespace ScriptCanvas { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.h similarity index 100% rename from Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.h rename to Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.h diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index 4545063f56..48e8adb9a7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -13,8 +13,6 @@ #include #include #include - -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h index 172569561c..3977807305 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/BaseTimerNode.h @@ -83,7 +83,7 @@ namespace ScriptCanvas //// int m_timeUnits = 0; - int m_tickOrder = static_cast(AZ::TICK_DEFAULT); + int m_tickOrder = 1000; // from TICK_DEFAULT bool m_isActive = false; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp index d383afe02f..c4f8f0edd5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.cpp @@ -443,11 +443,6 @@ namespace ScriptCanvas }); } - void ExpressionNodeBase::OnResult([[maybe_unused]] const ExpressionEvaluation::ExpressionResult& result) - { - AZ_Assert(false, "Implementing node must override OnResult."); - } - ExpressionEvaluation::ParseOutcome ExpressionNodeBase::ParseExpression([[maybe_unused]] const AZStd::string& formatString) { AZ_Assert(false , "Implementing node must override OnResult."); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h index 04d5400061..32886e0cd2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Internal/Nodes/ExpressionNodeBase.h @@ -37,8 +37,6 @@ namespace ScriptCanvas AZStd::string GetRawFormat() const; const AZStd::unordered_map& GetSlotsByName() const; - - protected: @@ -76,14 +74,11 @@ namespace ScriptCanvas AZ::Crc32 GetPropertyId() const { return AZ_CRC("FormatStringProperty", 0x2c587efa); } protected: - - virtual void OnResult(const ExpressionEvaluation::ExpressionResult& result); virtual ExpressionEvaluation::ParseOutcome ParseExpression(const AZStd::string& formatString); virtual AZStd::string GetExpressionSeparator() const; private: - void PushVariable(const AZStd::string& variableName, const Datum& datum); // NodePropertyInterface... diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h index 56b17095a7..99679e53bc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/FunctionCallNode.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp index b76c3ce87c..7812d80717 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp @@ -86,11 +86,6 @@ namespace ScriptCanvas AZ::Outcome IsExposable(const AZ::BehaviorMethod& method) { - if (method.GetNumArguments() > BehaviorContextMethodHelper::MaxCount) - { - return AZ::Failure(AZStd::string("Too many arguments for a Script Canvas method")); - } - for (size_t argIndex(0), sentinel(method.GetNumArguments()); argIndex != sentinel; ++argIndex) { if (const AZ::BehaviorParameter* argument = method.GetArgument(argIndex)) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp index 17f2242b90..9cbbd03e9a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp @@ -177,11 +177,6 @@ namespace ScriptCanvas m_userData.m_methodDefinition = methodDefinition; AZ_Assert(!event.m_parameters.empty(), "No parameters in event!"); - if (!events[eventIndex].m_function) - { - m_handler->InstallGenericHook(events[eventIndex].m_name, &OnEventGenericHook, &m_userData); - } - if (m_eventMap.find(eventId) == m_eventMap.end()) { m_eventMap[eventId] = ConfigureEbusEntry(*methodDefinition, event, populationMapping); @@ -309,12 +304,6 @@ namespace ScriptCanvas return eBusEventEntry; } - void ReceiveScriptEvent::OnEventGenericHook(void* userData, const char* eventName, int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters) - { - ReceiveScriptEvent::EventHookUserData* eventHookUserData(reinterpret_cast(userData)); - eventHookUserData->m_handler->OnEvent(eventName, eventIndex, result, numParameters, parameters); - } - void ReceiveScriptEvent::SetAutoConnectToGraphOwner(bool enabled) { ScriptCanvas::Slot* connectSlot = ReceiveScriptEventProperty::GetConnectSlot(this); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h index d1aa439b42..59800c943f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h @@ -42,7 +42,6 @@ namespace ScriptCanvas ~ReceiveScriptEvent() override; void OnActivate() override; - void OnPostActivate() override; void OnDeactivate() override; const AZ::Data::AssetId GetAssetId() const { return m_scriptEventAssetId; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.cpp index 83cf0621fb..86fe9681e1 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.cpp @@ -12,17 +12,6 @@ namespace ScriptCanvas { namespace Math { - void MathExpression::OnResult(const ExpressionEvaluation::ExpressionResult& result) - { - if (result.is()) - { - Datum output; - output.Set(AZStd::any_cast(result)); - PushOutput(output, (*MathExpressionProperty::GetResultSlot(this))); - SignalOutput(MathExpressionProperty::GetOutSlotId(this)); - } - } - ExpressionEvaluation::ParseOutcome MathExpression::ParseExpression(const AZStd::string& formatString) { const AZStd::unordered_set mathInterfaceSet = { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.h index 76d952b92c..eb091cc095 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathExpression.h @@ -37,7 +37,6 @@ namespace ScriptCanvas return AZ::Success(GetSlotsByType(targetSlotType)); } - void OnResult(const ExpressionEvaluation::ExpressionResult& result) override; ExpressionEvaluation::ParseOutcome ParseExpression(const AZStd::string& formatString) override; AZStd::string GetExpressionSeparator() const override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h index 2b6746156d..068043975f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.h @@ -35,9 +35,7 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void InvokeOperator(); }; - } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h index f28c46e0f8..64ea312f5d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorFront.h @@ -35,9 +35,7 @@ namespace ScriptCanvas void ConfigureContracts(SourceType sourceType, AZStd::vector& contractDescs) override; void OnSourceTypeChanged() override; - void InvokeOperator(); }; - } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp index 376a6154a9..4e777fff2f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp @@ -207,20 +207,6 @@ namespace ScriptCanvas AZ_UNUSED(dataType); } - void OperatorArithmetic::InvokeOperator() - { - if (!m_result.GetType().IsValid()) - { - return; - } - - Evaluate(m_applicableInputs, m_result); - - PushOutput(m_result, (*m_resultSlot)); - - SignalOutput(m_outSlot); - } - SlotId OperatorArithmetic::CreateSlot(AZStd::string_view name, AZStd::string_view toolTip, ConnectionType connectionType) { DynamicDataSlotConfiguration slotConfiguration; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h index 4fcd6a1905..5b2ea00871 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h @@ -100,8 +100,7 @@ namespace ScriptCanvas virtual void Operator(Data::eType type, const ArithmeticOperands& operands, Datum& result); virtual void InitializeSlot(const SlotId& slotId, const Data::Type& dataType); - virtual void InvokeOperator(); - + ////////////////////////////////////////////////////////////////////////// // Translation AZ::Outcome GetDependencies() const override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp index b2cffe79af..8fb5d666fa 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.cpp @@ -20,11 +20,6 @@ namespace ScriptCanvas , m_seconds(0.f) , m_milliseconds(0.f) {} - - void Timer::OnDeactivate() - { - AZ::TickBus::Handler::BusDisconnect(); - } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h index fa5f4309ed..14fa3a767c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h @@ -34,11 +34,6 @@ namespace ScriptCanvas float m_seconds; float m_milliseconds; - - protected: - - AZ::ScriptTimePoint m_start; - void OnDeactivate() override; }; } } diff --git a/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp b/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp index 792c72b3f6..fe8e8d20df 100644 --- a/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp +++ b/Gems/ScriptCanvas/Code/Source/ScriptCanvasCommonGem.cpp @@ -20,7 +20,6 @@ #include #include #include -#include namespace ScriptCanvas { @@ -41,7 +40,6 @@ namespace ScriptCanvas ScriptCanvas::Node::CreateDescriptor(), ScriptCanvas::Debugger::ServiceComponent::CreateDescriptor(), ScriptCanvas::Graph::CreateDescriptor(), - ScriptCanvasEditor::ScriptCanvasFunctionDataComponent::CreateDescriptor(), ScriptCanvas::GraphVariableManagerComponent::CreateDescriptor(), ScriptCanvas::RuntimeComponent::CreateDescriptor(), diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake index 74e0e2e70c..40b5786303 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_common_files.cmake @@ -25,9 +25,8 @@ set(FILES Include/ScriptCanvas/Asset/RuntimeAssetHandler.h Include/ScriptCanvas/Asset/ScriptCanvasAssetBase.h Include/ScriptCanvas/Asset/ScriptCanvasAssetData.h - Include/ScriptCanvas/Asset/Functions/ScriptCanvasFunctionAsset.h - Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.cpp - Include/ScriptCanvas/Asset/Functions/RuntimeFunctionAssetHandler.h + Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.cpp + Include/ScriptCanvas/Asset/SubgraphInterfaceAssetHandler.h Include/ScriptCanvas/Core/ScriptCanvasBus.h Include/ScriptCanvas/Core/ExecutionNotificationsBus.cpp Include/ScriptCanvas/Core/ExecutionNotificationsBus.h diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_builder_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_builder_files.cmake index a401a0cc1d..339973aa8e 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_builder_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_builder_files.cmake @@ -14,5 +14,4 @@ set(FILES Builder/ScriptCanvasBuilderWorker.cpp Builder/ScriptCanvasBuilderWorker.h Builder/ScriptCanvasBuilderWorkerUtility.cpp - Builder/ScriptCanvasFunctionBuilderWorker.cpp ) diff --git a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake index ba84163d64..309fa83edc 100644 --- a/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake +++ b/Gems/ScriptCanvas/Code/scriptcanvasgem_editor_files.cmake @@ -21,8 +21,6 @@ set(FILES Editor/Assets/ScriptCanvasAssetHelpers.h Editor/Assets/ScriptCanvasAssetHelpers.cpp Editor/Assets/ScriptCanvasAssetTrackerDefinitions.h - Editor/Include/ScriptCanvas/Assets/Functions/ScriptCanvasFunctionAssetHandler.h - Editor/Assets/Functions/ScriptCanvasFunctionAssetHandler.cpp Editor/Include/ScriptCanvas/Assets/ScriptCanvasAsset.h Editor/Assets/ScriptCanvasAsset.cpp Editor/Include/ScriptCanvas/Assets/ScriptCanvasAssetBus.h @@ -31,11 +29,6 @@ set(FILES Editor/Assets/ScriptCanvasAssetHandler.cpp Editor/Assets/ScriptCanvasAssetHolder.h Editor/Assets/ScriptCanvasAssetHolder.cpp - Editor/Assets/ScriptCanvasAssetInstance.h - Editor/Assets/ScriptCanvasAssetInstance.cpp - Editor/Assets/ScriptCanvasAssetReference.h - Editor/Assets/ScriptCanvasAssetReference.cpp - Editor/Assets/ScriptCanvasAssetReferenceContainer.h Editor/Assets/ScriptCanvasMemoryAsset.h Editor/Assets/ScriptCanvasMemoryAsset.cpp Editor/Assets/ScriptCanvasUndoHelper.h @@ -127,16 +120,12 @@ set(FILES Editor/Model/LibraryDataModel.cpp Editor/Model/UnitTestBrowserFilterModel.h Editor/Model/UnitTestBrowserFilterModel.cpp - Editor/Nodes/EditorLibrary.h - Editor/Nodes/EditorLibrary.cpp Editor/Nodes/NodeCreateUtils.h Editor/Nodes/NodeCreateUtils.cpp Editor/Nodes/NodeDisplayUtils.h Editor/Nodes/NodeDisplayUtils.cpp Editor/Nodes/NodeUtils.h Editor/Nodes/NodeUtils.cpp - Editor/Nodes/ScriptCanvasAssetNode.h - Editor/Nodes/ScriptCanvasAssetNode.cpp Editor/Translation/TranslationHelper.h Editor/Undo/ScriptCanvasGraphCommand.cpp Editor/Undo/ScriptCanvasGraphCommand.h diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp index f016dd0a8d..97aa1667df 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp @@ -73,19 +73,6 @@ namespace ScriptCanvasDeveloper { return AZ::Failure("Active graph is not the newly created graph."); } - else - { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - ScriptCanvasEditor::GeneralRequestBus::BroadcastResult(scriptCanvasId, &ScriptCanvasEditor::GeneralRequests::GetScriptCanvasId, activeGraphCanvasId); - - bool isRuntimeGraph = false; - ScriptCanvasEditor::EditorGraphRequestBus::EventResult(isRuntimeGraph, scriptCanvasId, &ScriptCanvasEditor::EditorGraphRequests::IsRuntimeGraph); - - if (!isRuntimeGraph) - { - return AZ::Failure("Created a new Graph, but graph is not of type Runtime Graph."); - } - } } return CompoundAction::GenerateReport(); diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.cpp index bc372a4f50..cb182b1852 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomationTests/GraphCreationTests.cpp @@ -75,19 +75,6 @@ namespace ScriptCanvasDeveloper { ReportError("Active graph is not the newly created graph using hotkey."); } - else - { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - ScriptCanvasEditor::GeneralRequestBus::BroadcastResult(scriptCanvasId, &ScriptCanvasEditor::GeneralRequests::GetScriptCanvasId, activeGraphCanvasId); - - bool isRuntimeGraph = false; - ScriptCanvasEditor::EditorGraphRequestBus::EventResult(isRuntimeGraph, scriptCanvasId, &ScriptCanvasEditor::EditorGraphRequests::IsRuntimeGraph); - - if (!isRuntimeGraph) - { - ReportError("Failed to create Runtime graph using button"); - } - } } GraphCanvas::AssetEditorNotificationBus::Handler::BusDisconnect(); diff --git a/Gems/ScriptCanvasTesting/Code/Platform/Common/MSVC/scriptcanvastesting_editor_tests_msvc.cmake b/Gems/ScriptCanvasTesting/Code/Platform/Common/MSVC/scriptcanvastesting_editor_tests_msvc.cmake index 95d699cd27..0d70c9d05c 100644 --- a/Gems/ScriptCanvasTesting/Code/Platform/Common/MSVC/scriptcanvastesting_editor_tests_msvc.cmake +++ b/Gems/ScriptCanvasTesting/Code/Platform/Common/MSVC/scriptcanvastesting_editor_tests_msvc.cmake @@ -8,7 +8,6 @@ ly_add_source_properties( SOURCES Source/Framework/ScriptCanvasTestUtilities.cpp - Tests/ScriptCanvas_Async.cpp Tests/ScriptCanvas_BehaviorContext.cpp Tests/ScriptCanvas_ContainerSupport.cpp Tests/ScriptCanvas_Core.cpp diff --git a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Async.cpp b/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Async.cpp deleted file mode 100644 index e50914c0a6..0000000000 --- a/Gems/ScriptCanvasTesting/Code/Tests/ScriptCanvas_Async.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include -#include -#include - -#include -#include - -#include - -using namespace ScriptCanvasTests; -using namespace ScriptCanvasEditor; - -// Asynchronous ScriptCanvas Behaviors - -#if AZ_COMPILER_MSVC - -#include - -class AsyncEvent : public AZ::EBusTraits -{ -public: - - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AZ::EntityId; - using MutexType = AZStd::recursive_mutex; - static const bool LocklessDispatch = true; - - ////////////////////////////////////////////////////////////////////////// - - virtual void OnAsyncEvent() = 0; -}; - -using AsyncEventNotificationBus = AZ::EBus; - -class LongRunningProcessSimulator3000 -{ -public: - - static void Run(const AZ::EntityId& listener) - { - int duration = 40; - while (--duration > 0) - { - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(10)); - } - - AsyncEventNotificationBus::Event(listener, &AsyncEvent::OnAsyncEvent); - } -}; - -class AsyncNode - : public ScriptCanvas::Node - , protected AsyncEventNotificationBus::Handler - , protected AZ::TickBus::Handler -{ -public: - AZ_COMPONENT(AsyncNode, "{0A7FF6C6-878B-42EC-A8BB-4D29C4039853}", ScriptCanvas::Node); - - bool IsEntryPoint() const { return true; } - - AsyncNode() - : Node() - {} - - static void Reflect(AZ::ReflectContext* reflection) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflection); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - } - } - - void ConfigureSlots() override - { - AddSlot(ScriptCanvas::CommonSlots::GeneralInSlot()); - AddSlot(ScriptCanvas::CommonSlots::GeneralOutSlot()); - } - - void OnActivate() override - { - ScriptCanvasTestFixture::s_asyncOperationActive = true; - AZ::TickBus::Handler::BusConnect(); - AsyncEventNotificationBus::Handler::BusConnect(GetEntityId()); - - std::packaged_task task([this]() { LongRunningProcessSimulator3000::Run(GetEntityId()); }); // wrap the function - - m_eventThread = AZStd::make_shared(AZStd::move(task)); // launch on a thread - } - - void OnDeactivate() override - { - if (m_eventThread) - { - m_eventThread->join(); - m_eventThread.reset(); - } - - // We've received the event, no longer need the bus connection - AsyncEventNotificationBus::Handler::BusDisconnect(); - - // We're done, kick it out. - SignalOutput(GetSlotId("Out")); - - // Disconnect from tick bus as well - AZ::TickBus::Handler::BusDisconnect(); - } - - virtual void HandleAsyncEvent() - { - EXPECT_GT(m_duration, 0.f); - - Shutdown(); - } - - void OnAsyncEvent() override - { - HandleAsyncEvent(); - } - - void Shutdown() - { - ScriptCanvasTestFixture::s_asyncOperationActive = false; - } - - void OnTick(float deltaTime, AZ::ScriptTimePoint) override - { - AZ_TracePrintf("Debug", "Awaiting async operation: %.2f\n", m_duration); - m_duration += deltaTime; - } - -protected: - AZStd::shared_ptr m_eventThread; -private: - double m_duration = 0.f; -}; - -TEST_F(ScriptCanvasTestFixture, Asynchronous_Behaviors) -{ - using namespace ScriptCanvas; - - RegisterComponentDescriptor(); - - // Make the graph. - ScriptCanvas::Graph* graph =nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - ASSERT_TRUE(graph != nullptr); - - AZ::Entity* graphEntity = graph->GetEntity(); - graphEntity->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::Entity* startEntity{ aznew AZ::Entity }; - startEntity->Init(); - - AZ::EntityId startNodeId; - CreateTestNode(graphUniqueId, startNodeId); - - AZ::EntityId asyncNodeId; - CreateTestNode(graphUniqueId, asyncNodeId); - - EXPECT_TRUE(Connect(*graph, startNodeId, ScriptCanvas::CommonSlots::GeneralOutSlot::GetName(), asyncNodeId, ScriptCanvas::CommonSlots::GeneralInSlot::GetName())); - - { - ScopedOutputSuppression supressOutput; - graphEntity->Activate(); - - // Tick the TickBus while the graph entity is active - while (ScriptCanvasTestFixture::s_asyncOperationActive) - { - AZ::TickBus::ExecuteQueuedEvents(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(100)); - AZ::TickBus::Broadcast(&AZ::TickEvents::OnTick, 0.01f, AZ::ScriptTimePoint(AZStd::chrono::system_clock::now())); - } - } - - graphEntity->Deactivate(); - delete graphEntity; -} - -/////////////////////////////////////////////////////////////////////////////// - -namespace -{ - // Fibonacci solver, used to compare against the graph version. - long ComputeFibonacci(int digits) - { - int a = 0; - int b = 1; - long sum = 0; - for (int i = 0; i < digits - 2; ++i) - { - sum = a + b; - a = b; - b = sum; - } - return sum; - } -} - -class AsyncFibonacciComputeNode - : public AsyncNode -{ -public: - AZ_COMPONENT(AsyncFibonacciComputeNode, "{B198F52D-708C-414B-BB90-DFF0462D7F03}", AsyncNode); - - AsyncFibonacciComputeNode() - : AsyncNode() - {} - - bool IsEntryPoint() const { return true; } - - static const int k_numberOfFibonacciDigits = 64; - - static void Reflect(AZ::ReflectContext* reflection) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflection); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - } - } - - void OnActivate() override - { - AZ::TickBus::Handler::BusConnect(); - AsyncEventNotificationBus::Handler::BusConnect(GetEntityId()); - - int digits = k_numberOfFibonacciDigits; - - std::promise p; - m_computeFuture = p.get_future(); - m_eventThread = AZStd::make_shared([this, digits, p = AZStd::move(p)]() mutable - { - p.set_value(ComputeFibonacci(digits)); - AsyncEventNotificationBus::Event(GetEntityId(), &AsyncEvent::OnAsyncEvent); - }); - } - - void HandleAsyncEvent() override - { - m_result = m_computeFuture.get(); - - EXPECT_EQ(m_result, ComputeFibonacci(k_numberOfFibonacciDigits)); - } - - void OnTick(float deltaTime, AZ::ScriptTimePoint) override - { - AZ_TracePrintf("Debug", "Awaiting async fib operation: %.2f\n", m_duration); - m_duration += deltaTime; - - if (m_result != 0) - { - Shutdown(); - } - } - -private: - std::future m_computeFuture; - long m_result = 0; - double m_duration = 0.f; -}; - -TEST_F(ScriptCanvasTestFixture, ComputeFibonacciAsyncGraphTest) -{ - using namespace ScriptCanvas; - - RegisterComponentDescriptor(); - RegisterComponentDescriptor(); - - // Make the graph. - ScriptCanvas::Graph* graph =nullptr; - SystemRequestBus::BroadcastResult(graph, &SystemRequests::MakeGraph); - ASSERT_NE(graph, nullptr); - - AZ::Entity* graphEntity = graph->GetEntity(); - graphEntity->Init(); - - const ScriptCanvasId& graphUniqueId = graph->GetScriptCanvasId(); - - AZ::EntityId startNodeId; - CreateTestNode(graphUniqueId, startNodeId); - - AZ::EntityId asyncNodeId; - CreateTestNode(graphUniqueId, asyncNodeId); - - EXPECT_TRUE(Connect(*graph, startNodeId, "Out", asyncNodeId, "In")); - - graphEntity->Activate(); - - // Tick the TickBus while the graph entity is active - while (ScriptCanvasTestFixture::s_asyncOperationActive) - { - AZ::TickBus::ExecuteQueuedEvents(); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(100)); - AZ::TickBus::Broadcast(&AZ::TickEvents::OnTick, 0.01f, AZ::ScriptTimePoint(AZStd::chrono::system_clock::now())); - } - - graphEntity->Deactivate(); - delete graphEntity; -} - -#endif // AZ_COMPILER_MSVC diff --git a/Gems/ScriptCanvasTesting/Code/scriptcanvastestingeditor_tests_files.cmake b/Gems/ScriptCanvasTesting/Code/scriptcanvastestingeditor_tests_files.cmake index 681a3c0ba1..b6ab617e26 100644 --- a/Gems/ScriptCanvasTesting/Code/scriptcanvastestingeditor_tests_files.cmake +++ b/Gems/ScriptCanvasTesting/Code/scriptcanvastestingeditor_tests_files.cmake @@ -15,7 +15,6 @@ set(FILES Source/Framework/ScriptCanvasTestApplication.h Source/Framework/EntityRefTests.h Tests/ScriptCanvasTestingTest.cpp - Tests/ScriptCanvas_Async.cpp Tests/ScriptCanvas_BehaviorContext.cpp Tests/ScriptCanvas_ContainerSupport.cpp Tests/ScriptCanvas_Core.cpp From aca8a730a69adf3b2fd29ab5a154f24b9171cfdc Mon Sep 17 00:00:00 2001 From: Ken Pruiksma Date: Tue, 6 Jul 2021 19:42:12 -0500 Subject: [PATCH 08/67] Fixing simple light types appearing back at 0,0,0 after hiding/unhiding. Signed-off-by: Ken Pruiksma --- .../Code/Source/CoreLights/LightDelegateBase.inl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.inl b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.inl index 36c53c8fab..a84487749f 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.inl +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.inl @@ -134,6 +134,11 @@ namespace AZ // For lights that get their transform from the shape bus, force an OnShapeChanged to update the transform. OnShapeChanged(ShapeChangeReasons::TransformChanged); } + else + { + // OnShapeChanged() already calls this for delegates with a shape bus + HandleShapeChanged(); + } } } From 65ad412f3ecab58709ec42039f0a264ed839cc6c Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 6 Jul 2021 19:27:58 -0700 Subject: [PATCH 09/67] The Great ScriptCanvas Purge, Part VI Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp b/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp index d462695025..588e1cf1d0 100644 --- a/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp +++ b/Gems/ScriptCanvas/Code/Editor/ScriptCanvasEditorGem.cpp @@ -114,9 +114,6 @@ namespace ScriptCanvas ScriptCanvasEditor::FunctionDefinitionNodeDescriptorComponent::CreateDescriptor(), ScriptCanvasEditor::NodelingDescriptorComponent::CreateDescriptor() }); - - auto libraryDescriptors = ScriptCanvasEditor::GetLibraryDescriptors(); - m_descriptors.insert(m_descriptors.end(), libraryDescriptors.begin(), libraryDescriptors.end()); } AZ::ComponentTypeList ScriptCanvasModule::GetRequiredSystemComponents() const From 75933ff7fd51fcbc94feb08f1c0fffaccba670f0 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Tue, 6 Jul 2021 21:03:31 -0700 Subject: [PATCH 10/67] The Great ScriptCanvas Purge, Part VII Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Code/Include/ScriptCanvas/Core/Connection.cpp | 7 ++++++- .../Code/Include/ScriptCanvas/Core/Connection.h | 2 -- .../Include/ScriptCanvas/Libraries/Core/GetVariable.cpp | 2 +- .../Include/ScriptCanvas/Libraries/Core/SetVariable.cpp | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.cpp index 2a2c055416..d97a208064 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.cpp @@ -168,7 +168,12 @@ namespace ScriptCanvas { if (nodeId == m_sourceEndpoint.GetNodeId() || nodeId == m_targetEndpoint.GetNodeId()) { - GraphRequestBus::Event(*GraphNotificationBus::GetCurrentBusId(), &GraphRequests::DisconnectById, GetEntityId()); + Slot* sourceSlot{}; + NodeRequestBus::EventResult(sourceSlot, m_sourceEndpoint.GetNodeId(), &NodeRequests::GetSlot, m_sourceEndpoint.GetSlotId()); + if (sourceSlot) + { + GraphRequestBus::Event(sourceSlot->GetNode()->GetOwningScriptCanvasId(), &GraphRequests::DisconnectById, GetEntityId()); + } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.h index 1a1c47794b..79a73b6f19 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Connection.h @@ -60,8 +60,6 @@ namespace ScriptCanvas // GraphNotificationBus void OnNodeRemoved(const ID& nodeId) override; - void UpdateConnectionStatus(NodeUpdateSlotReport& report); - protected: //------------------------------------------------------------------------- static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp index 43fc8ed54b..fb6d2f21e7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp @@ -288,7 +288,7 @@ namespace ScriptCanvas VariableRequestBus::EventResult(baseType, GetScopedVariableId(), &VariableRequests::GetType); const GraphVariableMapping* variableMap = nullptr; - GraphRequestBus::EventResult(variableMap, *GraphNotificationBus::GetCurrentBusId(), &GraphRequests::GetVariables); + GraphRequestBus::EventResult(variableMap, GetOwningScriptCanvasId(), &GraphRequests::GetVariables); if (variableMap && baseType.IsValid()) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp index 25a73bc7ce..6d6260aabe 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.cpp @@ -243,7 +243,7 @@ namespace ScriptCanvas VariableRequestBus::EventResult(baseType, GetScopedVariableId(), &VariableRequests::GetType); const GraphVariableMapping* variableMap = nullptr; - GraphRequestBus::EventResult(variableMap, *GraphNotificationBus::GetCurrentBusId(), &GraphRequests::GetVariables); + GraphRequestBus::EventResult(variableMap, GetOwningScriptCanvasId(), &GraphRequests::GetVariables); if (variableMap && baseType.IsValid()) { From 635473e5cf9053fbb1e16e0b561452b6d2b29ba8 Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Wed, 7 Jul 2021 11:29:18 -0500 Subject: [PATCH 11/67] [LYN-4990] Fixed legacy launcher/mac/ios icons and removed some remaining unused Editor icons. Signed-off-by: Chris Galvan --- .../Gem/Resources/CryEngineLogoLauncher.bmp | 3 -- AutomatedTesting/Gem/Resources/GameSDK.ico | 4 +- .../AppIcon.appiconset/iPadAppIcon152x152.png | 4 +- .../AppIcon.appiconset/iPadAppIcon76x76.png | 4 +- .../iPadProAppIcon167x167.png | 4 +- .../iPadSettingsIcon29x29.png | 4 +- .../iPadSettingsIcon58x58.png | 4 +- .../iPadSpotlightIcon40x40.png | 4 +- .../iPadSpotlightIcon80x80.png | 4 +- .../iPhoneAppIcon120x120.png | 4 +- .../iPhoneAppIcon180x180.png | 4 +- .../iPhoneSettingsIcon58x58.png | 4 +- .../iPhoneSettingsIcon87x87.png | 4 +- .../iPhoneSpotlightIcon120x120.png | 4 +- .../iPhoneSpotlightIcon80x80.png | 4 +- .../iPadAppIcon152x152.png | 4 +- .../iPadAppIcon76x76.png | 4 +- .../iPadProAppIcon167x167.png | 4 +- .../iPadSettingsIcon29x29.png | 4 +- .../iPadSettingsIcon58x58.png | 4 +- .../iPadSpotlightIcon40x40.png | 4 +- .../iPadSpotlightIcon80x80.png | 4 +- .../iPhoneAppIcon120x120.png | 4 +- .../iPhoneAppIcon180x180.png | 4 +- .../iPhoneSettingsIcon58x58.png | 4 +- .../iPhoneSettingsIcon87x87.png | 4 +- .../iPhoneSpotlightIcon120x120.png | 4 +- .../iPhoneSpotlightIcon80x80.png | 4 +- .../LaunchImage.launchimage/Contents.json | 38 +------------------ .../iPadLaunchImage1024x768.png | 4 +- .../iPadLaunchImage1536x2048.png | 4 +- .../iPadLaunchImage2048x1536.png | 4 +- .../iPadLaunchImage768x1024.png | 4 +- .../iPhoneLaunchImage1242x2688.png | 3 -- .../iPhoneLaunchImage1792x828.png | 3 -- .../iPhoneLaunchImage2688x1242.png | 3 -- .../iPhoneLaunchImage640x1136.png | 4 +- .../iPhoneLaunchImage640x960.png | 4 +- .../iPhoneLaunchImage828x1792.png | 3 -- .../Gem/Resources/LegacyLogoLauncher.bmp | 3 ++ .../AppIcon.appiconset/Contents.json | 4 +- .../AppIcon.appiconset/icon_128 _2x.png | 3 -- .../AppIcon.appiconset/icon_128.png | 4 +- .../AppIcon.appiconset/icon_128_2x.png | 0 .../AppIcon.appiconset/icon_16.png | 4 +- .../AppIcon.appiconset/icon_16_2x.png | 4 +- .../AppIcon.appiconset/icon_256 _2x.png | 3 -- .../AppIcon.appiconset/icon_256.png | 4 +- .../AppIcon.appiconset/icon_256_2x.png | 0 .../AppIcon.appiconset/icon_32.png | 4 +- .../AppIcon.appiconset/icon_32_2x.png | 4 +- .../AppIcon.appiconset/icon_512.png | 4 +- .../AppIcon.appiconset/icon_512_2x.png | 4 +- Code/Editor/editor_lib_files.cmake | 4 -- Code/Editor/res/about_dark.bmp | 3 -- Code/Editor/res/logo.bmp | 3 -- Code/Editor/res/logo.gif | 3 -- Code/Editor/res/sandbox_dark.bmp | 3 -- Code/Editor/res/sb_welcome_dark.bmp | 3 -- .../TestDPAppIcon.appiconset/Contents.json | 4 +- .../TestDPAppIcon.appiconset/icon_128_2x.png} | 0 .../TestDPAppIcon.appiconset/icon_256_2x.png} | 0 .../TestDPAppIcon.appiconset/Contents.json | 4 +- .../TestDPAppIcon.appiconset/icon_128_2x.png | 3 ++ .../TestDPAppIcon.appiconset/icon_256_2x.png | 3 ++ 65 files changed, 98 insertions(+), 165 deletions(-) delete mode 100644 AutomatedTesting/Gem/Resources/CryEngineLogoLauncher.bmp delete mode 100644 AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1242x2688.png delete mode 100644 AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1792x828.png delete mode 100644 AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage2688x1242.png delete mode 100644 AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage828x1792.png create mode 100644 AutomatedTesting/Gem/Resources/LegacyLogoLauncher.bmp delete mode 100644 AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128 _2x.png rename Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png => AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128_2x.png (100%) delete mode 100644 AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256 _2x.png rename Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png => AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256_2x.png (100%) delete mode 100644 Code/Editor/res/about_dark.bmp delete mode 100644 Code/Editor/res/logo.bmp delete mode 100644 Code/Editor/res/logo.gif delete mode 100644 Code/Editor/res/sandbox_dark.bmp delete mode 100644 Code/Editor/res/sb_welcome_dark.bmp rename Templates/{MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png => DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png} (100%) rename Templates/{MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png => DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png} (100%) create mode 100644 Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png create mode 100644 Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png diff --git a/AutomatedTesting/Gem/Resources/CryEngineLogoLauncher.bmp b/AutomatedTesting/Gem/Resources/CryEngineLogoLauncher.bmp deleted file mode 100644 index fe0adc54a4..0000000000 --- a/AutomatedTesting/Gem/Resources/CryEngineLogoLauncher.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf6d56fe4c367d39bd78500dd34332fcad57ad41241768b52781dbdb60ddd972 -size 347568 diff --git a/AutomatedTesting/Gem/Resources/GameSDK.ico b/AutomatedTesting/Gem/Resources/GameSDK.ico index cb935cd926..0be1f28b6c 100644 --- a/AutomatedTesting/Gem/Resources/GameSDK.ico +++ b/AutomatedTesting/Gem/Resources/GameSDK.ico @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61efd8df621780af995fc1250918df5e00364ff00f849bef67702cd4b0a152e1 -size 65537 +oid sha256:41239f8345fa91fe546442208461ad3cd17c7a7a7047af45018b97363bfea204 +size 109783 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png index b0dd493c11..ad18894411 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4901093fa6190bf37291b0fb6de23fba1be8ebbd742775a8565a4106722fbb6 -size 31942 +oid sha256:ebfc95bd4c0cbcc53d0ef9d314d26e09a347a22dabbf210597f405d9ed8646bf +size 7729 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png index 21aa62e96b..888d8cf785 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4ae97c4f44910121a61686862c8342ce598db4cdf9d46b29e96d3cb9e43bd06 -size 22158 +oid sha256:99cb7da9282cfcfa64598455827f27ca6791d45ca0d2c3c2dc090d82468dac03 +size 4447 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png index 6b696a84b2..86aa72016a 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:061e2d0ce8dc852dd298c80f2aed5fee8ea4b87511c00662aa2d00922c0ba3c2 -size 30162 +oid sha256:101568e946f1d4cea86d666187bbf71116bbf62e6eaf6d80bc3c5e2e184bdb15 +size 7938 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png index f3dfa05839..79331c29b1 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0fb4b4b77620d99dae7473b7bd8affe14630419835bd5719167ed200e657fa4f -size 17504 +oid sha256:cf930ffd4efb0b7b627e05aac6e0f56252ea206623e8b5d097d803aa315cdfb8 +size 1812 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png index 5325b805fd..27c4aaef2e 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8aa9b1194f3244025578225a6a87cbc2dd12c70955ff615c8af640ea7f1334f1 -size 19619 +oid sha256:ba5fea53b349e254b4625035a308d5731cb06f6d0adc278874d14db2627962cb +size 3424 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png index 98d8455838..df1630a95a 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c25ffb1af8160b3202977de8c32aaa235e22c643ffd8004e4546c96868ef3b9 -size 18317 +oid sha256:cf087f357cd439d14651073ac079542c60f0648a30dced2a8d19912124b3f8b6 +size 2310 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png index 7482f6c892..4b7f5d6318 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2db961b8f922a552d8ad374fdb56029efd4049a6cde10399b3d961242c82ce53 -size 22571 +oid sha256:421ad4db14c28ed18666158f9ec30747c5b8c757405c1efb32442978911b0c06 +size 4437 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png index da987b86f9..674c6da124 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f39d897a57d4da0a70ede7c91339660b28e9d8c57b3e7d749807b13baa4b85f3 -size 28559 +oid sha256:0d0044ebf7e0a5dd23ed64a1289c705d8f6c3c41a62d65e5a1371058855b8cec +size 6546 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png index 205e025c36..c0c10c2390 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:263b75d58328499eef1f8fa2e64c30706f546badcc0c4464a043b231da93cd0d -size 34969 +oid sha256:3b8717c5f2109dfce1bf7b017278059d4915b524a6eb7e83cfb1926e54ed6869 +size 7383 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png index 0deb4f4f35..27c4aaef2e 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33522ad8a8e826b22dd9ad214f56e63e24bf55c00bd8c845925d848b855dfb48 -size 19619 +oid sha256:ba5fea53b349e254b4625035a308d5731cb06f6d0adc278874d14db2627962cb +size 3424 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png index 78591751d7..9093e13867 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f405c9f3d908d038aea26049e533b0d10955adfac370c7b3b80209997ea706d0 -size 24407 +oid sha256:a32908a839a6cb0ca2a76d6aa60376ba8a14b4428f06c13149ec277514eb5676 +size 4533 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png index 034dcb9fed..674c6da124 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d110f6e151799a2327bcdf5ef94d6fc82b114783a8cc973a8915896679ba4a80 -size 28559 +oid sha256:0d0044ebf7e0a5dd23ed64a1289c705d8f6c3c41a62d65e5a1371058855b8cec +size 6546 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png index f0fa89149c..4b7f5d6318 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db8f00568fad4e49b05249aaa7a48c9fbf85c8b7a78489c83dc9b8161778bcef -size 22571 +oid sha256:421ad4db14c28ed18666158f9ec30747c5b8c757405c1efb32442978911b0c06 +size 4437 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon152x152.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon152x152.png index b0dd493c11..ad18894411 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon152x152.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon152x152.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4901093fa6190bf37291b0fb6de23fba1be8ebbd742775a8565a4106722fbb6 -size 31942 +oid sha256:ebfc95bd4c0cbcc53d0ef9d314d26e09a347a22dabbf210597f405d9ed8646bf +size 7729 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon76x76.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon76x76.png index 21aa62e96b..888d8cf785 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon76x76.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadAppIcon76x76.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4ae97c4f44910121a61686862c8342ce598db4cdf9d46b29e96d3cb9e43bd06 -size 22158 +oid sha256:99cb7da9282cfcfa64598455827f27ca6791d45ca0d2c3c2dc090d82468dac03 +size 4447 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadProAppIcon167x167.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadProAppIcon167x167.png index 6b696a84b2..86aa72016a 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadProAppIcon167x167.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadProAppIcon167x167.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:061e2d0ce8dc852dd298c80f2aed5fee8ea4b87511c00662aa2d00922c0ba3c2 -size 30162 +oid sha256:101568e946f1d4cea86d666187bbf71116bbf62e6eaf6d80bc3c5e2e184bdb15 +size 7938 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon29x29.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon29x29.png index f3dfa05839..79331c29b1 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon29x29.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon29x29.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0fb4b4b77620d99dae7473b7bd8affe14630419835bd5719167ed200e657fa4f -size 17504 +oid sha256:cf930ffd4efb0b7b627e05aac6e0f56252ea206623e8b5d097d803aa315cdfb8 +size 1812 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon58x58.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon58x58.png index 5325b805fd..27c4aaef2e 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon58x58.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSettingsIcon58x58.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8aa9b1194f3244025578225a6a87cbc2dd12c70955ff615c8af640ea7f1334f1 -size 19619 +oid sha256:ba5fea53b349e254b4625035a308d5731cb06f6d0adc278874d14db2627962cb +size 3424 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon40x40.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon40x40.png index 98d8455838..df1630a95a 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon40x40.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon40x40.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c25ffb1af8160b3202977de8c32aaa235e22c643ffd8004e4546c96868ef3b9 -size 18317 +oid sha256:cf087f357cd439d14651073ac079542c60f0648a30dced2a8d19912124b3f8b6 +size 2310 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon80x80.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon80x80.png index 7482f6c892..4b7f5d6318 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon80x80.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPadSpotlightIcon80x80.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2db961b8f922a552d8ad374fdb56029efd4049a6cde10399b3d961242c82ce53 -size 22571 +oid sha256:421ad4db14c28ed18666158f9ec30747c5b8c757405c1efb32442978911b0c06 +size 4437 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon120x120.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon120x120.png index da987b86f9..674c6da124 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon120x120.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon120x120.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f39d897a57d4da0a70ede7c91339660b28e9d8c57b3e7d749807b13baa4b85f3 -size 28559 +oid sha256:0d0044ebf7e0a5dd23ed64a1289c705d8f6c3c41a62d65e5a1371058855b8cec +size 6546 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon180x180.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon180x180.png index 205e025c36..c0c10c2390 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon180x180.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneAppIcon180x180.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:263b75d58328499eef1f8fa2e64c30706f546badcc0c4464a043b231da93cd0d -size 34969 +oid sha256:3b8717c5f2109dfce1bf7b017278059d4915b524a6eb7e83cfb1926e54ed6869 +size 7383 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon58x58.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon58x58.png index 0deb4f4f35..27c4aaef2e 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon58x58.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon58x58.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33522ad8a8e826b22dd9ad214f56e63e24bf55c00bd8c845925d848b855dfb48 -size 19619 +oid sha256:ba5fea53b349e254b4625035a308d5731cb06f6d0adc278874d14db2627962cb +size 3424 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon87x87.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon87x87.png index 78591751d7..9093e13867 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon87x87.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSettingsIcon87x87.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f405c9f3d908d038aea26049e533b0d10955adfac370c7b3b80209997ea706d0 -size 24407 +oid sha256:a32908a839a6cb0ca2a76d6aa60376ba8a14b4428f06c13149ec277514eb5676 +size 4533 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon120x120.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon120x120.png index 034dcb9fed..674c6da124 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon120x120.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon120x120.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d110f6e151799a2327bcdf5ef94d6fc82b114783a8cc973a8915896679ba4a80 -size 28559 +oid sha256:0d0044ebf7e0a5dd23ed64a1289c705d8f6c3c41a62d65e5a1371058855b8cec +size 6546 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon80x80.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon80x80.png index f0fa89149c..4b7f5d6318 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon80x80.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/AutomatedTestingAppIcon.appiconset/iPhoneSpotlightIcon80x80.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db8f00568fad4e49b05249aaa7a48c9fbf85c8b7a78489c83dc9b8161778bcef -size 22571 +oid sha256:421ad4db14c28ed18666158f9ec30747c5b8c757405c1efb32442978911b0c06 +size 4437 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/Contents.json b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/Contents.json index 5ea213954f..f836f07ee7 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/Contents.json +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -1,41 +1,5 @@ { "images" : [ - { - "extent" : "full-screen", - "filename" : "iPhoneLaunchImage1242x2688.png", - "idiom" : "iphone", - "minimum-system-version" : "12.0", - "orientation" : "portrait", - "scale" : "3x", - "subtype" : "2688h" - }, - { - "extent" : "full-screen", - "filename" : "iPhoneLaunchImage2688x1242.png", - "idiom" : "iphone", - "minimum-system-version" : "12.0", - "orientation" : "landscape", - "scale" : "3x", - "subtype" : "2688h" - }, - { - "extent" : "full-screen", - "filename" : "iPhoneLaunchImage828x1792.png", - "idiom" : "iphone", - "minimum-system-version" : "12.0", - "orientation" : "portrait", - "scale" : "2x", - "subtype" : "1792h" - }, - { - "extent" : "full-screen", - "filename" : "iPhoneLaunchImage1792x828.png", - "idiom" : "iphone", - "minimum-system-version" : "12.0", - "orientation" : "landscape", - "scale" : "2x", - "subtype" : "1792h" - }, { "extent" : "full-screen", "idiom" : "iphone", @@ -202,4 +166,4 @@ "version" : 1, "author" : "xcode" } -} +} \ No newline at end of file diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png index 1249ef3703..9f586d6af3 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31afa7ed44c5d9844c8d6ce08beccac482c3f43590869a3d190d06e2df377ccc -size 137472 +oid sha256:a4018d9df45b4a04d4cf24a40fe01aa7e30e44a9fdd8ad9a41b0d87791786c12 +size 30442 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png index cdb6d5a82a..c978631c22 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0aac8ef9899442820bec0df8bf6434a46cc787d57c5d6d38a04727b8dc310048 -size 338281 +oid sha256:2eea06cb8ad05acefe9664551af5645d52d9763b82473b1fd4a2b2b6f62e96d3 +size 53550 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png index 954d3084c8..a52e832a42 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c07495891f15b138ba09f142777b0f43217bf8be05cbb74ba938319f3425980c -size 321125 +oid sha256:90991aca91ab7222fdb85c03947cff38f549a6492551e7447e0c8f55022aae48 +size 52467 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png index 021319fbc3..3e441fab3b 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6bf6acb92421a453a36fc143ab6cefda14d631ea5e6dbf95c6e252a445fcbac -size 144797 +oid sha256:6c8439a64d18dbff17dd67f6405bf49f99695e9b22fc2cc541dc72c6e3167307 +size 30564 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1242x2688.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1242x2688.png deleted file mode 100644 index e190d2b585..0000000000 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1242x2688.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc79117e25cc7533ccf6724453e3f44a01b4eaaecded6fa826abe897456f36ee -size 405896 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1792x828.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1792x828.png deleted file mode 100644 index 5601f081de..0000000000 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage1792x828.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6c7191be3bdae09dc621012a26b0c1b9c15de1d567cf65ff1079e00f8636a32a -size 220720 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage2688x1242.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage2688x1242.png deleted file mode 100644 index 844b23fdd9..0000000000 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage2688x1242.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dfbd362f9cb5f285c23807a032af98150cf5409c514445122683736a3c65008c -size 364976 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png index a15fd777fa..e662e9675c 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9ad650fda925b1c076a67d1ef70315fe4f14db888c9fd36ee4eba1d18c1e7d1 -size 166749 +oid sha256:f752615184160d7a78f28d9eef354c86e544f11eb1dde9f651d7acd315b3f2e6 +size 35934 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png index 2855f4069d..2753529fc2 100644 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png +++ b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16f6e9d7bd15fc528d934c252213de8792812e708b1810191c5f1767f7165852 -size 142331 +oid sha256:1a43f1d893e85aa99d335a657ec0f6c13a741db976c033451ab9a2328b8a5970 +size 35559 diff --git a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage828x1792.png b/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage828x1792.png deleted file mode 100644 index 9ebb93e39c..0000000000 --- a/AutomatedTesting/Gem/Resources/IOSLauncher/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage828x1792.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0252b068b232f521ac6eca4a708fad6eaf257d0a66aa03f4f865f6a0b219cfc -size 236433 diff --git a/AutomatedTesting/Gem/Resources/LegacyLogoLauncher.bmp b/AutomatedTesting/Gem/Resources/LegacyLogoLauncher.bmp new file mode 100644 index 0000000000..7a35cddd49 --- /dev/null +++ b/AutomatedTesting/Gem/Resources/LegacyLogoLauncher.bmp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c8433178baebafe984ca23d9325d3c71b5a177fc3b3b869afbb01a583542fbe +size 462842 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/Contents.json b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/Contents.json index bfa8bcf478..2b63c0ee15 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/Contents.json @@ -33,7 +33,7 @@ { "size" : "128x128", "idiom" : "mac", - "filename" : "icon_128 _2x.png", + "filename" : "icon_128_2x.png", "scale" : "2x" }, { @@ -45,7 +45,7 @@ { "size" : "256x256", "idiom" : "mac", - "filename" : "icon_256 _2x.png", + "filename" : "icon_256_2x.png", "scale" : "2x" }, { diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128 _2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128 _2x.png deleted file mode 100644 index 5970ea34ba..0000000000 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128 _2x.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e38257b6917cdf5d73e90e6009f10c8736d62b20c4e785085305075c7e6320e2 -size 32037 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128.png index 9e30e09547..5a73a4a54d 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f41a37d2347a617e93bd97adaf6d4c161c471ca3ef7e04b98c65ddda52396dc -size 27833 +oid sha256:f3c651ca45a83d0f68bdaa466826a29b2ca6f674e225d90e68b7dbadc2ba582d +size 6620 diff --git a/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128_2x.png similarity index 100% rename from Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png rename to AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_128_2x.png diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16.png index aeb29abd0a..a7ec66841f 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b07984494059bf827bc485cbea06d12e0283811face1a18799495f9ba7ae8af1 -size 20779 +oid sha256:f7d5b15add5104d91a03df7d86898f4bc415d095d11c23555b24440497371948 +size 1061 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16_2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16_2x.png index 445a389d61..474378c926 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16_2x.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_16_2x.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e645142d284de40aafb7a4a858f3df92b6a5ba9b03fa5f1a2d3cb25211597926 -size 21857 +oid sha256:148fdae6493d7b7e1bb6cc6aae1861e0469838f54dcb3c15cc157a548c707fec +size 1910 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256 _2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256 _2x.png deleted file mode 100644 index 0904cf7ce8..0000000000 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256 _2x.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07631f41b8dea80713d2463f81a713a9a93798975b6fb50afbeeb13d26c57fa2 -size 48899 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256.png index 5970ea34ba..d30f2d3686 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e38257b6917cdf5d73e90e6009f10c8736d62b20c4e785085305075c7e6320e2 -size 32037 +oid sha256:094620c172320b062f9a1f8cc758ef4bbee11bc0a6049f46ad6b42f9bf613c92 +size 9679 diff --git a/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256_2x.png similarity index 100% rename from Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png rename to AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_256_2x.png diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32.png index 445a389d61..474378c926 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e645142d284de40aafb7a4a858f3df92b6a5ba9b03fa5f1a2d3cb25211597926 -size 21857 +oid sha256:148fdae6493d7b7e1bb6cc6aae1861e0469838f54dcb3c15cc157a548c707fec +size 1910 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32_2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32_2x.png index 1fad9bda96..3359e99cd4 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32_2x.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_32_2x.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad83faf98b49f4e37112baedeae726f4f8d71bcdd1961d9cdad31f043f8ca666 -size 24003 +oid sha256:749bcd29d73e5ef2d1ef8b2d878626d0bca09c6b0d5f1c9dc6cefe7b9082c8cc +size 3758 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512.png index e1517dddb6..f9ff1c15e3 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68529a6c11d5ffa7ecd9d5bbb11ceea28e6852bd45946b525af09602c9a1e1bf -size 48899 +oid sha256:934502e242ff7a2e34e21eed1424b5e0953e701761d158520b3297944132328e +size 18716 diff --git a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512_2x.png b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512_2x.png index b425cb685f..a736c7f6b8 100644 --- a/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512_2x.png +++ b/AutomatedTesting/Gem/Resources/MacLauncher/Images.xcassets/AppIcon.appiconset/icon_512_2x.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a70003840b418848b2ce6c18ed7cbbfcd6fcf76598a6601dca8b98d9b6c1a2f -size 114706 +oid sha256:5719043940db268dccd2e20bd9d6aa13131890d43edf002a173714ae33890422 +size 29510 diff --git a/Code/Editor/editor_lib_files.cmake b/Code/Editor/editor_lib_files.cmake index 5988d9385b..a7331edf70 100644 --- a/Code/Editor/editor_lib_files.cmake +++ b/Code/Editor/editor_lib_files.cmake @@ -21,7 +21,6 @@ set(FILES res/TreeView.bmp res/VisualLog_PlayerButtons.bmp res/ab_toolbar.bmp - res/about_dark.bmp res/anim.bmp res/animatio.bmp res/animations_tree_soundevent.bmp @@ -137,7 +136,6 @@ set(FILES res/litebulb.bmp res/lock_sel.bmp res/locksele.bmp - res/logo.bmp res/mainfram.bmp res/mann_tagdef_toolbar.bmp res/mann_tagdef_tree.bmp @@ -184,8 +182,6 @@ set(FILES res/rename.ico res/replace.ico res/ribbon_system_button.png - res/sandbox_dark.bmp - res/sb_welcome_dark.bmp res/selectobj.bmp res/seq_1_colour_keys.bmp res/seq_2_colour_keys.bmp diff --git a/Code/Editor/res/about_dark.bmp b/Code/Editor/res/about_dark.bmp deleted file mode 100644 index 2bf31764a6..0000000000 --- a/Code/Editor/res/about_dark.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:887d184cf49cf78c62a1fe53eac3cb8e7b071bb67e09b801a4893445ac4c800f -size 542456 diff --git a/Code/Editor/res/logo.bmp b/Code/Editor/res/logo.bmp deleted file mode 100644 index c67ca02a07..0000000000 --- a/Code/Editor/res/logo.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8b65af2765042354ae4110dc7bcbde905e4a55a4995f66b626d15ec6c0fa18c1 -size 96056 diff --git a/Code/Editor/res/logo.gif b/Code/Editor/res/logo.gif deleted file mode 100644 index 00534c61cc..0000000000 --- a/Code/Editor/res/logo.gif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79412e83b32bb6712d9701f78465878a2057a590698a4dc8d8c7aa11de2623ef -size 4227 diff --git a/Code/Editor/res/sandbox_dark.bmp b/Code/Editor/res/sandbox_dark.bmp deleted file mode 100644 index 2bf31764a6..0000000000 --- a/Code/Editor/res/sandbox_dark.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:887d184cf49cf78c62a1fe53eac3cb8e7b071bb67e09b801a4893445ac4c800f -size 542456 diff --git a/Code/Editor/res/sb_welcome_dark.bmp b/Code/Editor/res/sb_welcome_dark.bmp deleted file mode 100644 index 979c61e4af..0000000000 --- a/Code/Editor/res/sb_welcome_dark.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:704faeb96d930d3e6992a1449908aa6d7860b648e2feb38da8bf37cd7268a694 -size 184856 diff --git a/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json b/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json index bfa8bcf478..2b63c0ee15 100644 --- a/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json +++ b/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json @@ -33,7 +33,7 @@ { "size" : "128x128", "idiom" : "mac", - "filename" : "icon_128 _2x.png", + "filename" : "icon_128_2x.png", "scale" : "2x" }, { @@ -45,7 +45,7 @@ { "size" : "256x256", "idiom" : "mac", - "filename" : "icon_256 _2x.png", + "filename" : "icon_256_2x.png", "scale" : "2x" }, { diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png b/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png similarity index 100% rename from Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png rename to Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png b/Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png similarity index 100% rename from Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png rename to Templates/DefaultProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json index bfa8bcf478..2b63c0ee15 100644 --- a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json @@ -33,7 +33,7 @@ { "size" : "128x128", "idiom" : "mac", - "filename" : "icon_128 _2x.png", + "filename" : "icon_128_2x.png", "scale" : "2x" }, { @@ -45,7 +45,7 @@ { "size" : "256x256", "idiom" : "mac", - "filename" : "icon_256 _2x.png", + "filename" : "icon_256_2x.png", "scale" : "2x" }, { diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png new file mode 100644 index 0000000000..d30f2d3686 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:094620c172320b062f9a1f8cc758ef4bbee11bc0a6049f46ad6b42f9bf613c92 +size 9679 diff --git a/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png new file mode 100644 index 0000000000..f9ff1c15e3 --- /dev/null +++ b/Templates/MinimalProject/Template/Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:934502e242ff7a2e34e21eed1424b5e0953e701761d158520b3297944132328e +size 18716 From 91656ded9f6602a02e9e44923c009e3d47eae66c Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Wed, 7 Jul 2021 11:58:41 -0500 Subject: [PATCH 12/67] Ensured EditContext is created for the legacy tools framework application (Lua) so that settings are able to be displayed Signed-off-by: Chris Galvan --- .../UI/LegacyFramework/Core/EditorFrameworkApplication.cpp | 6 ++++++ .../UI/LegacyFramework/Core/EditorFrameworkApplication.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp index ccc7ef1fd7..f342b1afab 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp @@ -151,6 +151,12 @@ namespace LegacyFramework specializations.Append("tools"); } + void Application::CreateReflectionManager() + { + AZ::ComponentApplication::CreateReflectionManager(); + GetSerializeContext()->CreateEditContext(); + } + int Application::Run(const ApplicationDesc& desc) { if (!AZ::AllocatorInstance::IsReady()) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h index 42aacf3dbd..5cde088c2d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.h @@ -56,6 +56,8 @@ namespace LegacyFramework virtual int Run(const ApplicationDesc& desc); Application(); + void CreateReflectionManager() override; + protected: // ------------------------------------------------------------------ From 29652994d88d2c34431a55bc43a2f089eeef1ac4 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Wed, 7 Jul 2021 10:45:16 -0700 Subject: [PATCH 13/67] The Great ScriptCanvas Purge, Part VIII Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Builder/ScriptCanvasBuilderComponent.cpp | 5 ++-- .../Code/Include/ScriptCanvas/Core/Graph.cpp | 26 +++++-------------- .../Code/Include/ScriptCanvas/Core/Graph.h | 4 --- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp index a953edeae8..2f30106707 100644 --- a/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp +++ b/Gems/ScriptCanvas/Code/Builder/ScriptCanvasBuilderComponent.cpp @@ -5,17 +5,16 @@ * */ -#include - #include #include #include #include #include #include -#include #include +#include #include +#include #include namespace ScriptCanvasBuilder diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp index 48e8adb9a7..d4eb1cd515 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.cpp @@ -50,6 +50,7 @@ namespace GraphCpp MergeScriptAssetDescriptions, VariablePanelSymantics, AddVersionData, + RemoveFunctionGraphMarker, // label your version above Current }; @@ -69,6 +70,11 @@ namespace ScriptCanvas componentElementNode.AddElementWithData(context, "m_assetType", azrtti_typeid()); } + if (componentElementNode.GetVersion() < GraphCpp::GraphVersion::RemoveFunctionGraphMarker) + { + componentElementNode.RemoveElementByName(AZ_CRC_CE("isFunctionGraph")); + } + return true; } @@ -99,18 +105,15 @@ namespace ScriptCanvas Nodes::ComparisonExpression::Reflect(context); Datum::Reflect(context); BehaviorContextObjectPtrReflect(context); - GraphData::Reflect(context); - AZ::SerializeContext* serializeContext = azrtti_cast(context); - if (serializeContext) + if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) { serializeContext->Class() ->Version(GraphCpp::GraphVersion::Current, &GraphComponentVersionConverter) ->Field("m_graphData", &Graph::m_graphData) ->Field("executionMode", &Graph::m_executionMode) ->Field("m_assetType", &Graph::m_assetType) - ->Field("isFunctionGraph", &Graph::m_isFunctionGraph) ->Field("versionData", &Graph::m_versionData) ; } @@ -150,21 +153,6 @@ namespace ScriptCanvas StatusRequestBus::Handler::BusConnect(scriptCanvasId); } - bool Graph::IsFunctionGraph() const - { - if (m_isFunctionGraph) - { - return true; - } - - return false; - } - - void Graph::MarkFunctionGraph() - { - m_isFunctionGraph = true; - } - void Graph::MarkVersion() { m_versionData.MarkLatest(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h index 92de8f3c3e..bdd71a73f8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Graph.h @@ -110,9 +110,6 @@ namespace ScriptCanvas Graph* GetGraph() { return this; } - bool IsFunctionGraph() const; - void MarkFunctionGraph(); - GraphData* GetGraphData() override { return &m_graphData; } const GraphData* GetGraphDataConst() const override { return &m_graphData; } const VariableData* GetVariableDataConst() const { return const_cast(this)->GetVariableData(); } @@ -204,7 +201,6 @@ namespace ScriptCanvas AZ::Data::AssetType m_assetType; private: - bool m_isFunctionGraph = false; ScriptCanvasId m_scriptCanvasId; ExecutionMode m_executionMode = ExecutionMode::Interpreted; VersionData m_versionData; From b9f70412c4a73b780b31f7a142f7c1f05b063ef5 Mon Sep 17 00:00:00 2001 From: sharmajs-amzn <82233357+sharmajs-amzn@users.noreply.github.com> Date: Wed, 7 Jul 2021 11:16:14 -0700 Subject: [PATCH 14/67] Moving flaky test test_WindowsAndMac_ComparisonOperations_Success to sandbox test suite (#1750) Signed-off-by: sharmajs --- .../asset_processor_tests/CMakeLists.txt | 13 +++++++++++++ .../asset_bundler_batch_tests.py | 1 + 2 files changed, 14 insertions(+) diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt index f05aff6db3..baf8e9733e 100644 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt @@ -103,6 +103,19 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS) AZ::AssetBundlerBatch ) + ly_add_pytest( + NAME AssetPipelineTests.AssetBundler_SandBox + TEST_SUITE sandbox + PATH ${CMAKE_CURRENT_LIST_DIR}/asset_bundler_batch_tests.py + PYTEST_MARKS "SUITE_sandbox" # run only sandbox tests in this file + EXCLUDE_TEST_RUN_TARGET_FROM_IDE + TEST_SERIAL + TIMEOUT 1500 + RUNTIME_DEPENDENCIES + AZ::AssetProcessor + AZ::AssetBundlerBatch + ) + ly_add_pytest( NAME AssetPipelineTests.AssetBuilder PATH ${CMAKE_CURRENT_LIST_DIR}/asset_builder_tests.py diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py index 926f1cc602..1a5ece92e1 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py @@ -730,6 +730,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): @pytest.mark.BAT @pytest.mark.assetpipeline + @pytest.mark.SUITE_sandbox @pytest.mark.test_case_id("C16877174") @pytest.mark.test_case_id("C16877175") @pytest.mark.test_case_id("C16877178") From 02922806a5ba3d284cb3d740f9f65fe17161f081 Mon Sep 17 00:00:00 2001 From: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Date: Wed, 7 Jul 2021 13:29:33 -0500 Subject: [PATCH 15/67] Updated gem.json for all top-level Gems. (#1715) (#1917) * Updated gem.json for all top-level Gems. All the top level gems now have identical gem.json formats based on the DefautlGem template gem.json. Two additional fields have been added, a type: field and a requirements: field. These fields are for display in Project Mananger. All gem.json files have a default requirements: value of None. Devs are responsible for providing requirements. Gem descriptions and tags have been signed off by developers. Signed-off-by: Cronin * Fixed minor formatting issues with RADTelemetry gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to QtForPython gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to the Twitch gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to AWSCore gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to the AtomTressFX gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to the end of the AudioEngineWwise gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to the end of the CertificateManager gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Removing extra whitespace in summary of CrashReporting gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to the end of the CustomAssetExample gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Removing extra whitespace in editorPythonBindings gem summary Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to the end of the ScriptedEntityTweener gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to the end of the Gestures gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Removing extra whitetspace in the summary of the GameStateSamples gem Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Adding newline to the end of the ExpressionEvaluation gem.json Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Updated the ProjectManager PythonBindings.cpp code to reference the newer fields in the gem.json files Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Updating the Gem and Project templates gem.json files to include the "type" and the "requirements" field. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Updated the default "requirments" field value to be empty string instead of "None" This works better with the ProjectManager GemInfoFromPath function. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Correcting "summary" field name Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Added the requirements text to the AudioEngineWwise Gem This gem requires downloading the Wwise 3rdParty library from AudioKinetic's website Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Co-authored-by: Mike Cronin <58789750+micronAMZN@users.noreply.github.com> --- AutomatedTesting/Gem/gem.json | 24 +++---- .../ProjectManager/Source/PythonBindings.cpp | 26 +++++-- Gems/AWSClientAuth/gem.json | 18 ++--- Gems/AWSCore/gem.json | 24 +++---- Gems/AWSMetrics/gem.json | 22 +++--- Gems/Achievements/gem.json | 22 +++--- Gems/AssetMemoryAnalyzer/gem.json | 31 +++------ Gems/AssetValidation/gem.json | 22 +++--- Gems/Atom/Asset/ImageProcessingAtom/gem.json | 6 +- Gems/Atom/Asset/Shader/gem.json | 6 +- Gems/Atom/Bootstrap/gem.json | 6 +- Gems/Atom/Component/DebugCamera/gem.json | 6 +- Gems/Atom/Feature/Common/gem.json | 6 +- Gems/Atom/RHI/DX12/gem.json | 6 +- Gems/Atom/RHI/Metal/gem.json | 6 +- Gems/Atom/RHI/Null/gem.json | 6 +- Gems/Atom/RHI/Vulkan/gem.json | 6 +- Gems/Atom/RHI/gem.json | 6 +- Gems/Atom/RPI/gem.json | 6 +- Gems/Atom/Tools/AtomToolsFramework/gem.json | 6 +- Gems/Atom/Tools/MaterialEditor/gem.json | 6 +- Gems/Atom/gem.json | 11 ++- Gems/AtomContent/ReferenceMaterials/gem.json | 18 ++--- Gems/AtomContent/Sponza/gem.json | 18 ++--- Gems/AtomContent/gem.json | 18 +++-- Gems/AtomLyIntegration/AtomBridge/gem.json | 6 +- Gems/AtomLyIntegration/AtomFont/gem.json | 6 +- .../AtomLyIntegration/AtomImGuiTools/gem.json | 8 ++- .../AtomViewportDisplayIcons/gem.json | 6 +- .../AtomViewportDisplayInfo/gem.json | 6 +- .../AtomLyIntegration/CommonFeatures/gem.json | 6 +- Gems/AtomLyIntegration/EMotionFXAtom/gem.json | 6 +- Gems/AtomLyIntegration/ImguiAtom/gem.json | 6 +- .../DccScriptingInterface/gem.json | 6 +- Gems/AtomLyIntegration/gem.json | 9 ++- Gems/AtomTressFX/gem.json | 19 +++--- Gems/AudioEngineWwise/gem.json | 34 +++------- Gems/AudioSystem/gem.json | 27 +++----- Gems/AutomatedLauncherTesting/gem.json | 22 +++--- Gems/Blast/gem.json | 43 +++--------- Gems/Camera/gem.json | 27 +++----- Gems/CameraFramework/gem.json | 27 +++----- Gems/CertificateManager/gem.json | 18 ++--- Gems/CrashReporting/gem.json | 27 +++----- Gems/CustomAssetExample/gem.json | 25 +++---- Gems/DebugDraw/gem.json | 19 +++--- Gems/DevTextures/gem.json | 18 ++--- Gems/EMotionFX/gem.json | 29 +++----- Gems/EditorPythonBindings/gem.json | 25 +++---- Gems/ExpressionEvaluation/gem.json | 22 +++--- Gems/FastNoise/gem.json | 43 +++--------- Gems/GameState/gem.json | 22 +++--- Gems/GameStateSamples/gem.json | 55 +++------------ Gems/Gestures/gem.json | 17 ++--- Gems/GradientSignal/gem.json | 43 +++--------- Gems/GraphCanvas/gem.json | 19 +++--- Gems/GraphModel/gem.json | 32 +++------ Gems/HttpRequestor/gem.json | 18 ++--- Gems/ImGui/gem.json | 36 +++------- Gems/InAppPurchases/gem.json | 18 ++--- Gems/LandscapeCanvas/gem.json | 67 +++---------------- Gems/LmbrCentral/gem.json | 21 +++--- Gems/LocalUser/gem.json | 22 +++--- Gems/LyShine/gem.json | 45 +++---------- Gems/LyShineExamples/gem.json | 32 +++------ Gems/Maestro/gem.json | 21 +++--- Gems/MessagePopup/gem.json | 31 +++------ Gems/Metastream/gem.json | 18 ++--- Gems/Microphone/gem.json | 25 +++---- Gems/Multiplayer/gem.json | 17 ++--- Gems/MultiplayerCompression/gem.json | 12 ++-- Gems/NvCloth/gem.json | 12 ++-- Gems/PBSreferenceMaterials/gem.json | 18 ++--- Gems/PhysX/gem.json | 28 +++----- Gems/PhysXDebug/gem.json | 35 +++------- Gems/PhysXSamples/gem.json | 48 +++---------- Gems/Prefab/PrefabBuilder/gem.json | 23 +++---- Gems/Presence/gem.json | 22 +++--- Gems/PrimitiveAssets/gem.json | 18 ++--- Gems/PythonAssetBuilder/gem.json | 25 +++---- Gems/QtForPython/gem.json | 34 +++------- Gems/RADTelemetry/gem.json | 18 ++--- Gems/SaveData/gem.json | 24 +++---- Gems/SceneLoggingExample/gem.json | 20 +++--- Gems/SceneProcessing/gem.json | 28 +++----- Gems/ScriptCanvas/gem.json | 38 +++-------- Gems/ScriptCanvasDeveloper/gem.json | 38 +++-------- Gems/ScriptCanvasPhysics/gem.json | 40 +++-------- Gems/ScriptCanvasTesting/gem.json | 37 +++------- Gems/ScriptEvents/gem.json | 27 +++----- Gems/ScriptedEntityTweener/gem.json | 20 +++--- Gems/SliceFavorites/gem.json | 22 +++--- Gems/StartingPointCamera/gem.json | 41 +++--------- Gems/StartingPointInput/gem.json | 27 +++----- Gems/StartingPointMovement/gem.json | 27 +++----- Gems/SurfaceData/gem.json | 36 +++------- Gems/TestAssetBuilder/gem.json | 23 +++---- Gems/TextureAtlas/gem.json | 23 +++---- Gems/TickBusOrderViewer/gem.json | 22 +++--- Gems/Twitch/gem.json | 25 +++---- Gems/UiBasics/gem.json | 18 ++--- Gems/Vegetation/gem.json | 50 +++----------- Gems/VideoPlaybackFramework/gem.json | 22 +++--- Gems/VirtualGamepad/gem.json | 24 +++---- Gems/WhiteBox/gem.json | 27 +++----- Templates/AssetGem/Template/gem.json | 9 ++- Templates/DefaultGem/Template/gem.json | 8 ++- .../DefaultProject/Template/Code/gem.json | 8 ++- .../MinimalProject/Template/Code/gem.json | 8 ++- 109 files changed, 900 insertions(+), 1466 deletions(-) diff --git a/AutomatedTesting/Gem/gem.json b/AutomatedTesting/Gem/gem.json index b1638002af..6c8c7829ce 100644 --- a/AutomatedTesting/Gem/gem.json +++ b/AutomatedTesting/Gem/gem.json @@ -1,16 +1,12 @@ { - "GemFormatVersion": 4, - "Uuid": "afc25e1593194d6283d9ff744ab6d5a1", - "Name": "AutomatedTesting", - "DisplayName": "AutomatedTesting", - "Version": "0.1.0", - "Summary": "A short description of my Gem.", - "Tags": ["Game"], - "IconPath": "preview.png", - "IsGameGem": true, - "Modules": [ - { - "Type": "GameModule" - } - ] + "gem_name": "AutomatedTesting", + "display_name": "AutomatedTesting", + "license": "Apache-2.0 Or MIT", + "origin": "Amazon Web Services, Inc.", + "type": "Code", + "summary": "Project Gem for customizing the AutomatedTesting project functionality.", + "canonical_tags": ["Gem"], + "user_tags": [], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index ca49542ccf..167cf6d10e 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -648,10 +648,10 @@ namespace O3DE::ProjectManager gemInfo.m_name = Py_To_String(data["gem_name"]); // optional - gemInfo.m_displayName = Py_To_String_Optional(data, "DisplayName", gemInfo.m_name); - gemInfo.m_summary = Py_To_String_Optional(data, "Summary", ""); - gemInfo.m_version = Py_To_String_Optional(data, "Version", ""); - gemInfo.m_requirement = Py_To_String_Optional(data, "Requirements", ""); + gemInfo.m_displayName = Py_To_String_Optional(data, "display_name", gemInfo.m_name); + gemInfo.m_summary = Py_To_String_Optional(data, "summary", ""); + gemInfo.m_version = ""; + gemInfo.m_requirement = Py_To_String_Optional(data, "requirements", ""); gemInfo.m_creator = Py_To_String_Optional(data, "origin", ""); if (gemInfo.m_creator.contains("Open 3D Engine")) @@ -659,13 +659,27 @@ namespace O3DE::ProjectManager gemInfo.m_gemOrigin = GemInfo::GemOrigin::Open3DEEngine; } - if (data.contains("Tags")) + if (data.contains("user_tags")) { - for (auto tag : data["Tags"]) + for (auto tag : data["user_tags"]) { gemInfo.m_features.push_back(Py_To_String(tag)); } } + + QString gemType = Py_To_String_Optional(data, "type", ""); + if (gemType == "Asset") + { + gemInfo.m_types |= GemInfo::Type::Asset; + } + if (gemType == "Code") + { + gemInfo.m_types |= GemInfo::Type::Code; + } + if (gemType == "Tool") + { + gemInfo.m_types |= GemInfo::Type::Tool; + } } catch ([[maybe_unused]] const std::exception& e) { diff --git a/Gems/AWSClientAuth/gem.json b/Gems/AWSClientAuth/gem.json index 89beb4a382..76183cd785 100644 --- a/Gems/AWSClientAuth/gem.json +++ b/Gems/AWSClientAuth/gem.json @@ -1,12 +1,12 @@ { "gem_name": "AWSClientAuth", - "GemFormatVersion": 3, - "Uuid": "c74f2756f5874c0d8d29646dfc9cb0ad", - "Name": "AWSClientAuth", - "DisplayName": "AWS Client Auth", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "AWS Client Auth provides client authentication and AWS authorization solution", - "Tags": ["AWS", "Amazon Cognito", "Authentication", "Authorization"], - "IconPath": "preview.png" + "display_name": "AWS Client Authorization", + "license": "Apache-2.0 Or MIT", + "origin": "Amazon Web Services, Inc.", + "type": "Code", + "summary": "AWS Client Auth provides client authentication and AWS authorization solution.", + "canonical_tags": ["Gem"], + "user_tags": ["AWS", "Network", "SDK"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AWSCore/gem.json b/Gems/AWSCore/gem.json index af52acf746..bbaa4eb155 100644 --- a/Gems/AWSCore/gem.json +++ b/Gems/AWSCore/gem.json @@ -1,18 +1,12 @@ { "gem_name": "AWSCore", - "GemFormatVersion": 4, - "Uuid": "c3710872891c4401b0cbdabfca066cb5", - "Name": "AWSCore", - "DisplayName": "AWS Core", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "This Gem is automatically enabled when selecting any of the AWS Feature Gems. It provides basic shared functionalities such as AWS SDK initialization and client configuration.", - "Tags": [ - "AWS", - "API", - "AWSCore", - "Cloud", - "Connected" - ], - "IconPath": "preview.png" + "display_name": "AWS Core", + "license": "Apache-2.0 Or MIT", + "origin": "Amazon Web Services, Inc.", + "type": "Code", + "summary": "The AWS Core Gem provides basic shared AWS functionality such as AWS SDK initialization and client configuration, and is automatically added when selecting any AWS feature Gem.", + "canonical_tags": ["Gem"], + "user_tags": ["AWS", "Network", "SDK"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AWSMetrics/gem.json b/Gems/AWSMetrics/gem.json index 014434d408..480200c565 100644 --- a/Gems/AWSMetrics/gem.json +++ b/Gems/AWSMetrics/gem.json @@ -1,16 +1,12 @@ { "gem_name": "AWSMetrics", - "GemFormatVersion": 4, - "Uuid": "cc6fc7a18fc047039a369a26100fcbbe", - "Name": "AWSMetrics", - "DisplayName": "AWS Metrics", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "AWS Metrics provides metrics submission and analytics solution.", - "Tags": [ - "AWS", - "AWSMetrics", - "Cloud" - ], - "IconPath": "preview.png" + "display_name": "AWS Metrics", + "license": "Apache-2.0 Or MIT", + "origin": "Amazon Web Services, Inc.", + "type": "Code", + "summary": "The AWS Metrics Gem provides a solution for AWS metrics submission and analytics.", + "canonical_tags": ["Gem"], + "user_tags": ["AWS", "Network", "SDK"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Achievements/gem.json b/Gems/Achievements/gem.json index 746e2a1e50..8a30390295 100644 --- a/Gems/Achievements/gem.json +++ b/Gems/Achievements/gem.json @@ -1,16 +1,12 @@ { "gem_name": "Achievements", - "GemFormatVersion": 4, - "Uuid": "6f8d953dd4fc4bb6ad34c9118a7b789f", - "Name": "Achievements", - "DisplayName": "Achievements", - "Version": "0.1.0", - "Summary": "Platform agnostic interface for retrieving achievement details and unlocking achievements.", - "Tags": ["Achievement", "Achievements", "Trophy", "Trophies"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Achievements", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Achievements Gem provides a target platform agnostic interface for retrieving achievement details and unlocking achievements.", + "canonical_tags": ["Gem"], + "user_tags": ["Gameplay", "Achievements"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AssetMemoryAnalyzer/gem.json b/Gems/AssetMemoryAnalyzer/gem.json index 62b4387508..8c63d51e1a 100644 --- a/Gems/AssetMemoryAnalyzer/gem.json +++ b/Gems/AssetMemoryAnalyzer/gem.json @@ -1,25 +1,12 @@ { "gem_name": "AssetMemoryAnalyzer", - "GemFormatVersion": 4, - "Uuid": "35414634480a4d4c8412c60fe62f4c81", - "Name": "AssetMemoryAnalyzer", - "DisplayName": "AssetMemoryAnalyzer", - "Version": "0.1.0", - "Summary": "Provides debug visualization of the AssetMemoryDriller to show how individual assets are consuming memory.", - "Tags": ["debug"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ], - "Dependencies": [ - { - "Uuid": "bab8807a1bc646b3909f3cc200ffeedf", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "ImGui GEM" - } - ] + "display_name": "Asset Memory Analyzer", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Asset Memory Analyzer Gem provides tools to profile asset memory usage in Open 3D Engine through ImGUI (Immediate Mode Graphical User Interface).", + "canonical_tags": ["Gem"], + "user_tags": ["Debug", "Utillity", "Tools"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AssetValidation/gem.json b/Gems/AssetValidation/gem.json index 1f27fcb20f..8a00dc27ca 100644 --- a/Gems/AssetValidation/gem.json +++ b/Gems/AssetValidation/gem.json @@ -1,16 +1,12 @@ { "gem_name": "AssetValidation", - "GemFormatVersion": 4, - "Uuid": "5a5c3c10b91d4b4ea8baef474c5b5d49", - "Name": "AssetValidation", - "DisplayName": "AssetValidation", - "Version": "0.1.0", - "Summary": "Tools for managing your assets and their dependencies during development", - "Tags": ["Untagged"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Asset Validation", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Asset Validation Gem provides seed-related commands to ensure assets have valid seeds for asset bundling.", + "canonical_tags": ["Gem"], + "user_tags": ["Assets", "Utility", "Scripting"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/gem.json b/Gems/Atom/Asset/ImageProcessingAtom/gem.json index 86256bff9d..45d96f7168 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/gem.json +++ b/Gems/Atom/Asset/ImageProcessingAtom/gem.json @@ -1,10 +1,14 @@ { "gem_name": "ImageProcessingAtom", "display_name": "Atom Image Processing", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/Asset/Shader/gem.json b/Gems/Atom/Asset/Shader/gem.json index 71c741f436..eadf34acff 100644 --- a/Gems/Atom/Asset/Shader/gem.json +++ b/Gems/Atom/Asset/Shader/gem.json @@ -1,10 +1,14 @@ { "gem_name": "AtomShader", "display_name": "Atom Shader Builder", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/Bootstrap/gem.json b/Gems/Atom/Bootstrap/gem.json index 8aa5cade6e..d5f287eb7f 100644 --- a/Gems/Atom/Bootstrap/gem.json +++ b/Gems/Atom/Bootstrap/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_Bootstrap", "display_name": "Atom Bootstrap", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/Component/DebugCamera/gem.json b/Gems/Atom/Component/DebugCamera/gem.json index 06d39d1fc0..cb2c597b07 100644 --- a/Gems/Atom/Component/DebugCamera/gem.json +++ b/Gems/Atom/Component/DebugCamera/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_Component_DebugCamera", "display_name": "Atom Debug Camera Component", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/Feature/Common/gem.json b/Gems/Atom/Feature/Common/gem.json index 6980863b4c..cbaa56e0d7 100644 --- a/Gems/Atom/Feature/Common/gem.json +++ b/Gems/Atom/Feature/Common/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_Feature_Common", "display_name": "Atom Feature Common", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/RHI/DX12/gem.json b/Gems/Atom/RHI/DX12/gem.json index 683ccfb43a..df0ae12cc4 100644 --- a/Gems/Atom/RHI/DX12/gem.json +++ b/Gems/Atom/RHI/DX12/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_RHI_DX12", "display_name": "Atom RHI DX12", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/RHI/Metal/gem.json b/Gems/Atom/RHI/Metal/gem.json index 3e1726e8fa..497e0149b6 100644 --- a/Gems/Atom/RHI/Metal/gem.json +++ b/Gems/Atom/RHI/Metal/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_RHI_Metal", "display_name": "Atom RHI Metal", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/RHI/Null/gem.json b/Gems/Atom/RHI/Null/gem.json index 4fa5f1e480..aa2e08501a 100644 --- a/Gems/Atom/RHI/Null/gem.json +++ b/Gems/Atom/RHI/Null/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_RHI_Null", "display_name": "Atom RHI Null", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/RHI/Vulkan/gem.json b/Gems/Atom/RHI/Vulkan/gem.json index 1f2fcd7f30..2b43de4ab1 100644 --- a/Gems/Atom/RHI/Vulkan/gem.json +++ b/Gems/Atom/RHI/Vulkan/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_RHI_Vulkan", "display_name": "Atom RHI Vulkan", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/RHI/gem.json b/Gems/Atom/RHI/gem.json index eb67e40a4a..015ee64994 100644 --- a/Gems/Atom/RHI/gem.json +++ b/Gems/Atom/RHI/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_RHI", "display_name": "Atom RHI", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/RPI/gem.json b/Gems/Atom/RPI/gem.json index 7e822611a9..f30a1c3201 100644 --- a/Gems/Atom/RPI/gem.json +++ b/Gems/Atom/RPI/gem.json @@ -2,9 +2,13 @@ "gem_name": "Atom_RPI", "display_name": "Atom API", "summary": "", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/Tools/AtomToolsFramework/gem.json b/Gems/Atom/Tools/AtomToolsFramework/gem.json index 3060d3f51a..5cea71c5cc 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/gem.json +++ b/Gems/Atom/Tools/AtomToolsFramework/gem.json @@ -1,10 +1,14 @@ { "gem_name": "AtomToolsFramework", "display_name": "Atom Tools Framework", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/Tools/MaterialEditor/gem.json b/Gems/Atom/Tools/MaterialEditor/gem.json index 5113effc0a..83d9909a84 100644 --- a/Gems/Atom/Tools/MaterialEditor/gem.json +++ b/Gems/Atom/Tools/MaterialEditor/gem.json @@ -1,10 +1,14 @@ { "gem_name": "MaterialEditor", "display_name": "Atom Material Editor", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", "summary": "Editor for creating, modifying, and previewing materials", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/Atom/gem.json b/Gems/Atom/gem.json index 91bc9bcf53..c2aa033bf7 100644 --- a/Gems/Atom/gem.json +++ b/Gems/Atom/gem.json @@ -1,5 +1,12 @@ { "gem_name": "Atom", - "display_name": "Atom", - "summary": "Next-Gen Rendering Package for the O3DE engine" + "display_name": "Atom Renderer", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Atom Renderer Gem provides Atom Renderer and its associated tools (such as Material Editor), utilites, libraries, and interfaces.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Core"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AtomContent/ReferenceMaterials/gem.json b/Gems/AtomContent/ReferenceMaterials/gem.json index baa89f2a4a..cb1d6f7a2e 100644 --- a/Gems/AtomContent/ReferenceMaterials/gem.json +++ b/Gems/AtomContent/ReferenceMaterials/gem.json @@ -1,12 +1,12 @@ { "gem_name": "ReferenceMaterials", - "GemFormatVersion": 3, - "Uuid": "99eac95298d847a6914d7b9e69db6f84", - "Name": "ReferenceMaterials", - "DisplayName": "ReferenceMaterials", - "Version": "0.1.0", - "LinkType": "NoCode", - "Summary": "Atom Asset Gem with a library of reference materials for StandardPBR (and others in the future)", - "Tags": ["Asset"], - "IconPath": "preview.png" + "display_name": "ReferenceMaterials", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "Atom Asset Gem with a library of reference materials for StandardPBR (and others in the future)", + "canonical_tags": ["Gem"], + "user_tags": ["Assets"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AtomContent/Sponza/gem.json b/Gems/AtomContent/Sponza/gem.json index 0bf54d8e36..ef054ce55a 100644 --- a/Gems/AtomContent/Sponza/gem.json +++ b/Gems/AtomContent/Sponza/gem.json @@ -1,12 +1,12 @@ { "gem_name": "Sponza", - "GemFormatVersion": 3, - "Uuid": "860d8ef2aec5425ab197adc4484c09f1", - "Name": "Sponza", - "DisplayName": "Sponza", - "Version": "0.1.0", - "LinkType": "NoCode", - "Summary": "A standard test scene for Global Illumination (forked from crytek sponza scene)", - "Tags": ["Asset"], - "IconPath": "preview.png" + "display_name": "Sponza", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "A standard test scene for Global Illumination (forked from crytek sponza scene)", + "canonical_tags": ["Gem"], + "user_tags": ["Assets"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AtomContent/gem.json b/Gems/AtomContent/gem.json index b043cbbaca..b1bc35b77b 100644 --- a/Gems/AtomContent/gem.json +++ b/Gems/AtomContent/gem.json @@ -1,14 +1,12 @@ { "gem_name": "AtomContent", - "origin": "The primary repo for Atom goes here: i.e. http://www.mydomain.com", - "license": "What license Atom uses goes here: i.e. https://opensource.org/licenses/MIT", "display_name": "Atom Content", - "summary": "ontains multiple packages containing source Assets that can be used with Atom", - "canonical_tags": [ - "Gem" - ], - "user_tags": [ - "AtomContent" - ], - "icon_path": "preview.png" + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "The Atom Content Gem provides assets for Atom Renderer and a modified version of the Pixar Look Development Studio (https://renderman.pixar.com/look-development-studio).", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Assets", "Tools"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AtomLyIntegration/AtomBridge/gem.json b/Gems/AtomLyIntegration/AtomBridge/gem.json index 329741bb8e..49a56d2201 100644 --- a/Gems/AtomLyIntegration/AtomBridge/gem.json +++ b/Gems/AtomLyIntegration/AtomBridge/gem.json @@ -1,10 +1,14 @@ { "gem_name": "Atom_AtomBridge", "display_name": "Atom Bridge", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/AtomFont/gem.json b/Gems/AtomLyIntegration/AtomFont/gem.json index a609061ea3..7e1a71db86 100644 --- a/Gems/AtomLyIntegration/AtomFont/gem.json +++ b/Gems/AtomLyIntegration/AtomFont/gem.json @@ -1,10 +1,14 @@ { "gem_name": "AtomFont", "display_name": "Atom Font", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/AtomImGuiTools/gem.json b/Gems/AtomLyIntegration/AtomImGuiTools/gem.json index 5cee62f7bb..ff20d5a19f 100644 --- a/Gems/AtomLyIntegration/AtomImGuiTools/gem.json +++ b/Gems/AtomLyIntegration/AtomImGuiTools/gem.json @@ -1,10 +1,16 @@ { "gem_name": "AtomImGuiTools", "display_name": "Atom ImGui", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + "Debug", + "Rendering" + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json index 41f69e33a0..52dbb219d3 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json @@ -1,10 +1,14 @@ { "gem_name": "AtomViewportDisplayIcons", "display_name": "Atom Viewport Display Icons", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json index 04e2464a26..f277d6cf82 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json @@ -1,10 +1,14 @@ { "gem_name": "AtomViewportDisplayInfo", "display_name": "Atom Viewport Display Info", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/CommonFeatures/gem.json b/Gems/AtomLyIntegration/CommonFeatures/gem.json index 306c61e6d7..8eceb50932 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/gem.json +++ b/Gems/AtomLyIntegration/CommonFeatures/gem.json @@ -1,10 +1,14 @@ { "gem_name": "CommonFeaturesAtom", "display_name": "Common Features Atom", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/gem.json b/Gems/AtomLyIntegration/EMotionFXAtom/gem.json index e2a81d0a5e..a7c3e96d2b 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/gem.json +++ b/Gems/AtomLyIntegration/EMotionFXAtom/gem.json @@ -1,10 +1,14 @@ { "gem_name": "EMotionFX_Atom", "display_name": "EMotionFX Atom", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/ImguiAtom/gem.json b/Gems/AtomLyIntegration/ImguiAtom/gem.json index 6d6551b5fa..918414f053 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/gem.json +++ b/Gems/AtomLyIntegration/ImguiAtom/gem.json @@ -1,10 +1,14 @@ { "gem_name": "ImguiAtom", "display_name": "Imgui Atom", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [ - ] + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json index a867fe0f0f..f978d777cf 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json @@ -2,6 +2,9 @@ "gem_name": "DccScriptingInterface", "display_name": "Atom DccScriptingInterface (DCCsi)", "summary": "A python framework for working with various DCC tools and workflows.", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", "canonical_tags": [ "Gem" ], @@ -10,5 +13,6 @@ "Digital", "Content", "Creation" - ] + ], + "requirements": "" } diff --git a/Gems/AtomLyIntegration/gem.json b/Gems/AtomLyIntegration/gem.json index 4f587a8806..72be2f9151 100644 --- a/Gems/AtomLyIntegration/gem.json +++ b/Gems/AtomLyIntegration/gem.json @@ -1,5 +1,12 @@ { "gem_name": "AtomLyIntegration", "display_name": "Atom O3DE Integration", - "summary": "Collection of module targets for integrating Atom with the O3DE engine" + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Atom O3DE Integration Gem provides components, libraries, and functionality to support and integrate Atom Renderer in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Core", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AtomTressFX/gem.json b/Gems/AtomTressFX/gem.json index 056ead5ec1..0099906dd1 100644 --- a/Gems/AtomTressFX/gem.json +++ b/Gems/AtomTressFX/gem.json @@ -1,13 +1,12 @@ { "gem_name": "AtomTressFX", - "GemFormatVersion": 3, - "Uuid": "d4a3e3d6b9b14e12982c774f35f48a7c", - "Name": "AtomTressFX", - "DisplayName": "AtomTressFX [PREVIEW]", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "The AtomTressFX is a cutting edge hair technology based on TressFX 4.1 SDK from AMD. It was altered to integrate into Atom harnessing Atom's design and pipeline.", - "Tags": ["Hair", "TressFX"], - "IconPath": "preview.png", - "EditorModule": true + "display_name": "Atom TressFX", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Atom TressFX Gem provides realistic hair and fur simulation and rendering in Atom and Open 3D Engine with AMD TressFX.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Physics", "Animation"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AudioEngineWwise/gem.json b/Gems/AudioEngineWwise/gem.json index 5608641434..8c6b5767b0 100644 --- a/Gems/AudioEngineWwise/gem.json +++ b/Gems/AudioEngineWwise/gem.json @@ -1,28 +1,12 @@ { "gem_name": "AudioEngineWwise", - "GemFormatVersion": 4, - "Uuid": "67a80e2ac865406c990f2715feb55f7f", - "Name": "AudioEngineWwise", - "DisplayName": "Wwise Audio Integration", - "Version": "0.1.0", - "Summary": "Wwise engine integration and plugin to Audio Controls Editor.", - "Tags": ["Audio", "Sound", "Wwise"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ], - "Dependencies": [ - { - "Uuid": "6f63f2b6d07f4b89b4b7c86ebee7feb8", - "VersionConstraints": [">=0.1.0"], - "_comment": "AudioSystem" - } - ] + "display_name": "Wwise Audio Engine", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Wwise Audio Engine Gem provides support for Audiokinetic Wave Works Interactive Sound Engine (Wwise).", + "canonical_tags": ["Gem"], + "user_tags": ["Audio", "Utiltity", "Tools"], + "icon_path": "preview.png", + "requirements": "Users will need to download WWise from the AudioKinetic web site: https://www.audiokinetic.com/download/" } diff --git a/Gems/AudioSystem/gem.json b/Gems/AudioSystem/gem.json index fc43c37419..a1dbe9406f 100644 --- a/Gems/AudioSystem/gem.json +++ b/Gems/AudioSystem/gem.json @@ -1,21 +1,12 @@ { "gem_name": "AudioSystem", - "GemFormatVersion": 4, - "Uuid": "6f63f2b6d07f4b89b4b7c86ebee7feb8", - "Name": "AudioSystem", - "DisplayName": "Audio System", - "Version": "0.1.0", - "Summary": "Contains CrySoundSystem, the Audio Translation Layer (ATL), and the Audio Controls Editor", - "Tags": ["Audio", "Sound"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ] + "display_name": "Audio System", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Audio System Gem provides the Audio Translation Layer (ATL) and Audio Controls Editor, which add support for audio in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Audio", "Utiltity", "Tools"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/AutomatedLauncherTesting/gem.json b/Gems/AutomatedLauncherTesting/gem.json index 80abdc1cf0..c7ecd02739 100644 --- a/Gems/AutomatedLauncherTesting/gem.json +++ b/Gems/AutomatedLauncherTesting/gem.json @@ -1,16 +1,12 @@ { "gem_name": "AutomatedLauncherTesting", - "GemFormatVersion": 4, - "Uuid": "69504dac61f84a11bf895b8f05e4227f", - "Name": "AutomatedLauncherTesting", - "DisplayName": "Automated Launcher Testing", - "Version": "0.1.0", - "Summary": "This GEM is used to manage running of Automated Launcher Tests", - "Tags": ["Untagged"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Automated Launcher Testing", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Automated Launcher Testing Gem manages automated Open 3D Engine (O3DE) launcher tests.", + "canonical_tags": ["Gem"], + "user_tags": ["Debug", "Tools"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Blast/gem.json b/Gems/Blast/gem.json index 0ba5aab8b1..a4eb9d6b31 100644 --- a/Gems/Blast/gem.json +++ b/Gems/Blast/gem.json @@ -1,37 +1,12 @@ { "gem_name": "Blast", - "GemFormatVersion": 4, - "Uuid": "414bd211c99d4f74aef3a266b9ca208c", - "Name": "Blast", - "DisplayName": "NVIDIA Blast [Experimental]", - "Version": "0.1.0", - "Summary": "Enables support for NVIDIA Blast objects in Lumberyard for high-fidelity destruction.", - "Tags": [ "Physics" ], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ], - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - }, - { - "Uuid": "4e08125824434932a0fe3717259caa47", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "PhysX" - } - ] + "display_name": "NVIDIA Blast", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The NVIDIA Blast Gem provides tools to author fractured mesh assets in Houdini, and functionality to create realistic destruction simulations in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Physics", "Simulation", "Animation"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Camera/gem.json b/Gems/Camera/gem.json index 2d7e7370f5..f59bb8cc0d 100644 --- a/Gems/Camera/gem.json +++ b/Gems/Camera/gem.json @@ -1,21 +1,12 @@ { "gem_name": "Camera", - "GemFormatVersion": 4, - "Uuid": "f910686b6725452fbfc4671f95f733c6", - "Name": "Camera", - "Version": "0.1.0", - "DisplayName": "Camera", - "Tags": ["Camera"], - "Summary": "The Camera Gem includes a basic camera component that defines a frustum for runtime rendering.", - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ] + "display_name": "Camera", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Camera Gem provides a basic camera component that defines a frustum for runtime rendering.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/CameraFramework/gem.json b/Gems/CameraFramework/gem.json index 6a05537acf..6a6cbaf1f0 100644 --- a/Gems/CameraFramework/gem.json +++ b/Gems/CameraFramework/gem.json @@ -1,21 +1,12 @@ { "gem_name": "CameraFramework", - "Dependencies": [ - { - "Uuid": "f910686b6725452fbfc4671f95f733c6", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "Camera" - } - ], - "GemFormatVersion": 3, - "Uuid": "54f2763fe191432fa681ce4a354eedf5", - "Name": "CameraFramework", - "Version": "0.1.0", - "LinkType": "Dynamic", - "DisplayName": "Camera Framework [PREVIEW]", - "Tags": ["Camera", "Framework"], - "Summary": "The Camera Framework Gem includes the camera rig component which drives an entity through camera behaviors. Behaviors are provided in the Starting Point Camera Gem.", - "IconPath": "preview.png" + "display_name": "Camera Framework", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Camera Framework Gem provides a base for implementing more complex camera systems.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Framework", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/CertificateManager/gem.json b/Gems/CertificateManager/gem.json index c77afa4211..38005a7cd1 100644 --- a/Gems/CertificateManager/gem.json +++ b/Gems/CertificateManager/gem.json @@ -1,12 +1,12 @@ { "gem_name": "CertificateManager", - "GemFormatVersion": 3, - "Uuid": "659CFFFF33B14A10835BAFC6EA623F98", - "Name": "CertificateManager", - "DisplayName": "Amazon Certificate Manager", - "Version": "0.0.1", - "LinkType": "Dynamic", - "Summary": "The Amazon Certificate Manager Gem provides access to authentication files for secure game connections from S3, files on disk, and other 3rd party sources", - "Tags": ["Amazon Certificate Manager","Security","Multiplayer","Networking"], - "IconPath": "preview.png" + "display_name": "Certificate Manager", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Certificate Manager Gem provides access to authentication files for secure game connections from Amazon S3, files on disk, and other 3rd party sources.", + "canonical_tags": ["Gem"], + "user_tags": ["Network", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/CrashReporting/gem.json b/Gems/CrashReporting/gem.json index 12297936ab..e1e06f0ac1 100644 --- a/Gems/CrashReporting/gem.json +++ b/Gems/CrashReporting/gem.json @@ -1,21 +1,12 @@ { "gem_name": "CrashReporting", - "GemFormatVersion": 4, - "Uuid": "089562a2cbbd41749b359f85fa04f1c9", - "Name": "CrashReporting", - "DisplayName": "CrashReporting", - "Version": "0.1.0", - "Summary": "Enable external crash reporting for a game project", - "Tags": ["Untagged"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "StaticLib", - "Name": "StaticLibrary" - }, - { - "Type": "Standalone", - "Name": "Uploader" - } - ] + "display_name": "Crash Reporting", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Crash Reporting Gem provides support for external crash reporting for Open 3D Engine projects.", + "canonical_tags": ["Gem"], + "user_tags": ["Debug", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/CustomAssetExample/gem.json b/Gems/CustomAssetExample/gem.json index 47de0bc966..62bdcb1ff6 100644 --- a/Gems/CustomAssetExample/gem.json +++ b/Gems/CustomAssetExample/gem.json @@ -1,19 +1,12 @@ { "gem_name": "CustomAssetExample", - "GemFormatVersion": 3, - "Uuid": "ad082dd50c6545849729e9afeaaeaa1d", - "Name": "CustomAssetExample", - "DisplayName": "CustomAssetExample", - "Version": "0.1.0", - "Summary": "Contians example code for creating a custom asset in Lumberyard's asset pipeline", - "Tags": ["Assets, Example"], - "LinkType": "Dynamic", - "IconPath": "preview.png", - "EditorModule": true, - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ] + "display_name": "Custom Asset Example", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Custom Asset Example Gem provides example code for creating a custom asset for Open 3D Engine's asset pipeline.", + "canonical_tags": ["Gem"], + "user_tags": ["Assets", "Tools"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/DebugDraw/gem.json b/Gems/DebugDraw/gem.json index 375483642e..0dd2e179f3 100644 --- a/Gems/DebugDraw/gem.json +++ b/Gems/DebugDraw/gem.json @@ -1,13 +1,12 @@ { "gem_name": "DebugDraw", - "GemFormatVersion": 3, - "Uuid": "66239f50bf754354b514c850c8b841fb", - "Name": "DebugDraw", - "DisplayName": "DebugDraw [PREVIEW]", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "The DebugDraw Gem provides editor and game runtime debug visualization features.", - "Tags": ["Debugging"], - "IconPath": "preview.png", - "EditorModule": true + "display_name": "Debug Draw", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Debug Draw Gem provides Editor and runtime debug visualization features for Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Debug", "Tools", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/DevTextures/gem.json b/Gems/DevTextures/gem.json index a379bb8ad7..7a27d7c776 100644 --- a/Gems/DevTextures/gem.json +++ b/Gems/DevTextures/gem.json @@ -1,12 +1,12 @@ { "gem_name": "DevTextures", - "GemFormatVersion": 3, - "Uuid": "2c227161447b4d77a5b07c093e214fe3", - "Name": "DevTextures", - "DisplayName": "DevTextures", - "Version": "0.1.0", - "LinkType": "NoCode", - "Summary": "Collection of general purpose textures useful for prototypes and preproduction. ", - "Tags": ["Asset"], - "IconPath": "preview.png" + "display_name": "Dev Textures", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "The Dev Textures Gem provides a collection of general purpose texture assets useful for prototypes and preproduction.", + "canonical_tags": ["Gem"], + "user_tags": ["Assets", "Debug", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/EMotionFX/gem.json b/Gems/EMotionFX/gem.json index f116a6a2c0..74a060ed52 100644 --- a/Gems/EMotionFX/gem.json +++ b/Gems/EMotionFX/gem.json @@ -1,23 +1,12 @@ { "gem_name": "EMotionFX", - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - } - ], - "GemFormatVersion": 3, - "Uuid": "044a63ea67d04479aa5daf62ded9d9ca", - "Name": "EMotionFX", - "DisplayName": "EMotion FX Animation", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "EMotion FX is a character animation system used to set up animated controllable characters inside your project.\n", - "Tags": ["Animation"], - "IconPath": "EMotionFX.png", - "EditorModule" : true, - "DisableGemAutoUselib": true + "display_name": "EMotion FX Animation", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The EMotion FX Animation Gem provides Open 3D Engine's animation system for rigged actors and includes Animation Editor, a tool for creating animated behaviors, simulated objects, and colliders for rigged actors.", + "canonical_tags": ["Gem"], + "user_tags": ["Animation", "Tools", "Simulation"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/EditorPythonBindings/gem.json b/Gems/EditorPythonBindings/gem.json index 41d65cea43..a8ae59b22e 100644 --- a/Gems/EditorPythonBindings/gem.json +++ b/Gems/EditorPythonBindings/gem.json @@ -1,17 +1,12 @@ { - "gem_name": "EditorPythonBindings", - "GemFormatVersion": 4, - "Uuid": "b658359393884c4381c2fe2952b1472a", - "Name": "EditorPythonBindings", - "DisplayName": "EditorPythonBindings", - "Version": "0.1.0", - "Summary": "A gem to bind Editor commands via Python scripts.", - "Tags": ["Editor", "Assets", "Asset Pipeline", "Python"], - "IconPath": "preview.png", - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ] + "gem_name": "EditorPythonBindings", + "display_name": "Editor Python Bindings", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Editor Python Bindings Gem provides Python commands for Open 3D Engine Editor functions.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/ExpressionEvaluation/gem.json b/Gems/ExpressionEvaluation/gem.json index f85311a68c..9302af152a 100644 --- a/Gems/ExpressionEvaluation/gem.json +++ b/Gems/ExpressionEvaluation/gem.json @@ -1,16 +1,12 @@ { "gem_name": "ExpressionEvaluation", - "GemFormatVersion": 4, - "Uuid": "4c6f9df57ca2468f93c8d860ee6a1167", - "Name": "ExpressionEvaluation", - "DisplayName": "Expression Evaluation", - "Version": "0.1.0", - "Summary": "Provides a method for parsing and executing various string expressions(e.g. 1+1 or 2>3).", - "Tags": ["Untagged"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Expression Evaluation", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Expression Evaluation Gem provides a method for parsing and executing string expressions in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "Utiltity"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/FastNoise/gem.json b/Gems/FastNoise/gem.json index 4d4da11ee1..f49db2aa02 100644 --- a/Gems/FastNoise/gem.json +++ b/Gems/FastNoise/gem.json @@ -1,37 +1,12 @@ { "gem_name": "FastNoise", - "GemFormatVersion": 4, - "Uuid": "c5f23032407f49ca8d8de1733423565c", - "Name": "FastNoise", - "DisplayName": "Fast Noise Gradient [PREVIEW]", - "Version": "0.1.0", - "Summary": "A Lumberyard Gem that provides a Gradient Signal component for FastNoise. FastNoise is a realtime noise generation library with a large collection of different noise algorithms.", - "Tags": ["Gradient"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ], - "Dependencies": [ - { - "Uuid": "8825563d9d964ec3be3bab681f3bd9f2", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "GradientSignal" - }, - { - "Uuid": "5de82d29d6094bfe97c1a4d35fcd5fbe", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "SurfaceData" - } - ] + "display_name": "Fast Noise", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The FastNoise Gradient Gem uses the third-party, open source FastNoise library to provide a variety of high-performance noise generation algorithms.", + "canonical_tags": ["Gem"], + "user_tags": ["Utility", "Tools", "Design"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/GameState/gem.json b/Gems/GameState/gem.json index e9b79f64ae..fe9569eb75 100644 --- a/Gems/GameState/gem.json +++ b/Gems/GameState/gem.json @@ -1,16 +1,12 @@ { "gem_name": "GameState", - "GemFormatVersion": 4, - "Uuid": "1a557ac19dc34f5697fe03f30be5b6e4", - "Name": "GameState", - "DisplayName": "GameState", - "Version": "0.1.0", - "Summary": "Provides a generic framework for managing game states and the transitions between them. Some sample game states are provided in the GameStateSamples Gem.", - "Tags": ["Game State"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Game State", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Game State Gem provides a generic framework to determine and manage game states and game state transitions in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Gameplay", "Framework", "Scripting"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/GameStateSamples/gem.json b/Gems/GameStateSamples/gem.json index 992ca59237..ce0fcbd868 100644 --- a/Gems/GameStateSamples/gem.json +++ b/Gems/GameStateSamples/gem.json @@ -1,49 +1,12 @@ { "gem_name": "GameStateSamples", - "Dependencies": - [ - { - "Uuid" : "1a557ac19dc34f5697fe03f30be5b6e4", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "GameState" - }, - { - "Uuid" : "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "LmbrCentral" - }, - { - "Uuid" : "93ccb44a96b142f7942a3fb6b9ca36e1", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "LocalUser" - }, - { - "Uuid" : "c7935ecf5e8047fe8ca947b34b11cadb", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "LyShineExamples" - }, - { - "Uuid" : "89225422672547deaca9e7a22b883973", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "MessagePopup" - }, - { - "Uuid" : "d96ab03f53d14c9e83f9b4528c8576d7", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "SaveData" - } - ], - "GemFormatVersion": 4, - "Uuid": "76db0b1bcff84224a92cbceb373f4a85", - "Name": "GameStateSamples", - "DisplayName": "GameStateSamples", - "Version": "0.1.0", - "Summary": "Provides a set of sample game states (built on top of the generic GameState Gem), including primary user selection, main menu, level loading, level running, and level paused.", - "Tags": ["Game State", "Main Menu", "Level Loading", "Pause Menu", "Primary User", "Local Multiplayer", "Local Co-op", "Split Screen"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Game State Samples", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Game State Samples Gem provides a set of sample game states (built on top of the Game State Gem), including primary user selection, main menu, level loading, level running, and level paused.", + "canonical_tags": ["Gem"], + "user_tags": ["Gameplay", "Samples", "Assets"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Gestures/gem.json b/Gems/Gestures/gem.json index efd3fa65b2..4c2f5fe67a 100644 --- a/Gems/Gestures/gem.json +++ b/Gems/Gestures/gem.json @@ -1,11 +1,12 @@ { "gem_name": "Gestures", - "GemFormatVersion": 3, - "Uuid": "6056556b6088413984309c4a413593ad", - "Name": "Gestures", - "Version": "1.0.0", - "LinkType": "Dynamic", - "Summary": "Gesture-based input, including click/tap, drag, hold, pinch, rotate, and swipe.", - "IconPath": "preview.png", - "Tags": ["Input", "Gestures"] + "display_name": "Gestures", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Gestures Gem provides detection for common gesture-based input actions on iOS and Android devices.", + "canonical_tags": ["Gem"], + "user_tags": ["Input", "Gameplay", "Scripting"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/GradientSignal/gem.json b/Gems/GradientSignal/gem.json index 4186bbe71e..cae1a272b1 100644 --- a/Gems/GradientSignal/gem.json +++ b/Gems/GradientSignal/gem.json @@ -1,37 +1,12 @@ { "gem_name": "GradientSignal", - "GemFormatVersion": 4, - "Uuid": "8825563d9d964ec3be3bab681f3bd9f2", - "Name": "GradientSignal", - "DisplayName": "Gradient Signal [PREVIEW]", - "Version": "0.1.0", - "Summary": "A Lumberyard Gem that provides a number of components for generating (ex: Random, Perlin), modifying (ex: Levels, Threshold), and mixing gradient signals.", - "Tags": ["Gradient", "Surface"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ], - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - }, - { - "Uuid": "5de82d29d6094bfe97c1a4d35fcd5fbe", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "SurfaceData" - } - ] + "display_name": "Gradient Signal", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Gradient Signal Gem provides a number of components for generating, modifying, and mixing gradient signals.", + "canonical_tags": ["Gem"], + "user_tags": ["Utility", "Tools", "Design"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/GraphCanvas/gem.json b/Gems/GraphCanvas/gem.json index 32c828ea16..6884f6b9cb 100644 --- a/Gems/GraphCanvas/gem.json +++ b/Gems/GraphCanvas/gem.json @@ -1,13 +1,12 @@ { "gem_name": "GraphCanvas", - "GemFormatVersion": 3, - "Uuid": "875b6fcbdeea44deaae7984ad9bb6cdc", - "Name": "GraphCanvas", - "DisplayName": "GraphCanvas", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "The Graph Canvas Gem includes a C++ framework for creating custom graphical node based editors.", - "Tags": ["GraphCanvas"], - "IconPath": "preview.png", - "EditorModule" : true + "display_name": "Graph Canvas", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Graph Canvas Gem provides a C++ framework for creating custom graphical node based editors for Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Framework", "Tools", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/GraphModel/gem.json b/Gems/GraphModel/gem.json index 939b6719d3..52c914357d 100644 --- a/Gems/GraphModel/gem.json +++ b/Gems/GraphModel/gem.json @@ -1,26 +1,12 @@ { "gem_name": "GraphModel", - "GemFormatVersion": 4, - "Uuid": "0844f64a3acf4f5abf3a535dc9b63bc9", - "Name": "GraphModel", - "DisplayName": "GraphModel", - "Version": "0.1.0", - "Summary": "A generic node graph data model framework.", - "Tags": ["GraphModel", "Scripting", "Vegetation"], - "IconPath": "graphModelIcon.svg", - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ], - "Dependencies": [ - { - "Uuid": "875b6fcbdeea44deaae7984ad9bb6cdc", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "GraphCanvas" - } - ] + "display_name": "Graph Model", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Graph Model Gem provides a generic node graph data model framework for Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Framework", "Tools", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/HttpRequestor/gem.json b/Gems/HttpRequestor/gem.json index 989a55d637..8beb77d839 100644 --- a/Gems/HttpRequestor/gem.json +++ b/Gems/HttpRequestor/gem.json @@ -1,12 +1,12 @@ { "gem_name": "HttpRequestor", - "GemFormatVersion": 3, - "Uuid": "28479e255bde466e91fc34eec808d9c7", - "Name": "HttpRequestor", - "DisplayName": "HttpRequestor", - "Version": "1.0.0", - "LinkType": "Dynamic", - "Summary": "A Gem to handle HTTP/HTTPs requests.", - "Tags": ["http", "https", "rest"], - "IconPath": "preview.png" + "display_name": "HTTP Requestor", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The HTTP Requestor Gem provides functionality to make asynchronous HTTP/HTTPS requests and return data through a user-provided call back function.", + "canonical_tags": ["Gem"], + "user_tags": ["Network", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/ImGui/gem.json b/Gems/ImGui/gem.json index ed31217323..327e417bcf 100644 --- a/Gems/ImGui/gem.json +++ b/Gems/ImGui/gem.json @@ -1,30 +1,12 @@ { "gem_name": "ImGui", - "GemFormatVersion": 4, - "Uuid": "bab8807a1bc646b3909f3cc200ffeedf", - "Name": "ImGui", - "DisplayName": "ImGui", - "Version": "0.1.0", - "Summary": "A GEM that houses 3rdParty lib IMGUI. Great for quick programmer art GUI fit for debug type menus.", - "Tags": ["Debug"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ], - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - } - ] + "display_name": "Immediate Mode GUI (IMGUI)", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Immediate Mode GUI Gem provides the 3rdParty library IMGUI which can be used to create run time immediate mode overlays for debugging and profiling information in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Debug", "Rendering", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/InAppPurchases/gem.json b/Gems/InAppPurchases/gem.json index 27f22b0ba4..96d0e7fa0a 100644 --- a/Gems/InAppPurchases/gem.json +++ b/Gems/InAppPurchases/gem.json @@ -1,12 +1,12 @@ { "gem_name": "InAppPurchases", - "GemFormatVersion": 3, - "Uuid": "92fe57eae7d3402a90761973678c079a", - "Name": "InAppPurchases", - "DisplayName": "In-App Purchases", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "Provides the in-app purchasing API for iOS and Android", - "Tags": ["InAppPurchases", "iOS", "Android"], - "IconPath": "preview.png" + "display_name": "In-App Purchases", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The In-App Purchases Gem provides functionality for in app purchases for iOS and Android.", + "canonical_tags": ["Gem"], + "user_tags": ["SDK", "Network"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/LandscapeCanvas/gem.json b/Gems/LandscapeCanvas/gem.json index 3c1f74b689..338845ebb1 100644 --- a/Gems/LandscapeCanvas/gem.json +++ b/Gems/LandscapeCanvas/gem.json @@ -1,61 +1,12 @@ { "gem_name": "LandscapeCanvas", - "GemFormatVersion": 4, - "Uuid": "19c2b2d5018940108baf252934b8e6bf", - "Name": "LandscapeCanvas", - "DisplayName": "LandscapeCanvas", - "Version": "0.1.0", - "Summary": "A node-based Editor for authoring Dynamic Vegetation.", - "Tags": ["Vegetation"], - "IconPath": "landscapeCanvasIcon.svg", - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ], - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - }, - { - "Uuid": "f394e7cf54424bba89615381bba9511b", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "Vegetation" - }, - { - "Uuid": "875b6fcbdeea44deaae7984ad9bb6cdc", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "GraphCanvas" - }, - { - "Uuid" : "0844f64a3acf4f5abf3a535dc9b63bc9", - "VersionConstraints": [ - "~>0.1" - ], - "_comment" : "GraphModel" - }, - { - "Uuid": "8825563d9d964ec3be3bab681f3bd9f2", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "GradientSignal" - }, - { - "Uuid": "5de82d29d6094bfe97c1a4d35fcd5fbe", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "SurfaceData" - } - ] + "display_name": "Landscape Canvas", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Landscape Canvas Gem provides the Landscape Canvas editor, a node-based graph tool for authoring workflows to populate landscape with dynamic vegetation.", + "canonical_tags": ["Gem"], + "user_tags": ["Environment", "Design", "Tools"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/LmbrCentral/gem.json b/Gems/LmbrCentral/gem.json index da88c9129a..6f0530c35d 100644 --- a/Gems/LmbrCentral/gem.json +++ b/Gems/LmbrCentral/gem.json @@ -1,14 +1,13 @@ { "gem_name": "LmbrCentral", - "GemFormatVersion": 3, - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "Name": "LmbrCentral", - "DisplayName": "LmbrCentral", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "Required LmbrCentral Engine Gem.", - "Tags": ["Required"], - "IconPath": "preview.png", - "EditorModule": true, - "IsRequired": true + "display_name": "O3DE Core (LmbrCentral)", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The O3DE Core (LmbrCentral) Gem provides required code and assets for running Open 3D Engine Editor.", + "canonical_tags": ["Gem"], + "user_tags": ["Core", "Framework", "Assets"], + "icon_path": "preview.png", + "requirements": "" } + diff --git a/Gems/LocalUser/gem.json b/Gems/LocalUser/gem.json index fdda8e3959..47c1601240 100644 --- a/Gems/LocalUser/gem.json +++ b/Gems/LocalUser/gem.json @@ -1,16 +1,12 @@ { "gem_name": "LocalUser", - "GemFormatVersion": 4, - "Uuid": "93ccb44a96b142f7942a3fb6b9ca36e1", - "Name": "LocalUser", - "DisplayName": "LocalUser", - "Version": "0.1.0", - "Summary": "Provides functionality for mapping local user ids to local player slots and managing local user profiles.", - "Tags": ["User", "Local User", "Local User Profile", "Primary User", "Local Multiplayer", "Local Co-op", "Split Screen"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Local User", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Local User Gem provides functionality for mapping local user ids to local player slots and managing local user profiles.", + "canonical_tags": ["Gem"], + "user_tags": ["Input", "Gameplay", "Scripting"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/LyShine/gem.json b/Gems/LyShine/gem.json index bcdd7f2eb3..c61ca0cce5 100644 --- a/Gems/LyShine/gem.json +++ b/Gems/LyShine/gem.json @@ -1,39 +1,12 @@ { "gem_name": "LyShine", - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - }, - { - "Uuid": "5a149b6b3c964064bd4970f0e92f72e2", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "Texture Atlas" - } - ], - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ], - "GemFormatVersion": 4, - "Uuid": "0fefab3f13364722b2eab3b96ce2bf20", - "Name": "LyShine", - "DisplayName": "LyShine", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "LyShine is the in-game UI system for Lumberyard", - "Tags": ["UI","Required"], - "IconPath": "preview.png", - "IsRequired": true + "display_name": "LyShine", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The LyShine Gem provides the runtime UI system and creation tools for Open 3D Engine projects.", + "canonical_tags": ["Gem"], + "user_tags": ["UI", "Tools", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/LyShineExamples/gem.json b/Gems/LyShineExamples/gem.json index 7868148044..e8c7110466 100644 --- a/Gems/LyShineExamples/gem.json +++ b/Gems/LyShineExamples/gem.json @@ -1,26 +1,12 @@ { "gem_name": "LyShineExamples", - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - }, - { - "Uuid": "6bb61c9e547043f0afc5019d6d460b78", - "VersionConstraints": [ "~>0.1.0" ], - "_comment": "UiBasics" - } - ], - "GemFormatVersion": 3, - "Uuid": "c7935ecf5e8047fe8ca947b34b11cadb", - "Name": "LyShineExamples", - "DisplayName": "LyShineExamples", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "Provides example code for using LyShine.", - "Tags": ["UI", "LyShine", "Example"], - "IconPath": "preview.png" + "display_name": "LyShine Examples", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "The LyShine Examples Gem provides example code and assets for LyShine, the runtime UI system and editor for Open 3D Engine projects.", + "canonical_tags": ["Gem"], + "user_tags": ["UI", "Sample", "Assets"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Maestro/gem.json b/Gems/Maestro/gem.json index fc9cf2e02a..4f638b63f1 100644 --- a/Gems/Maestro/gem.json +++ b/Gems/Maestro/gem.json @@ -1,14 +1,13 @@ { "gem_name": "Maestro", - "GemFormatVersion": 3, - "Uuid": "3b9a978ed6f742a1acb99f74379a342c", - "Name": "Maestro", - "DisplayName": "Maestro", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "Lumberyard Cinematics Module", - "Tags": ["Cinematics","Required"], - "IconPath": "preview.png", - "EditorModule": true, - "IsRequired": true + "display_name": "Maestro Cinematics", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Maestro Cinematics Gem provides Track View, Open 3D Engine's animated sequence and cinematics editor.", + "canonical_tags": ["Gem"], + "user_tags": ["Animation", "Tools", "Scripting"], + "icon_path": "preview.png", + "requirements": "" } + diff --git a/Gems/MessagePopup/gem.json b/Gems/MessagePopup/gem.json index 137ee811f1..c75d28f50d 100644 --- a/Gems/MessagePopup/gem.json +++ b/Gems/MessagePopup/gem.json @@ -1,25 +1,12 @@ { "gem_name": "MessagePopup", - "GemFormatVersion": 4, - "Uuid": "89225422672547deaca9e7a22b883973", - "Name": "MessagePopup", - "DisplayName": "MessagePopup", - "Version": "0.1.0", - "Summary": "Show a message popup ", - "Tags": ["Untagged"], - "IconPath": "preview.png", - "Dependencies": [ - { - "Uuid": "6bb61c9e547043f0afc5019d6d460b78", - "VersionConstraints": [ - "~>0.1.0" - ], - "_comment": "UiBasics" - } - ], - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Message Popup", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Message Popup Gem provides an example implementation of popup messages using LyShine in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Gameplay", "Sample"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Metastream/gem.json b/Gems/Metastream/gem.json index 16a4a090bb..911c6be665 100644 --- a/Gems/Metastream/gem.json +++ b/Gems/Metastream/gem.json @@ -1,12 +1,12 @@ { "gem_name": "Metastream", - "GemFormatVersion": 3, - "Uuid": "c02d7efe05134983b5699d9ee7594c3a", - "Name": "Metastream", - "DisplayName": "Metastream", - "Version": "1.0.0", - "LinkType": "Dynamic", - "Summary": "When the Metastream Gem is installed, it will set up a project to run an HTTP server that can service requests for the purpose of allowing broadcasters to customize game streams with overlays of statistics and event data from a game session creating a more engaging experience for the viewer.", - "Tags": ["Twitch", "Metastream", "Streaming", "Broadcasting", "Overlay"], - "IconPath": "preview.png" + "display_name": "Metastream", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Metastream Gem provides functionality for an HTTP server that allows broadcasters to customize game streams with overlays of statistics and event data from a game session.", + "canonical_tags": ["Gem"], + "user_tags": ["Gameplay", "Network", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Microphone/gem.json b/Gems/Microphone/gem.json index f90d8c1a18..31b3d46963 100644 --- a/Gems/Microphone/gem.json +++ b/Gems/Microphone/gem.json @@ -1,19 +1,12 @@ { "gem_name": "Microphone", - "GemFormatVersion": 3, - "Uuid": "e70dd59f02f14ea49e6b38434e86ebf1", - "Name": "Microphone", - "DisplayName": "Microphone", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "Provides access to connected Microphone Devices and ability to read their input.", - "Tags": ["Audio", "Microphone"], - "IconPath": "preview.png", - "Dependencies": [ - { - "Uuid": "6f63f2b6d07f4b89b4b7c86ebee7feb8", - "VersionConstraints": [">=0.1.0"], - "_comment": "AudioSystem" - } - ] + "display_name": "Microphone", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Microphone Gem provides support for audio input through microphones.", + "canonical_tags": ["Gem"], + "user_tags": ["Audio", "Input"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Multiplayer/gem.json b/Gems/Multiplayer/gem.json index a21ac5d7d3..8abbddea5f 100644 --- a/Gems/Multiplayer/gem.json +++ b/Gems/Multiplayer/gem.json @@ -1,11 +1,12 @@ { "gem_name": "Multiplayer", - "GemFormatVersion": 3, - "Uuid": "9524EBD3E64D4D13A9764A18DB9A564F", - "Name": "Multiplayer", - "Version": "1.0.0", - "LinkType": "Dynamic", - "Tags": ["Multiplayer","Networking"], - "Summary": "The Multiplayer Gem provides high level advanced multiplayer gameplay functionality such as entity replication, local prediction, and server side backward reconciliation", - "IconPath": "preview.png" + "display_name": "Multiplayer", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Multiplayer Gem provides a public API for multiplayer functionality such as connecting and hosting.", + "canonical_tags": ["Gem"], + "user_tags": ["Multiplayer", "Network", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/MultiplayerCompression/gem.json b/Gems/MultiplayerCompression/gem.json index 77a86b04a2..aeea2282cc 100644 --- a/Gems/MultiplayerCompression/gem.json +++ b/Gems/MultiplayerCompression/gem.json @@ -1,10 +1,12 @@ { "gem_name": "MultiplayerCompression", "display_name": "Multiplayer Compression", - "summary": "The Multiplayer Compression gem provides an open source Compressor for use with AzNetworking's transport layer.", - "canonical_tags": ["Multiplayer", "Networking", "Utility"], - "user_tags": ["MultiplayerCompression"], - "icon_path": "preview.png", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", "type": "Code", - "provider": "Open 3D Foundation" + "summary": "The Multiplayer Compression Gem provides an open source Compressor for use with AzNetworking's transport layer.", + "canonical_tags": ["Gem"], + "user_tags": ["Multiplayer", "Network", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/NvCloth/gem.json b/Gems/NvCloth/gem.json index f71d71e592..95ea8168d6 100644 --- a/Gems/NvCloth/gem.json +++ b/Gems/NvCloth/gem.json @@ -1,8 +1,12 @@ { "gem_name": "NvCloth", - "display_name": "NVIDIA Cloth [PREVIEW]", - "summary": "Provides the functionality needed to add cloth simulation.", + "display_name": "NVIDIA Cloth (NvCloth)", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The NVIDIA Cloth Gem provides functionality to create fast, realistic cloth simulation with the NVIDIA Cloth library.", "canonical_tags": ["Gem"], - "user_tags": ["Physics"], - "icon_path": "preview.png" + "user_tags": ["Physics", "Simulation", "SDK"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/PBSreferenceMaterials/gem.json b/Gems/PBSreferenceMaterials/gem.json index 65fe12d5f8..b015d89888 100644 --- a/Gems/PBSreferenceMaterials/gem.json +++ b/Gems/PBSreferenceMaterials/gem.json @@ -1,12 +1,12 @@ { "gem_name": "PBSreferenceMaterials", - "GemFormatVersion": 3, - "Uuid": "07375b61b1a2424bb03088bbdf28b2c8", - "Name": "PBSreferenceMaterials", - "DisplayName": "PBSreferenceMaterials", - "Version": "0.1.0", - "LinkType": "NoCode", - "Summary": "A set of Physically Based Shading reference materials and texture assets", - "Tags": ["Asset"], - "IconPath": "preview.png" + "display_name": "PBS Reference Materials", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "The PBS Reference Materials Gem provides physically based reference materials for Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Sample", "Assets"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/PhysX/gem.json b/Gems/PhysX/gem.json index 126a4a218a..0b6b635c71 100644 --- a/Gems/PhysX/gem.json +++ b/Gems/PhysX/gem.json @@ -1,22 +1,12 @@ { "gem_name": "PhysX", - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - } - ], - "GemFormatVersion": 3, - "Uuid": "4e08125824434932a0fe3717259caa47", - "Name": "PhysX", - "DisplayName": "PhysX", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "The PhysX Gem enables the NVIDIA PhysX SDK to provide physics simulation for Lumberyard. The PhysX system is not compatible with the legacy physics system. You cannot use components interchangeably between each system.", - "Tags": ["Physics"], - "IconPath": "preview.png", - "EditorModule": true + "display_name": "PhysX", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The PhysX Gem provides physics simulation with NVIDIA PhysX including static and dynamic rigid body simulation, force regions, ragdolls, and dynamic PhysX joints.", + "canonical_tags": ["Gem"], + "user_tags": ["Physics", "Simulation", "SDK"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/PhysXDebug/gem.json b/Gems/PhysXDebug/gem.json index 32e7dfead3..7dbfc1a096 100644 --- a/Gems/PhysXDebug/gem.json +++ b/Gems/PhysXDebug/gem.json @@ -1,29 +1,12 @@ { "gem_name": "PhysXDebug", - "Dependencies": [ - { - "Uuid": "4e08125824434932a0fe3717259caa47", - "VersionConstraints": [ - ">=0.1" - ], - "_comment": "PhysX Gem" - }, - { - "Uuid": "bab8807a1bc646b3909f3cc200ffeedf", - "VersionConstraints": [ - ">=0.1.0" - ], - "_comment": "ImGui Gem" - } - ], - "GemFormatVersion": 3, - "Uuid": "516145e2d9904b13813f1b54605e26a6", - "Name": "PhysXDebug", - "DisplayName": "PhysX Debug [PREVIEW]", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "Debug features for the PhysX gem.", - "Tags": ["Physics", "Debug"], - "IconPath": "preview.png", - "EditorModule": true + "display_name": "PhysX Debug", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The PhysX Debug Gem provides debugging functionality and visualizations for NVIDIA PhysX in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Physics", "Simulation", "Debug"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/PhysXSamples/gem.json b/Gems/PhysXSamples/gem.json index 1c917f1f50..b5239344f6 100644 --- a/Gems/PhysXSamples/gem.json +++ b/Gems/PhysXSamples/gem.json @@ -1,42 +1,12 @@ { "gem_name": "PhysXSamples", - "Dependencies": [ - { - "Uuid": "ed07631f95fb4be1bd10cd37298ec697", - "VersionConstraints": [ - ">=0.1" - ], - "_comment": "Uses mesh assets from primatives gem" - }, - { - "Uuid": "2c227161447b4d77a5b07c093e214fe3", - "VersionConstraints": [ - ">=0.1" - ], - "_comment": "Uses textures from DevTextures gem" - }, - { - "Uuid": "4e08125824434932a0fe3717259caa47", - "VersionConstraints": [ - ">=0.1" - ], - "_comment": "Requires PhysX" - }, - { - "Uuid": "66239f50bf754354b514c850c8b841fb", - "VersionConstraints": [ - ">=0.1" - ], - "_comment": "Uses debug draw Script Canvas nodes" - } - ], - "GemFormatVersion": 3, - "Uuid": "c4a4aadba44241ae9f0141e145def7f7", - "Name": "PhysXSamples", - "DisplayName": "PhysXSamples", - "Version": "0.1.0", - "LinkType": "NoCode", - "Summary": "Collection of samples that demostrate PhysX features.", - "Tags": ["Asset"], - "IconPath": "preview.png" + "display_name": "PhysX Samples", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "The PhysX Samples Gem provides sample assets and scripts that demonstrate PhysX Gem features in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Physics", "Simulation", "Sample"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Prefab/PrefabBuilder/gem.json b/Gems/Prefab/PrefabBuilder/gem.json index 595c0c7d7f..1a815738ca 100644 --- a/Gems/Prefab/PrefabBuilder/gem.json +++ b/Gems/Prefab/PrefabBuilder/gem.json @@ -1,17 +1,12 @@ { "gem_name": "PrefabBuilder", - "GemFormatVersion": 4, - "Uuid": "88500802311C4793B03484BE2091B607", - "Name": "PrefabBuilder", - "DisplayName": "PrefabBuilder", - "Version": "0.1.0", - "Summary": "Asset Processor builder module for Prefabs", - "Tags": ["Prefabs"], - "IconPath": "preview.png", - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ] + "display_name": "Prefab Builder", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Prefab Builder Gem provides an Asset Processor module for prefabs, which are complex assets built by combining smaller entities.", + "canonical_tags": ["Gem"], + "user_tags": ["Assets", "Utility", "Core"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Presence/gem.json b/Gems/Presence/gem.json index ecf9a2663c..5df5fbdd6a 100644 --- a/Gems/Presence/gem.json +++ b/Gems/Presence/gem.json @@ -1,16 +1,12 @@ { "gem_name": "Presence", - "GemFormatVersion": 4, - "Uuid": "903ce283760647049efaef70d9368eeb", - "Name": "Presence", - "DisplayName": "Presence", - "Version": "0.1.0", - "Summary": "Platform agnostic interface for Presence services", - "Tags": [ "Presence", "Rich Presence" ], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Presence", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Presence Gem provides a target platform agnostic interface for Presence services.", + "canonical_tags": ["Gem"], + "user_tags": ["Network", "Gameplay", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/PrimitiveAssets/gem.json b/Gems/PrimitiveAssets/gem.json index de7698c664..1c1fd54c16 100644 --- a/Gems/PrimitiveAssets/gem.json +++ b/Gems/PrimitiveAssets/gem.json @@ -1,12 +1,12 @@ { "gem_name": "PrimitiveAssets", - "GemFormatVersion": 3, - "Uuid": "ed07631f95fb4be1bd10cd37298ec697", - "Name": "PrimitiveAssets", - "DisplayName": "Primitive Assets", - "Version": "1.0.0", - "LinkType": "NoCode", - "Summary": "Provides simple primitive shape assets useful for quickly building a basic scene.", - "Tags": ["Getting Started", "Asset"], - "IconPath": "preview.png" + "display_name": "Primitive Assets", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "The Primitive Assets Gem provides primitive shape mesh assets with physics enabled.", + "canonical_tags": ["Gem"], + "user_tags": ["Assets", "Sample", "Debug"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/PythonAssetBuilder/gem.json b/Gems/PythonAssetBuilder/gem.json index 39eccc4d2f..dcf3b59e23 100644 --- a/Gems/PythonAssetBuilder/gem.json +++ b/Gems/PythonAssetBuilder/gem.json @@ -1,17 +1,12 @@ { - "gem_name": "PythonAssetBuilder", - "GemFormatVersion": 4, - "Uuid": "0a5fda05323649009444bb7c3ee2b9c4", - "Name": "PythonAssetBuilder", - "DisplayName": "PythonAssetBuilder", - "Version": "0.1.0", - "Summary": "Runs asset builders written in Python scripts.", - "Tags": ["asset"], - "IconPath": "preview.png", - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ] + "gem_name": "PythonAssetBuilder", + "display_name": "Python Asset Builder", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Python Asset Builder Gem provides functionality to implement custom asset builders in Python for Asset Processor.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "Assets", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/QtForPython/gem.json b/Gems/QtForPython/gem.json index 0c13e1d98d..dea5fc2e16 100644 --- a/Gems/QtForPython/gem.json +++ b/Gems/QtForPython/gem.json @@ -1,26 +1,12 @@ { "gem_name": "QtForPython", - "GemFormatVersion": 4, - "Uuid": "cd50c7a1e31f4c9495dcffdacc3bde92", - "Name": "QtForPython", - "DisplayName": "QtForPython", - "Version": "0.1.0", - "Summary": "Adds the ability to use the PySide2 Python libraries to manage Qt widgets.", - "Tags": ["Editor"], - "IconPath": "preview.png", - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ], - "Dependencies": [ - { - "Uuid": "b658359393884c4381c2fe2952b1472a", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "EditorPythonBindings" - } - ] -} + "display_name": "Qt for Python", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Qt for Python Gem provides the PySide2 Python libraries to manage Qt widgets.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "UI", "Framework"], + "icon_path": "preview.png", + "requirements": "" + } diff --git a/Gems/RADTelemetry/gem.json b/Gems/RADTelemetry/gem.json index 511f4d7e5a..43515976da 100644 --- a/Gems/RADTelemetry/gem.json +++ b/Gems/RADTelemetry/gem.json @@ -1,12 +1,12 @@ { "gem_name": "RADTelemetry", - "GemFormatVersion": 3, - "Uuid": "bdaf32823406492686e35200afc555b3", - "Name": "RADTelemetry", - "DisplayName": "RAD Telemetry", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "The RAD Telemetry Gem allows licensors of RAD Telemetry 3 to quickly integrate RAD Telemetry 3 with Lumberyard. For instructions on enabling RAD Telemetry Gem, visit https://docs.aws.amazon.com/lumberyard/latest/userguide/gems-system-gem-rad-telemetry.html", - "Tags": ["Profile", "Profiler", "Profiling"], - "IconPath": "preview.png" + "display_name": "RAD Telemetry", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The RAD Telemetry Gem provides support for RAD Telemetry, a performance profiling and visualization middleware, in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Debug", "SDK"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/SaveData/gem.json b/Gems/SaveData/gem.json index bb8e122a18..57de27624f 100644 --- a/Gems/SaveData/gem.json +++ b/Gems/SaveData/gem.json @@ -1,16 +1,12 @@ { "gem_name": "SaveData", - "GemFormatVersion": 4, - "Uuid": "d96ab03f53d14c9e83f9b4528c8576d7", - "Name": "SaveData", - "DisplayName": "SaveData", - "Version": "0.1.0", - "Summary": "Provides a simple, platform agnostic API for saving and loading persistent user data.", - "Tags": ["Save", "Load", "Save Data", "Save Game", "Persistent Data"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] -} + "display_name": "Save Data", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Save Data Gem provides a platform independent API to save and load persistent user data in Open 3D Engine projects.", + "canonical_tags": ["Gem"], + "user_tags": ["Utility", "Gameplay"], + "icon_path": "preview.png", + "requirements": "" + } diff --git a/Gems/SceneLoggingExample/gem.json b/Gems/SceneLoggingExample/gem.json index 822acde858..faa2860d13 100644 --- a/Gems/SceneLoggingExample/gem.json +++ b/Gems/SceneLoggingExample/gem.json @@ -1,12 +1,12 @@ { "gem_name": "SceneLoggingExample", - "GemFormatVersion": 3, - "Uuid": "35d8f6e49ae04c9382c61a42d4355c2f", - "Name": "SceneLoggingExample", - "DisplayName": "Scene Logging Example", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "This example Gem demonstrates the basics of extending the SceneAPI by adding additional logging to the pipeline. Please read ReadMe.txt for further details.", - "Tags": ["Scene", "FBX"], - "IconPath": "preview.png" -} + "display_name": "Scene Logging Example", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "The Scene Logging Example Gem demonstrates the basics of extending the Open 3D Engine Scene API by adding additional logging to the pipeline.", + "canonical_tags": ["Gem"], + "user_tags": ["Debug", "Sample"], + "icon_path": "preview.png", + "requirements": "" + } diff --git a/Gems/SceneProcessing/gem.json b/Gems/SceneProcessing/gem.json index 0729ffa6ea..d9814f6a7d 100644 --- a/Gems/SceneProcessing/gem.json +++ b/Gems/SceneProcessing/gem.json @@ -1,20 +1,12 @@ { "gem_name": "SceneProcessing", - "GemFormatVersion": 3, - "Uuid": "7c2578f634df4345aca98d671e39b8ab", - "Name": "SceneProcessing", - "DisplayName": "Scene Processing (PREVIEW)", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "Use this gem to fine tune the defaults for processing of scene files like Fbx.", - "Tags": ["Scene", "FBX", "Assets"], - "IconPath": "preview.png", - "EditorModule": true, - "IsRequired": false, - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ] -} + "display_name": "Scene Processing", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Scene Processing Gem provides Scene Settings, a tool you can use to specify the default settings for processing asset files for actors, meshes, motions, and PhysX.", + "canonical_tags": ["Gem"], + "user_tags": ["Assets", "Tools", "Core"], + "icon_path": "preview.png", + "requirements": "" + } diff --git a/Gems/ScriptCanvas/gem.json b/Gems/ScriptCanvas/gem.json index df3be75ab9..680ce6ef1f 100644 --- a/Gems/ScriptCanvas/gem.json +++ b/Gems/ScriptCanvas/gem.json @@ -1,30 +1,12 @@ { - "gem_name": "ScriptCanvas", - "GemFormatVersion": 3, - "Uuid": "869a0d0ec11a45c299917d45c81555e6", - "Name": "ScriptCanvas", - "DisplayName": "Script Canvas", - "Version": "0.1.0", - "LinkType": "DynamicStatic", - "EditorModule": true, - "Summary": "The Script Canvas Gem contains Lumberyard's visual scripting environment that enables content creators with little to no engineering experience to build game logic.", - "Tags": ["Scripting", "Game"], - "IconPath": "preview.png", - "Dependencies" : [ - { - "Uuid": "875b6fcbdeea44deaae7984ad9bb6cdc", - "VersionConstraints": [ ">=0.1.0" ], - "_comment": "GraphCanvas" - }, - { - "Uuid": "32d8ba21703e4bbbb08487366e48dd69", - "VersionConstraints": [ ">=0.1.0" ], - "_comment": "ScriptEvents" - }, - { - "Uuid": "4c6f9df57ca2468f93c8d860ee6a1167", - "VersionConstraints": [ ">=0.1.0" ], - "_comment": "ExpressionEvaluation" - } - ] + "gem_name": "ScriptCanvas", + "display_name": "Script Canvas", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Script Canvas Gem provides Open 3D Engine's visual scripting environment, Script Canvas.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "Tools", "Utiltiy"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/ScriptCanvasDeveloper/gem.json b/Gems/ScriptCanvasDeveloper/gem.json index 05e7391dcc..7cc2e7d03a 100644 --- a/Gems/ScriptCanvasDeveloper/gem.json +++ b/Gems/ScriptCanvasDeveloper/gem.json @@ -1,30 +1,12 @@ { "gem_name": "ScriptCanvasDeveloperGem", - "GemFormatVersion": 3, - "Uuid": "f905c05883b94fd6bddc91052c3c5a86", - "Name": "ScriptCanvasDeveloperGem", - "DisplayName": "Script Canvas Developer Tools", - "Version": "0.1.0", - "LinkType": "DynamicStatic", - "EditorModule": true, - "Summary": "The Script Canvas Developer Gem contains a suite of utility features that aids in the development and debugging of Script Canvas systems.", - "Tags": ["Scripting", "Editor"], - "IconPath": "preview.png", - "Dependencies" : [ - { - "Uuid" : "bab8807a1bc646b3909f3cc200ffeedf", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "ImGui" - }, - { - "Uuid" : "869a0d0ec11a45c299917d45c81555e6", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "ScriptCanvas" - }, - { - "Uuid" : "875b6fcbdeea44deaae7984ad9bb6cdc", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "GraphCanvas" - } - ] -} + "display_name": "Script Canvas Developer", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Script Canvas Developer Gem provides a suite of utility features for the development and debugging of Script Canvas systems.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "Utility", "Debug"], + "icon_path": "preview.png", + "requirements": "" + } diff --git a/Gems/ScriptCanvasPhysics/gem.json b/Gems/ScriptCanvasPhysics/gem.json index 9435c1dd69..04cfb86980 100644 --- a/Gems/ScriptCanvasPhysics/gem.json +++ b/Gems/ScriptCanvasPhysics/gem.json @@ -1,32 +1,12 @@ { "gem_name": "ScriptCanvasPhysics", - "GemFormatVersion": 4, - "Uuid": "1c27519a4dda4ffaaeebf91514e5b1e8", - "Name": "ScriptCanvasPhysics", - "DisplayName": "Script Canvas - Physics", - "Version": "0.1.0", - "Summary": "Exposes legacy physics features to scripting through the Behavior Context to Lua and Script Canvas.", - "Tags": ["Scripting", "Physics"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ], - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - ">=0.1.0" - ], - "_comment": "LmbrCentral" - }, - { - "Uuid": "869a0d0ec11a45c299917d45c81555e6", - "VersionConstraints": [ - ">=0.1.0" - ], - "_comment": "ScriptCanvas" - } - ] -} + "display_name": "Script Canvas Physics", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Script Canvas Physics Gem provides Script Canvas nodes for physics scene queries such as raycasts.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "Physics", "Simulation"], + "icon_path": "preview.png", + "requirements": "" + } diff --git a/Gems/ScriptCanvasTesting/gem.json b/Gems/ScriptCanvasTesting/gem.json index 4010b87283..d82e841236 100644 --- a/Gems/ScriptCanvasTesting/gem.json +++ b/Gems/ScriptCanvasTesting/gem.json @@ -1,29 +1,12 @@ { - "gem_name": "ScriptCanvasTesting", - "GemFormatVersion": 4, - "Uuid": "387b1b2d39ce45fbbfbb6faa5f902cac", - "Name": "ScriptCanvasTesting", - "DisplayName": "Script Canvas Testing", - "Version": "0.1.0", - "Summary": "Provides a framework for testing for and with ScriptCanvas", - "Tags": ["Scripting", "Testing"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "EditorModule", - "Name": "Editor" - } - ], - "Dependencies" : [ - { - "Uuid": "875b6fcbdeea44deaae7984ad9bb6cdc", - "VersionConstraints": [ ">=0.1.0" ], - "_comment": "GraphCanvas" - }, - { - "Uuid": "869a0d0ec11a45c299917d45c81555e6", - "VersionConstraints": [ ">=0.1.0" ], - "_comment": "ScriptCanvas" - } - ] + "gem_name": "ScriptCanvasTesting", + "display_name": "Script Canvas Testing", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Script Canvas Testing Gem provides a framework for testing for and with Script Canvas.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "Debug", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/ScriptEvents/gem.json b/Gems/ScriptEvents/gem.json index 789d66de20..fba99c6af9 100644 --- a/Gems/ScriptEvents/gem.json +++ b/Gems/ScriptEvents/gem.json @@ -1,21 +1,12 @@ { "gem_name": "ScriptEvents", - "GemFormatVersion": 4, - "Uuid": "32d8ba21703e4bbbb08487366e48dd69", - "Name": "ScriptEvents", - "DisplayName": "Script Events", - "Version": "0.1.0", - "Summary": "Provides a framework for creating event assets usable from any scripting solution.", - "Tags": [ "Script", "Events", "Lua", "Script", "Canvas", "EBus", "Behavior Context" ], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ] + "display_name": "Script Events", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Script Events Gem provides a framework for creating event assets usable from any scripting solution in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "Framework", "Gameplay"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/ScriptedEntityTweener/gem.json b/Gems/ScriptedEntityTweener/gem.json index 9cc816e744..c2e1975f76 100644 --- a/Gems/ScriptedEntityTweener/gem.json +++ b/Gems/ScriptedEntityTweener/gem.json @@ -1,12 +1,12 @@ { "gem_name": "ScriptedEntityTweener", - "GemFormatVersion": 3, - "Uuid": "0d1f5f05559c4a99aaefd30633a0158e", - "Name": "ScriptedEntityTweener", - "DisplayName": "Scripted Entity Tweener", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "Entity Animator can be used to transform entity properties in Lumberyard", - "Tags": ["UI"], - "IconPath": "preview.png" -} + "display_name": "Scripted Entity Tweener", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Scripted Entity Tweener Gem provides a script driven animation system for Open 3D Engine projects.", + "canonical_tags": ["Gem"], + "user_tags": ["Scripting", "UI", "Animation"], + "icon_path": "preview.png", + "requirements": "" + } diff --git a/Gems/SliceFavorites/gem.json b/Gems/SliceFavorites/gem.json index 759cc5dc3d..3ae37e2145 100644 --- a/Gems/SliceFavorites/gem.json +++ b/Gems/SliceFavorites/gem.json @@ -1,17 +1,11 @@ { "gem_name": "SliceFavorites", - "GemFormatVersion": 4, - "Uuid": "1bfc7270d4a1490daac8aa8b072c4489", - "Name": "SliceFavorites", - "DisplayName": "SliceFavorites", - "Version": "0.1.0", - "Summary": "Add the ability to favorite a slice to allow easy access and instantiation", - "Tags": ["Editor", "Slices"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "EditorModule", - "Name": "Editor" - } - ] + "display_name": "SliceFavorites", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "Add the ability to favorite a slice to allow easy access and instantiation", + "user_tags": ["Editor", "Slices"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/StartingPointCamera/gem.json b/Gems/StartingPointCamera/gem.json index e970ae417d..2c28f346a9 100644 --- a/Gems/StartingPointCamera/gem.json +++ b/Gems/StartingPointCamera/gem.json @@ -1,35 +1,12 @@ { "gem_name": "StartingPointCamera", - "Dependencies": [ - { - "Uuid": "54f2763fe191432fa681ce4a354eedf5", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "CameraFramework" - }, - { - "Uuid": "f910686b6725452fbfc4671f95f733c6", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "Camera" - }, - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - } - ], - "GemFormatVersion": 3, - "Uuid": "834070b9537d44df83559e2045c3859f", - "Name": "StartingPointCamera", - "DisplayName": "Starting Point Camera [PREVIEW]", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "The Starting Point Camera Gem includes the behaviors used with the Camera Framework Gem to define a camera rig.", - "Tags": ["Camera", "Starting Point"], - "IconPath": "preview.png" + "display_name": "Starting Point Camera", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Starting Point Camera Gem provides the behaviors used with the Camera Framework Gem to define a camera rig.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Gameplay", "Scripting"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/StartingPointInput/gem.json b/Gems/StartingPointInput/gem.json index 5faddabea7..2d5b6aee15 100644 --- a/Gems/StartingPointInput/gem.json +++ b/Gems/StartingPointInput/gem.json @@ -1,21 +1,12 @@ { "gem_name": "StartingPointInput", - "Dependencies": [ - { - "Uuid" : "869a0d0ec11a45c299917d45c81555e6", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "ScriptCanvas" - } - ], - - "GemFormatVersion": 3, - "Uuid": "09f4bedeee614358bc36788e77f97e51", - "Name": "StartingPointInput", - "Version": "0.1.0", - "LinkType": "Dynamic", - "EditorModule": true, - "DisplayName": "Starting Point Input", - "Tags": ["Input","Starting Point"], - "Summary": "The Starting Point Input Gem builds on top of the AzFramework/Input system to map raw input into higher level gameplay events specified by the user.", - "IconPath": "preview.png" + "display_name": "Starting Point Input", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Starting Point Input Gem provides functionality to map low-level input events to high-level actions.", + "canonical_tags": ["Gem"], + "user_tags": ["Input", "Gameplay", "Scripting"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/StartingPointMovement/gem.json b/Gems/StartingPointMovement/gem.json index d34637b86c..cb4e8d0e6a 100644 --- a/Gems/StartingPointMovement/gem.json +++ b/Gems/StartingPointMovement/gem.json @@ -1,21 +1,12 @@ { "gem_name": "StartingPointMovement", - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - } - ], - "GemFormatVersion": 3, - "Uuid": "73d8779dc28a4123b7c9ed76217464af", - "Name": "StartingPointMovement", - "Version": "0.1.0", - "LinkType": "Dynamic", - "DisplayName": "Starting Point Movement [PREVIEW]", - "Summary": "The Starting Point Movement Gem includes a series of Lua scripts that listens for input events that then triggers a transform operation such as movement or rotation.", - "Tags": ["Movement", "Starting Point"], - "IconPath": "preview.png" + "display_name": "Starting Point Movement", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Starting Point Movement Gem provides a series of Lua scripts that listen and respond to input events and trigger transform operations such as translation and rotation.", + "canonical_tags": ["Gem"], + "user_tags": ["Input", "Gameplay", "Scripting"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/SurfaceData/gem.json b/Gems/SurfaceData/gem.json index fd39052219..1fb521ef58 100644 --- a/Gems/SurfaceData/gem.json +++ b/Gems/SurfaceData/gem.json @@ -1,30 +1,12 @@ { "gem_name": "SurfaceData", - "GemFormatVersion": 4, - "Uuid": "5de82d29d6094bfe97c1a4d35fcd5fbe", - "Name": "SurfaceData", - "DisplayName": "Surface Data [PREVIEW]", - "Version": "0.1.0", - "Summary": "A Lumberyard Gem that allows you to attach user-defined tags to surfaces and volumes, and fetch data like positions, normals, and tags for those surfaces.", - "Tags": ["Surface", "Geometry", "Tags"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ], - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - } - ] + "display_name": "Surface Data", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Surface Data Gem provides functionality to emit signals or tags from surfaces such as meshes and terrain.", + "canonical_tags": ["Gem"], + "user_tags": ["Environment", "Utiltiy", "Design"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/TestAssetBuilder/gem.json b/Gems/TestAssetBuilder/gem.json index 057a746be3..4c75343ebb 100644 --- a/Gems/TestAssetBuilder/gem.json +++ b/Gems/TestAssetBuilder/gem.json @@ -1,17 +1,12 @@ { "gem_name": "TestAssetBuilder", - "GemFormatVersion": 4, - "Uuid": "f5c92f1560714010ba30467d93feecef", - "Name": "TestAssetBuilder", - "DisplayName": "Test Asset Builder", - "Version": "0.1.0", - "Summary": "This builder is used for feature testing the asset processor.", - "Tags": ["Assets", "Pipeline", "Feature Test", "Asset Builder", "Asset Processor"], - "IconPath": "preview.png", - "Modules": [ - { - "Name": "Editor", - "Type": "EditorModule" - } - ] + "display_name": "Test Asset Builder", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Test Asset Builder Gem is used to feature test Asset Processor.", + "canonical_tags": ["Gem"], + "user_tags": ["Assets", "Debug", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/TextureAtlas/gem.json b/Gems/TextureAtlas/gem.json index 5b5e0e74df..1991ad387e 100644 --- a/Gems/TextureAtlas/gem.json +++ b/Gems/TextureAtlas/gem.json @@ -1,17 +1,12 @@ { "gem_name": "TextureAtlas", - "GemFormatVersion": 4, - "Uuid": "5a149b6b3c964064bd4970f0e92f72e2", - "Name": "TextureAtlas", - "DisplayName": "Texture Atlas", - "Version": "0.1.0", - "Summary": "Includes the formatting for Texture Atlases", - "Tags": ["Required", "Asset Processor Builder", "Texture Atlas"], - "IconPath": "preview.png", - "IsRequired": true, - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Texture Atlas", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Texture Atlas Gem provides the formatting for texture atlases from 2D textures for LyShine.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Assets", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/TickBusOrderViewer/gem.json b/Gems/TickBusOrderViewer/gem.json index b9f70e1045..787fd24abb 100644 --- a/Gems/TickBusOrderViewer/gem.json +++ b/Gems/TickBusOrderViewer/gem.json @@ -1,16 +1,12 @@ { "gem_name": "TickBusOrderViewer", - "GemFormatVersion": 4, - "Uuid": "937fc4d2b2a94291bdeea06261c501b3", - "Name": "TickBusOrderViewer", - "DisplayName": "Tick Bus Order Console Variable", - "Version": "1.0.0", - "Summary": "Provides the console variable, print_tickbus_handlers, which displays the order of all tick events to the console. If you specify an entityId, it will only display the tick events for that entity.", - "Tags": ["Console Variable", "CVAR"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Tick Bus Order Viewer", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The Tick Bus Order Viewer Gem provides a console variable that displays the order of runtime tick events.", + "canonical_tags": ["Gem"], + "user_tags": ["Gameplay", "Simulation", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Twitch/gem.json b/Gems/Twitch/gem.json index 3755226862..b5e2f3a3b2 100644 --- a/Gems/Twitch/gem.json +++ b/Gems/Twitch/gem.json @@ -1,19 +1,12 @@ { "gem_name": "Twitch", - "GemFormatVersion": 3, - "Uuid": "b63e64141fab40b791211ba257632e84", - "Name": "Twitch", - "DisplayName": "Twitch", - "Version": "1.0.0", - "LinkType": "Dynamic", - "Summary": "Provides access to the Twitch API v5 SDK including social functions, channels, and other APIs.", - "Tags": ["Twitch","SDK","Social"], - "IconPath": "preview.png", - "Dependencies": [ - { - "Uuid": "28479e255bde466e91fc34eec808d9c7", - "VersionConstraints": [ "~>1.0" ], - "_comment": "HttpRequestor" - } - ] + "display_name": "Twitch", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Twitch Gem provides access to the Twitch API v5 SDK including social functions, channels, and other APIs.", + "canonical_tags": ["Gem"], + "user_tags": ["Network", "SDK", "Multiplayer"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/UiBasics/gem.json b/Gems/UiBasics/gem.json index de814796cb..9cd1548f57 100644 --- a/Gems/UiBasics/gem.json +++ b/Gems/UiBasics/gem.json @@ -1,12 +1,12 @@ { "gem_name": "UiBasics", - "GemFormatVersion": 3, - "LinkType": "NoCode", - "Name": "UiBasics", - "DisplayName": "UI Basics", - "Summary": "Provides basic UI prefabs: image, text, button, and text input, as well as the textures that those prefabs require.", - "Uuid": "6bb61c9e547043f0afc5019d6d460b78", - "Version": "0.1.0", - "IconPath": "preview.png", - "Tags": ["UI", "Prefab", "Button", "Image"] + "display_name": "UI Basics", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Asset", + "summary": "The UI Basics Gem provides a collection of basic UI prefabs such as image, text, and button, that can be used with LyShine, the Open 3D Engine runtime User Interface system and editor.", + "canonical_tags": ["Gem"], + "user_tags": ["UI", "Assets", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/Vegetation/gem.json b/Gems/Vegetation/gem.json index 5bc744a94d..1796123014 100644 --- a/Gems/Vegetation/gem.json +++ b/Gems/Vegetation/gem.json @@ -1,44 +1,12 @@ { "gem_name": "Vegetation", - "Dependencies": [ - { - "Uuid": "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "LmbrCentral" - }, - { - "Uuid": "8825563d9d964ec3be3bab681f3bd9f2", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "GradientSignal" - }, - { - "Uuid": "5de82d29d6094bfe97c1a4d35fcd5fbe", - "VersionConstraints": [ - "~>0.1" - ], - "_comment": "SurfaceData" - } - ], - "GemFormatVersion": 4, - "Uuid": "f394e7cf54424bba89615381bba9511b", - "Name": "Vegetation", - "DisplayName": "Vegetation [PREVIEW]", - "Version": "0.1.0", - "Summary": "A Lumberyard Gem for authoring Dynamic Procedural Vegetation (A real-time planting engine).
NOTE: The Landscape Canvas gem is an optional node-based Editor that provides the recommended workflows for authoring/editing Dynamic Vegetation content.", - "Tags": ["Vegetation"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ] + "display_name": "Vegetation", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Vegetation Gem provides tools to place natural-looking vegetation in Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Environment", "Tools", "Design"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/VideoPlaybackFramework/gem.json b/Gems/VideoPlaybackFramework/gem.json index 3050863571..05598a8e5e 100644 --- a/Gems/VideoPlaybackFramework/gem.json +++ b/Gems/VideoPlaybackFramework/gem.json @@ -1,16 +1,12 @@ { "gem_name": "VideoPlaybackFramework", - "GemFormatVersion": 4, - "Uuid": "560d69cbaafd40bea8a09bccfe7f77e6", - "Name": "VideoPlaybackFramework", - "DisplayName": "Video Playback Framework", - "Version": "0.1.0", - "Summary": "The Video Playback Framework Gem provides the interface to play back video during gameplay. This gem is automatically enabled when selecting any of the Video Playback Gems.", - "Tags": ["Video"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Video Playback Framework", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Video Playback Framework Gem provides the interface to play back video.", + "canonical_tags": ["Gem"], + "user_tags": ["Rendering", "Framework"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/VirtualGamepad/gem.json b/Gems/VirtualGamepad/gem.json index 39e0e4e2f8..610f203f7c 100644 --- a/Gems/VirtualGamepad/gem.json +++ b/Gems/VirtualGamepad/gem.json @@ -1,16 +1,12 @@ { - "gem_name": "VirtualGampad", - "GemFormatVersion": 4, - "Uuid": "8aa9a66015804d6d9c809ce306e7d913", - "Name": "VirtualGamepad", - "DisplayName": "VirtualGamepad", - "Version": "0.1.0", - "Summary": "Example of a virtual gamepad that can be used by mobile devices with touch screens in place of a physical gamepad.", - "Tags": ["Input", "Mobile"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "gem_name": "VirtualGamepad", + "display_name": "Virtual Gamepad", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Code", + "summary": "The Virtual Gamepad Gem provides controls that emulate a gamepad on touch screen devices.", + "canonical_tags": ["Gem"], + "user_tags": ["Input", "Gameplay"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Gems/WhiteBox/gem.json b/Gems/WhiteBox/gem.json index de05a0d52b..a46434dd65 100644 --- a/Gems/WhiteBox/gem.json +++ b/Gems/WhiteBox/gem.json @@ -1,21 +1,12 @@ { "gem_name": "WhiteBox", - "GemFormatVersion": 4, - "Uuid": "c5833dbda2e045d3a5f16b7414280c27", - "Name": "WhiteBox", - "DisplayName": "White Box", - "Version": "0.1.0", - "Summary": "A tool for quickly prototyping levels in the editor.", - "Tags": ["Editor"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - }, - { - "Name": "Editor", - "Type": "EditorModule", - "Extends": "GameModule" - } - ] + "display_name": "White Box", + "license": "Apache-2.0 Or MIT", + "origin": "Open 3D Engine - o3de.org", + "type": "Tool", + "summary": "The White Box Gem provides White Box rapid design components for Open 3D Engine.", + "canonical_tags": ["Gem"], + "user_tags": ["Design", "Tools", "Utility"], + "icon_path": "preview.png", + "requirements": "" } diff --git a/Templates/AssetGem/Template/gem.json b/Templates/AssetGem/Template/gem.json index 5b8fb3fde0..2a688857f2 100644 --- a/Templates/AssetGem/Template/gem.json +++ b/Templates/AssetGem/Template/gem.json @@ -1,14 +1,17 @@ { "gem_name": "${Name}", - "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", "display_name": "${Name}", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "type": "Asset", "summary": "A short description of ${Name}.", "canonical_tags": [ "Gem" ], "user_tags": [ + "Assets", "${Name}" ], - "icon_path": "preview.png" + "icon_path": "preview.png", + "requirements": "" } diff --git a/Templates/DefaultGem/Template/gem.json b/Templates/DefaultGem/Template/gem.json index 5b8fb3fde0..353ad6bf8d 100644 --- a/Templates/DefaultGem/Template/gem.json +++ b/Templates/DefaultGem/Template/gem.json @@ -1,8 +1,9 @@ { "gem_name": "${Name}", - "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", "display_name": "${Name}", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "type": "Code", "summary": "A short description of ${Name}.", "canonical_tags": [ "Gem" @@ -10,5 +11,6 @@ "user_tags": [ "${Name}" ], - "icon_path": "preview.png" + "icon_path": "preview.png", + "requirements": "" } diff --git a/Templates/DefaultProject/Template/Code/gem.json b/Templates/DefaultProject/Template/Code/gem.json index 5b8fb3fde0..353ad6bf8d 100644 --- a/Templates/DefaultProject/Template/Code/gem.json +++ b/Templates/DefaultProject/Template/Code/gem.json @@ -1,8 +1,9 @@ { "gem_name": "${Name}", - "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", "display_name": "${Name}", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "type": "Code", "summary": "A short description of ${Name}.", "canonical_tags": [ "Gem" @@ -10,5 +11,6 @@ "user_tags": [ "${Name}" ], - "icon_path": "preview.png" + "icon_path": "preview.png", + "requirements": "" } diff --git a/Templates/MinimalProject/Template/Code/gem.json b/Templates/MinimalProject/Template/Code/gem.json index 5b8fb3fde0..353ad6bf8d 100644 --- a/Templates/MinimalProject/Template/Code/gem.json +++ b/Templates/MinimalProject/Template/Code/gem.json @@ -1,8 +1,9 @@ { "gem_name": "${Name}", - "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", "display_name": "${Name}", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "type": "Code", "summary": "A short description of ${Name}.", "canonical_tags": [ "Gem" @@ -10,5 +11,6 @@ "user_tags": [ "${Name}" ], - "icon_path": "preview.png" + "icon_path": "preview.png", + "requirements": "" } From 7aaf2659268f490cb1f9f86422436b418bc27275 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Wed, 7 Jul 2021 11:48:54 -0700 Subject: [PATCH 16/67] The Great ScriptCanvas Purge, Part IX Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../ScriptCanvasActions/GraphActions.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp index 97aa1667df..777dcdd1b6 100644 --- a/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp +++ b/Gems/ScriptCanvasDeveloper/Code/Editor/Source/EditorAutomation/EditorAutomationActions/ScriptCanvasActions/GraphActions.cpp @@ -127,19 +127,6 @@ namespace ScriptCanvasDeveloper { return AZ::Failure("Active graph is not the newly created function."); } - else - { - ScriptCanvas::ScriptCanvasId scriptCanvasId; - ScriptCanvasEditor::GeneralRequestBus::BroadcastResult(scriptCanvasId, &ScriptCanvasEditor::GeneralRequests::GetScriptCanvasId, activeGraphCanvasId); - - bool isFunctionGraph = false; - ScriptCanvasEditor::EditorGraphRequestBus::EventResult(isFunctionGraph, scriptCanvasId, &ScriptCanvasEditor::EditorGraphRequests::IsFunctionGraph); - - if (!isFunctionGraph) - { - return AZ::Failure("Created a new Graph, but graph is not of type Function."); - } - } } return CompoundAction::GenerateReport(); From da529edfb571d0f394874b76e94f5149d4aae5d0 Mon Sep 17 00:00:00 2001 From: nvsickle Date: Mon, 21 Jun 2021 20:54:57 -0700 Subject: [PATCH 17/67] Fix ImGui not rendering correctly at resolutions greater than 1080p Signed-off-by: nvsickle --- Gems/ImGui/Code/Source/ImGuiManager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/ImGui/Code/Source/ImGuiManager.h b/Gems/ImGui/Code/Source/ImGuiManager.h index acd8d7cea4..0df1b25b40 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.h +++ b/Gems/ImGui/Code/Source/ImGuiManager.h @@ -82,7 +82,7 @@ namespace ImGui DisplayState m_editorWindowState = DisplayState::Hidden; // ImGui Resolution Settings - ImGuiResolutionMode m_resolutionMode = ImGuiResolutionMode::MatchToMaxRenderResolution; + ImGuiResolutionMode m_resolutionMode = ImGuiResolutionMode::MatchRenderResolution; ImVec2 m_renderResolution = ImVec2(1920.0f, 1080.0f); ImVec2 m_lastRenderResolution; AzFramework::WindowSize m_windowSize = AzFramework::WindowSize(1920, 1080); From 6b76eceb1f665aee7a7649369229b8f7a80ff6b8 Mon Sep 17 00:00:00 2001 From: nvsickle Date: Mon, 21 Jun 2021 20:56:40 -0700 Subject: [PATCH 18/67] Add GetDpiScaleFactor to native window API -This includes implementations of the API for the Editor and Windows, all other platforms will have a 1.0 scale for now Signed-off-by: nvsickle --- Code/Editor/RenderViewport.h | 1 + .../AzFramework/Application/Application.cpp | 2 ++ .../AzFramework/Windowing/NativeWindow.cpp | 11 +++++++ .../AzFramework/Windowing/NativeWindow.h | 2 ++ .../AzFramework/Windowing/WindowBus.h | 8 +++++ .../Windowing/NativeWindow_Windows.cpp | 32 ++++++++++++++++++- .../Include/Atom/RPI.Public/ViewportContext.h | 11 ++++++- .../Source/RPI.Public/ViewportContext.cpp | 15 +++++++++ .../Viewport/RenderViewportWidget.h | 1 + .../Source/Viewport/RenderViewportWidget.cpp | 5 +++ 10 files changed, 86 insertions(+), 2 deletions(-) diff --git a/Code/Editor/RenderViewport.h b/Code/Editor/RenderViewport.h index 1764028dd6..2a67e1bbc6 100644 --- a/Code/Editor/RenderViewport.h +++ b/Code/Editor/RenderViewport.h @@ -219,6 +219,7 @@ public: void SetFullScreenState(bool fullScreenState) override; bool CanToggleFullScreenState() const override; void ToggleFullScreenState() override; + float GetDpiScaleFactor() const override { return 1.0f; }; void ConnectViewportInteractionRequestBus(); void DisconnectViewportInteractionRequestBus(); diff --git a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp index 07f4865863..81c5a86cda 100644 --- a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp +++ b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp @@ -731,10 +731,12 @@ namespace AzFramework bool Application::IsPrefabSystemEnabled() const { bool value = true; + /* if (auto* registry = AZ::SettingsRegistry::Get()) { registry->Get(value, ApplicationInternal::s_prefabSystemKey); } + */ return value; } diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp index b92d8dc3bc..3e7d67888f 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp +++ b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.cpp @@ -116,6 +116,11 @@ namespace AzFramework SetFullScreenState(!GetFullScreenState()); } + float NativeWindow::GetDpiScaleFactor() const + { + return m_pimpl->GetDpiScaleFactor(); + } + /*static*/ bool NativeWindow::GetFullScreenStateOfDefaultWindow() { NativeWindowHandle defaultWindowHandle = nullptr; @@ -228,4 +233,10 @@ namespace AzFramework return false; } + float NativeWindow::Implementation::GetDpiScaleFactor() const + { + // For platforms that aren't DPI-aware, we simply return a 1.0 ratio for no scaling + return 1.0f; + } + } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h index 0b53b5b31c..2d5a897146 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h +++ b/Code/Framework/AzFramework/AzFramework/Windowing/NativeWindow.h @@ -128,6 +128,7 @@ namespace AzFramework void SetFullScreenState(bool fullScreenState) override; bool CanToggleFullScreenState() const override; void ToggleFullScreenState() override; + float GetDpiScaleFactor() const override; //! Get the full screen state of the default window. //! \return True if the default window is currently in full screen, false otherwise. @@ -169,6 +170,7 @@ namespace AzFramework virtual bool GetFullScreenState() const; virtual void SetFullScreenState(bool fullScreenState); virtual bool CanToggleFullScreenState() const; + virtual float GetDpiScaleFactor() const; protected: uint32_t m_width = 0; diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h b/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h index 959d7cc07b..8627e06ec8 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h +++ b/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h @@ -68,6 +68,11 @@ namespace AzFramework //! Toggle the full screen state of the window. virtual void ToggleFullScreenState() = 0; + + //! Returns a scalar multiplier representing how dots-per-inch this window has, compared + //! to a "standard" value of 96, the default for Windows in a DPI unaware setting. This can + //! be used to scale user interface elements to ensure legibility on high density displays. + virtual float GetDpiScaleFactor() const = 0; }; using WindowRequestBus = AZ::EBus; @@ -87,6 +92,9 @@ namespace AzFramework //! This is called once when the window is Activated and also called if the user resizes the window. virtual void OnWindowResized(uint32_t width, uint32_t height) { AZ_UNUSED(width); AZ_UNUSED(height); }; + //! This is called if the window's underyling DPI scaling factor changes. + virtual void OnDpiScaleFactorChanged(float dpiScaleFactor) { AZ_UNUSED(dpiScaleFactor); } + //! This is called when the window is deactivated from code or if the user closes the window. virtual void OnWindowClosed() {}; }; diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp index 44a3757aea..6f9bf2cf1e 100644 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp +++ b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp @@ -17,7 +17,7 @@ namespace AzFramework { public: AZ_CLASS_ALLOCATOR(NativeWindowImpl_Win32, AZ::SystemAllocator, 0); - NativeWindowImpl_Win32() = default; + NativeWindowImpl_Win32(); ~NativeWindowImpl_Win32() override; // NativeWindow::Implementation overrides... @@ -33,6 +33,7 @@ namespace AzFramework bool GetFullScreenState() const override; void SetFullScreenState(bool fullScreenState) override; bool CanToggleFullScreenState() const override { return true; } + float GetDpiScaleFactor() const override; private: static DWORD ConvertToWin32WindowStyleMask(const WindowStyleMasks& styleMasks); @@ -49,6 +50,9 @@ namespace AzFramework RECT m_windowRectToRestoreOnFullScreenExit; //!< The position and size of the window to restore when exiting full screen. UINT m_windowStyleToRestoreOnFullScreenExit; //!< The style(s) of the window to restore when exiting full screen. bool m_isInBorderlessWindowFullScreenState = false; //!< Was a borderless window used to enter full screen state? + + using GetDpiForWindowType = UINT(HWND hwnd); + GetDpiForWindowType* m_getDpiFunction = nullptr; }; const char* NativeWindowImpl_Win32::s_defaultClassName = "O3DEWin32Class"; @@ -58,6 +62,16 @@ namespace AzFramework return aznew NativeWindowImpl_Win32(); } + NativeWindowImpl_Win32::NativeWindowImpl_Win32() + { + // Attempt to load GetDpiForWindow from user32 at runtime, available on Windows 10+ versions >= 1607 + auto user32module = LoadLibraryA("user32.dll"); + if (user32module) + { + m_getDpiFunction = reinterpret_cast(GetProcAddress(user32module, "GetDpiForWindow")); + } + } + NativeWindowImpl_Win32::~NativeWindowImpl_Win32() { DestroyWindow(m_win32Handle); @@ -237,6 +251,11 @@ namespace AzFramework // Send all other WM_SYSKEYDOWN messages to the default WndProc. break; } + case WM_DPICHANGED: + { + const float newScaleFactor = nativeWindowImpl->GetDpiScaleFactor(); + WindowNotificationBus::Event(nativeWindowImpl->GetWindowHandle(), &WindowNotificationBus::Events::OnDpiScaleFactorChanged, newScaleFactor); + } default: return DefWindowProc(hWnd, message, wParam, lParam); break; @@ -330,6 +349,17 @@ namespace AzFramework } } + float NativeWindowImpl_Win32::GetDpiScaleFactor() const + { + constexpr UINT defaultDotsPerInch = 96; + UINT dotsPerInch = defaultDotsPerInch; + if (m_getDpiFunction) + { + dotsPerInch = m_getDpiFunction(m_win32Handle); + } + return aznumeric_cast(dotsPerInch) / aznumeric_cast(defaultDotsPerInch); + } + void NativeWindowImpl_Win32::EnterBorderlessWindowFullScreen() { if (m_isInBorderlessWindowFullScreenState) diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h index 982ef498a0..17e6714132 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h @@ -65,8 +65,14 @@ namespace AZ ConstViewPtr GetDefaultView() const; //! Gets the current size of the viewport. + //! This value is cached and updated on-demand, so may be performantly queried. AzFramework::WindowSize GetViewportSize() const; + //! Gets the screen DPI scaling factor. + //! This value is cached and updated on-demand, so may be performantly queried. + //! \see AzFramework::WindowRequests::GetDpiScaleFactor + float GetDpiScalingFactor() const; + // SceneNotificationBus interface //! Ensures our default view remains set when our scene's render pipelines are modified. void OnRenderPipelineAdded(RenderPipelinePtr pipeline) override; @@ -76,8 +82,10 @@ namespace AZ void OnBeginPrepareRender() override; //WindowNotificationBus interface - //! Used to fire a notification when our window resizes + //! Used to fire a notification when our window resizes. void OnWindowResized(uint32_t width, uint32_t height) override; + //! Used to fire a notification when our window DPI changes. + void OnDpiScaleFactorChanged(float dpiScaleFactor) override; using SizeChangedEvent = AZ::Event; //! Notifies consumers when the viewport size has changed. @@ -130,6 +138,7 @@ namespace AZ WindowContextSharedPtr m_windowContext; ViewPtr m_defaultView; AzFramework::WindowSize m_viewportSize; + float m_viewportDpiScaleFactor = 1.0f; SizeChangedEvent m_sizeChangedEvent; MatrixChangedEvent m_viewMatrixChangedEvent; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp index 23d5805c12..ae2a72ae89 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp @@ -10,6 +10,7 @@ #include #include #include +#include "..\..\Include\Atom\RPI.Public\ViewportContext.h" namespace AZ { @@ -28,6 +29,10 @@ namespace AZ m_viewportSize, nativeWindow, &AzFramework::WindowRequestBus::Events::GetClientAreaSize); + AzFramework::WindowRequestBus::EventResult( + m_viewportDpiScaleFactor, + nativeWindow, + &AzFramework::WindowRequestBus::Events::GetDpiScaleFactor); AzFramework::WindowNotificationBus::Handler::BusConnect(nativeWindow); AzFramework::ViewportRequestBus::Handler::BusConnect(id); @@ -148,6 +153,11 @@ namespace AZ return m_viewportSize; } + float ViewportContext::GetDpiScalingFactor() const + { + return m_viewportDpiScaleFactor; + } + void ViewportContext::ConnectSizeChangedHandler(SizeChangedEvent::Handler& handler) { handler.Connect(m_sizeChangedEvent); @@ -289,5 +299,10 @@ namespace AZ m_sizeChangedEvent.Signal(m_viewportSize); } } + + void ViewportContext::OnDpiScaleFactorChanged(float dpiScaleFactor) + { + m_viewportDpiScaleFactor = dpiScaleFactor; + } } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h index c649031280..10dcc6c5c9 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h @@ -113,6 +113,7 @@ namespace AtomToolsFramework void SetFullScreenState(bool fullScreenState) override; bool CanToggleFullScreenState() const override; void ToggleFullScreenState() override; + float GetDpiScaleFactor() const override; protected: // AzFramework::InputChannelEventListener ... diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index 529652e1a9..b12996442a 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -540,4 +540,9 @@ namespace AtomToolsFramework { // The RenderViewportWidget does not currently support full screen. } + + float RenderViewportWidget::GetDpiScaleFactor() const + { + return aznumeric_cast(devicePixelRatioF()); + } } //namespace AtomToolsFramework From b328cdf11d5f4a705edafea88b10ecddc66f26ab Mon Sep 17 00:00:00 2001 From: nvsickle Date: Mon, 21 Jun 2021 20:57:23 -0700 Subject: [PATCH 19/67] Make the launcher's lack of DPI awareness on Windows explicit This will enable per-screen DPI awareness to be turned on later Signed-off-by: nvsickle --- Code/LauncherUnified/launcher_generator.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Code/LauncherUnified/launcher_generator.cmake b/Code/LauncherUnified/launcher_generator.cmake index 85976e1cb9..628b5fffac 100644 --- a/Code/LauncherUnified/launcher_generator.cmake +++ b/Code/LauncherUnified/launcher_generator.cmake @@ -122,6 +122,8 @@ foreach(project_name project_path IN ZIP_LISTS LY_PROJECTS_TARGET_NAME LY_PROJEC FOLDER ${project_name} ) + # After ensuring that we correctly support DPI scaling, this should be switched to "PerMonitor" + set_property(TARGET ${project_name}.GameLauncher APPEND PROPERTY VS_DPI_AWARE "OFF") if(LY_DEFAULT_PROJECT_PATH) set_property(TARGET ${project_name}.GameLauncher APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"") endif() From 9e4d6a1d85ae86cd7b11831ae83db5f209080c9c Mon Sep 17 00:00:00 2001 From: nvsickle Date: Mon, 21 Jun 2021 20:58:00 -0700 Subject: [PATCH 20/67] Scale the viewport debug info overlay by the DPI scale factor Signed-off-by: nvsickle --- .../Code/Source/AtomViewportDisplayInfoSystemComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp index 5b14fbebb9..2a618518f0 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp @@ -157,7 +157,7 @@ namespace AZ::Render auto viewportSize = viewportContext->GetViewportSize(); m_drawParams.m_position = AZ::Vector3(viewportSize.m_width, 0.0f, 1.0f) + AZ::Vector3(r_topRightBorderPadding); m_drawParams.m_color = AZ::Colors::White; - m_drawParams.m_scale = AZ::Vector2(0.7f); + m_drawParams.m_scale = AZ::Vector2(0.7f * viewportContext->GetDpiScalingFactor()); m_drawParams.m_hAlign = AzFramework::TextHorizontalAlignment::Right; m_drawParams.m_monospace = false; m_drawParams.m_depthTest = false; From 0c97888d0f54d142eb7c49134b703029f6ff37bf Mon Sep 17 00:00:00 2001 From: nvsickle Date: Mon, 21 Jun 2021 21:00:42 -0700 Subject: [PATCH 21/67] Revert accidental change Signed-off-by: nvsickle --- .../AzFramework/AzFramework/Application/Application.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp index 81c5a86cda..07f4865863 100644 --- a/Code/Framework/AzFramework/AzFramework/Application/Application.cpp +++ b/Code/Framework/AzFramework/AzFramework/Application/Application.cpp @@ -731,12 +731,10 @@ namespace AzFramework bool Application::IsPrefabSystemEnabled() const { bool value = true; - /* if (auto* registry = AZ::SettingsRegistry::Get()) { registry->Get(value, ApplicationInternal::s_prefabSystemKey); } - */ return value; } From dd20a598b25bb62132c126dabe9a14a056f8b685 Mon Sep 17 00:00:00 2001 From: nvsickle Date: Mon, 21 Jun 2021 22:15:39 -0700 Subject: [PATCH 22/67] Add DPI scaling to IMGUI Signed-off-by: nvsickle --- .../Code/Include/Atom/RPI.Public/ViewportContext.h | 6 ++++++ .../Include/Atom/RPI.Public/ViewportContextBus.h | 4 +++- .../Atom/RPI.Public/ViewportContextManager.h | 1 + .../RPI/Code/Source/RPI.Public/ViewportContext.cpp | 6 ++++++ .../Source/RPI.Public/ViewportContextManager.cpp | 12 ++++++++++++ .../Code/Source/ImguiAtomSystemComponent.cpp | 12 +++++++++++- .../Code/Source/ImguiAtomSystemComponent.h | 1 + Gems/ImGui/Code/Include/ImGuiBus.h | 2 ++ Gems/ImGui/Code/Source/ImGuiManager.cpp | 14 ++++++++++++++ Gems/ImGui/Code/Source/ImGuiManager.h | 2 ++ 10 files changed, 58 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h index 17e6714132..3840b2b75c 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h @@ -92,6 +92,11 @@ namespace AZ //! Alternatively, connect to ViewportContextNotificationsBus and listen to ViewportContextNotifications::OnViewportSizeChanged. void ConnectSizeChangedHandler(SizeChangedEvent::Handler& handler); + using ScalarChangedEvent = AZ::Event; + //! Notifies consumers when the viewport DPI scaling ratio has changed. + //! Alternatively, connect to ViewportContextNotificationsBus and listen to ViewportContextNotifications::OnViewportDpiScalingChanged. + void ConnectDpiScalingFactorChangedHandler(ScalarChangedEvent::Handler& handler); + using MatrixChangedEvent = AZ::Event; //! Notifies consumers when the view matrix has changed. void ConnectViewMatrixChangedHandler(MatrixChangedEvent::Handler& handler); @@ -141,6 +146,7 @@ namespace AZ float m_viewportDpiScaleFactor = 1.0f; SizeChangedEvent m_sizeChangedEvent; + ScalarChangedEvent m_dpiScalingFactorChangedEvent; MatrixChangedEvent m_viewMatrixChangedEvent; MatrixChangedEvent::Handler m_onViewMatrixChangedHandler; MatrixChangedEvent m_projectionMatrixChangedEvent; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h index da0c850f3d..152c8cf2c1 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h @@ -105,8 +105,10 @@ namespace AZ class ViewportContextNotifications { public: - //! Called when the underlying native window size changes for a given viewport context name. + //! Called when the underlying native window size changes for a given viewport context. virtual void OnViewportSizeChanged(AzFramework::WindowSize size){AZ_UNUSED(size);} + //! Called when the window DPI scaling changes for a given viewport context. + virtual void OnViewportDpiScalingChanged(float dpiScale){AZ_UNUSED(dpiScale);} //! Called when the active view for a given viewport context name changes. virtual void OnViewportDefaultViewChanged(AZ::RPI::ViewPtr view){AZ_UNUSED(view);} //! Called when the viewport is to be rendered. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h index 008565d178..e50525cff0 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h @@ -51,6 +51,7 @@ namespace AZ { AZStd::weak_ptr context; ViewportContext::SizeChangedEvent::Handler sizeChangedHandler; + ViewportContext::ScalarChangedEvent::Handler dpiScalingChangedHandler; }; // ViewportContextManager is a singleton owned solely by RPISystem, which is tagged as a friend diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp index ae2a72ae89..a37d9f3c00 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp @@ -163,6 +163,11 @@ namespace AZ handler.Connect(m_sizeChangedEvent); } + void ViewportContext::ConnectDpiScalingFactorChangedHandler(ScalarChangedEvent::Handler& handler) + { + handler.Connect(m_dpiScalingFactorChangedEvent); + } + void ViewportContext::ConnectViewMatrixChangedHandler(MatrixChangedEvent::Handler& handler) { handler.Connect(m_viewMatrixChangedEvent); @@ -303,6 +308,7 @@ namespace AZ void ViewportContext::OnDpiScaleFactorChanged(float dpiScaleFactor) { m_viewportDpiScaleFactor = dpiScaleFactor; + m_dpiScalingFactorChangedEvent.Signal(dpiScaleFactor); } } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp index 552304557f..ebf45f36f7 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp @@ -62,9 +62,20 @@ namespace AZ } ViewportContextIdNotificationBus::Event(viewportId, &ViewportContextIdNotificationBus::Events::OnViewportSizeChanged, size); }; + auto onDpiScalingChanged = [this, viewportId](float dpiScalingFactor) + { + // Ensure we emit OnViewportDpiScalingChanged with the correct name. + auto viewportContext = this->GetViewportContextById(viewportId); + if (viewportContext) + { + ViewportContextNotificationBus::Event(viewportContext->GetName(), &ViewportContextNotificationBus::Events::OnViewportDpiScalingChanged, dpiScalingFactor); + } + ViewportContextIdNotificationBus::Event(viewportId, &ViewportContextIdNotificationBus::Events::OnViewportDpiScalingChanged, dpiScalingFactor); + }; viewportContext->m_name = contextName; viewportData.sizeChangedHandler = ViewportContext::SizeChangedEvent::Handler(onSizeChanged); viewportContext->ConnectSizeChangedHandler(viewportData.sizeChangedHandler); + viewportContext->ConnectDpiScalingFactorChangedHandler(viewportData.dpiScalingChangedHandler); ViewPtrStack& associatedViews = GetOrCreateViewStackForContext(contextName); viewportContext->SetDefaultView(associatedViews.back()); onSizeChanged(viewportContext->GetViewportSize()); @@ -176,6 +187,7 @@ namespace AZ UpdateViewForContext(newContextName); // Ensure anyone listening on per-name viewport size updates gets notified. ViewportContextNotificationBus::Event(newContextName, &ViewportContextNotificationBus::Events::OnViewportSizeChanged, viewportContext->GetViewportSize()); + ViewportContextNotificationBus::Event(newContextName, &ViewportContextNotificationBus::Events::OnViewportDpiScalingChanged, viewportContext->GetDpiScalingFactor()); } void ViewportContextManager::EnumerateViewportContexts(AZStd::function visitorFunction) diff --git a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp index fd41ff45a5..d2c4748670 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp +++ b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp @@ -105,10 +105,20 @@ namespace AZ // Let our ImguiAtomSystemComponent know once we successfully connect and update the viewport size. if (!m_initialized) { + auto atomViewportRequests = AZ::Interface::Get(); + auto defaultViewportContext = atomViewportRequests->GetDefaultViewportContext(); + OnViewportDpiScalingChanged(defaultViewportContext->GetDpiScalingFactor()); m_initialized = true; } }); -#endif +#endif //define(IMGUI_ENABLED) + } + + void ImguiAtomSystemComponent::OnViewportDpiScalingChanged(float dpiScale) + { +#if defined(IMGUI_ENABLED) + ImGui::ImGuiManagerBus::Broadcast(&ImGui::ImGuiManagerBus::Events::SetDpiScalingFactor, dpiScale); +#endif //define(IMGUI_ENABLED) } } } diff --git a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h index e487c9a39a..a0ff1a5dd9 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h +++ b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.h @@ -51,6 +51,7 @@ namespace AZ // ViewportContextNotificationBus overrides... void OnRenderTick() override; void OnViewportSizeChanged(AzFramework::WindowSize size) override; + void OnViewportDpiScalingChanged(float dpiScale) override; DebugConsole m_debugConsole; bool m_initialized = false; diff --git a/Gems/ImGui/Code/Include/ImGuiBus.h b/Gems/ImGui/Code/Include/ImGuiBus.h index cee9f3882d..ea7fe1631e 100644 --- a/Gems/ImGui/Code/Include/ImGuiBus.h +++ b/Gems/ImGui/Code/Include/ImGuiBus.h @@ -86,6 +86,8 @@ namespace ImGui virtual void SetImGuiRenderResolution(const ImVec2& res) = 0; virtual void OverrideRenderWindowSize(uint32_t width, uint32_t height) = 0; virtual void RestoreRenderWindowSizeToDefault() = 0; + virtual void SetDpiScalingFactor(float dpiScalingFactor) = 0; + virtual float GetDpiScalingFactor() const = 0; virtual void Render() = 0; }; diff --git a/Gems/ImGui/Code/Source/ImGuiManager.cpp b/Gems/ImGui/Code/Source/ImGuiManager.cpp index 7e936bb1f9..42c8d3929c 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.cpp +++ b/Gems/ImGui/Code/Source/ImGuiManager.cpp @@ -277,6 +277,20 @@ void ImGui::ImGuiManager::RestoreRenderWindowSizeToDefault() InitWindowSize(); } +void ImGui::ImGuiManager::SetDpiScalingFactor(float dpiScalingFactor) +{ + ImGuiIO& io = ImGui::GetIO(); + // Set the global font scale to size our UI to the scaling factor + // Note: Currently we use the default, 13px fixed-size IMGUI font, so this can get somewhat blurry + io.FontGlobalScale = dpiScalingFactor; +} + +float ImGui::ImGuiManager::GetDpiScalingFactor() const +{ + ImGuiIO& io = ImGui::GetIO(); + return io.FontGlobalScale; +} + void ImGuiManager::Render() { if (m_clientMenuBarState == DisplayState::Hidden && m_editorWindowState == DisplayState::Hidden) diff --git a/Gems/ImGui/Code/Source/ImGuiManager.h b/Gems/ImGui/Code/Source/ImGuiManager.h index 0df1b25b40..1509f27c57 100644 --- a/Gems/ImGui/Code/Source/ImGuiManager.h +++ b/Gems/ImGui/Code/Source/ImGuiManager.h @@ -57,6 +57,8 @@ namespace ImGui void SetImGuiRenderResolution(const ImVec2& res) override { m_renderResolution = res; } void OverrideRenderWindowSize(uint32_t width, uint32_t height) override; void RestoreRenderWindowSizeToDefault() override; + void SetDpiScalingFactor(float dpiScalingFactor) override; + float GetDpiScalingFactor() const override; void Render() override; // -- ImGuiManagerBus Interface ------------------------------------------------------------------- From 21dbe8b48fab1bc212363adff4edcd8c0668818c Mon Sep 17 00:00:00 2001 From: nvsickle Date: Tue, 22 Jun 2021 10:35:47 -0700 Subject: [PATCH 23/67] Address review feedback Signed-off-by: nvsickle --- .../AzFramework/AzFramework/Windowing/WindowBus.h | 2 +- .../AzFramework/Windowing/NativeWindow_Windows.cpp | 4 ++-- .../RPI/Code/Include/Atom/RPI.Public/ViewportContext.h | 10 +++++----- .../RPI/Code/Source/RPI.Public/ViewportContext.cpp | 1 - .../Code/Source/RPI.Public/ViewportContextManager.cpp | 4 ++-- .../Source/AtomViewportDisplayInfoSystemComponent.cpp | 2 +- .../Source/AtomViewportDisplayInfoSystemComponent.h | 2 ++ .../ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp | 5 +++-- 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h b/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h index 8627e06ec8..f21993b80a 100644 --- a/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h +++ b/Code/Framework/AzFramework/AzFramework/Windowing/WindowBus.h @@ -69,7 +69,7 @@ namespace AzFramework //! Toggle the full screen state of the window. virtual void ToggleFullScreenState() = 0; - //! Returns a scalar multiplier representing how dots-per-inch this window has, compared + //! Returns a scalar multiplier representing how many dots-per-inch this window has, compared //! to a "standard" value of 96, the default for Windows in a DPI unaware setting. This can //! be used to scale user interface elements to ensure legibility on high density displays. virtual float GetDpiScaleFactor() const = 0; diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp index 6f9bf2cf1e..8d3a3e53f0 100644 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp +++ b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp @@ -65,8 +65,7 @@ namespace AzFramework NativeWindowImpl_Win32::NativeWindowImpl_Win32() { // Attempt to load GetDpiForWindow from user32 at runtime, available on Windows 10+ versions >= 1607 - auto user32module = LoadLibraryA("user32.dll"); - if (user32module) + if (auto user32module = LoadLibraryA("user32.dll")) { m_getDpiFunction = reinterpret_cast(GetProcAddress(user32module, "GetDpiForWindow")); } @@ -255,6 +254,7 @@ namespace AzFramework { const float newScaleFactor = nativeWindowImpl->GetDpiScaleFactor(); WindowNotificationBus::Event(nativeWindowImpl->GetWindowHandle(), &WindowNotificationBus::Events::OnDpiScaleFactorChanged, newScaleFactor); + break; } default: return DefWindowProc(hWnd, message, wParam, lParam); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h index 3840b2b75c..92e50be75e 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContext.h @@ -65,15 +65,15 @@ namespace AZ ConstViewPtr GetDefaultView() const; //! Gets the current size of the viewport. - //! This value is cached and updated on-demand, so may be performantly queried. + //! This value is cached and updated on-demand, so may be efficiently queried. AzFramework::WindowSize GetViewportSize() const; //! Gets the screen DPI scaling factor. - //! This value is cached and updated on-demand, so may be performantly queried. + //! This value is cached and updated on-demand, so may be efficiently queried. //! \see AzFramework::WindowRequests::GetDpiScaleFactor float GetDpiScalingFactor() const; - // SceneNotificationBus interface + // SceneNotificationBus interface overrides... //! Ensures our default view remains set when our scene's render pipelines are modified. void OnRenderPipelineAdded(RenderPipelinePtr pipeline) override; //! Ensures our default view remains set when our scene's render pipelines are modified. @@ -81,7 +81,7 @@ namespace AZ //! OnBeginPrepareRender is forwarded to our RenderTick notification to allow subscribers to do rendering. void OnBeginPrepareRender() override; - //WindowNotificationBus interface + // WindowNotificationBus interface overrides... //! Used to fire a notification when our window resizes. void OnWindowResized(uint32_t width, uint32_t height) override; //! Used to fire a notification when our window DPI changes. @@ -119,7 +119,7 @@ namespace AZ //! Notifies consumers when this ViewportContext is about to be destroyed. void ConnectAboutToBeDestroyedHandler(ViewportIdEvent::Handler& handler); - // ViewportRequestBus interface + // ViewportRequestBus interface overrides... //! Gets the current camera's view matrix. const AZ::Matrix4x4& GetCameraViewMatrix() const override; //! Sets the current camera's view matrix. diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp index a37d9f3c00..eacdbe0293 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContext.cpp @@ -10,7 +10,6 @@ #include #include #include -#include "..\..\Include\Atom\RPI.Public\ViewportContext.h" namespace AZ { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp index ebf45f36f7..2d9e1c586a 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp @@ -55,7 +55,7 @@ namespace AZ auto onSizeChanged = [this, viewportId](AzFramework::WindowSize size) { // Ensure we emit OnViewportSizeChanged with the correct name. - auto viewportContext = this->GetViewportContextById(viewportId); + auto viewportContext = GetViewportContextById(viewportId); if (viewportContext) { ViewportContextNotificationBus::Event(viewportContext->GetName(), &ViewportContextNotificationBus::Events::OnViewportSizeChanged, size); @@ -65,7 +65,7 @@ namespace AZ auto onDpiScalingChanged = [this, viewportId](float dpiScalingFactor) { // Ensure we emit OnViewportDpiScalingChanged with the correct name. - auto viewportContext = this->GetViewportContextById(viewportId); + auto viewportContext = GetViewportContextById(viewportId); if (viewportContext) { ViewportContextNotificationBus::Event(viewportContext->GetName(), &ViewportContextNotificationBus::Events::OnViewportDpiScalingChanged, dpiScalingFactor); diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp index 2a618518f0..9fba4b9c09 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp @@ -157,7 +157,7 @@ namespace AZ::Render auto viewportSize = viewportContext->GetViewportSize(); m_drawParams.m_position = AZ::Vector3(viewportSize.m_width, 0.0f, 1.0f) + AZ::Vector3(r_topRightBorderPadding); m_drawParams.m_color = AZ::Colors::White; - m_drawParams.m_scale = AZ::Vector2(0.7f * viewportContext->GetDpiScalingFactor()); + m_drawParams.m_scale = AZ::Vector2(BaseFontSize * viewportContext->GetDpiScalingFactor()); m_drawParams.m_hAlign = AzFramework::TextHorizontalAlignment::Right; m_drawParams.m_monospace = false; m_drawParams.m_depthTest = false; diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.h b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.h index 13f42dd638..cec6cd958c 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.h +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.h @@ -60,6 +60,8 @@ namespace AZ void DrawPassInfo(); void DrawFramerate(); + static constexpr float BaseFontSize = 0.7f; + AZStd::string m_rendererDescription; AzFramework::TextDrawParameters m_drawParams; AzFramework::FontDrawInterface* m_fontDrawInterface = nullptr; diff --git a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp index d2c4748670..843f30fced 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp +++ b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp @@ -50,7 +50,8 @@ namespace AZ { ImGui::OtherActiveImGuiRequestBus::Handler::BusConnect(); - auto atomViewportRequests = AZ::Interface::Get(); + auto atomViewportRequests = AZ::RPI::ViewportContextRequests::Get(); + AZ_Assert(atomViewportRequests, "AtomViewportContextRequests interface not found!"); const AZ::Name contextName = atomViewportRequests->GetDefaultViewportContextName(); AZ::RPI::ViewportContextNotificationBus::Handler::BusConnect(contextName); @@ -105,7 +106,7 @@ namespace AZ // Let our ImguiAtomSystemComponent know once we successfully connect and update the viewport size. if (!m_initialized) { - auto atomViewportRequests = AZ::Interface::Get(); + auto atomViewportRequests = AZ::RPI::ViewportContextRequests::Get(); auto defaultViewportContext = atomViewportRequests->GetDefaultViewportContext(); OnViewportDpiScalingChanged(defaultViewportContext->GetDpiScalingFactor()); m_initialized = true; From 2fefa809376d57539c511761707cff41f8d2a570 Mon Sep 17 00:00:00 2001 From: nvsickle Date: Tue, 22 Jun 2021 11:41:25 -0700 Subject: [PATCH 24/67] Use AZ::DynamicModuleHandle Signed-off-by: nvsickle --- .../Windows/AzFramework/Windowing/NativeWindow_Windows.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp index 8d3a3e53f0..470594853c 100644 --- a/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp +++ b/Code/Framework/AzFramework/Platform/Windows/AzFramework/Windowing/NativeWindow_Windows.cpp @@ -8,6 +8,7 @@ #include #include +#include #include namespace AzFramework @@ -65,9 +66,9 @@ namespace AzFramework NativeWindowImpl_Win32::NativeWindowImpl_Win32() { // Attempt to load GetDpiForWindow from user32 at runtime, available on Windows 10+ versions >= 1607 - if (auto user32module = LoadLibraryA("user32.dll")) + if (auto user32module = AZ::DynamicModuleHandle::Create("user32"); user32module->Load(false)) { - m_getDpiFunction = reinterpret_cast(GetProcAddress(user32module, "GetDpiForWindow")); + m_getDpiFunction = user32module->GetFunction("GetDpiForWindow"); } } From 0b3dab1cf845c6f1ffb2a0f93650d4f072a145ea Mon Sep 17 00:00:00 2001 From: nvsickle Date: Mon, 28 Jun 2021 10:56:14 -0700 Subject: [PATCH 25/67] Use DPI scaling for viewport info padding Signed-off-by: nvsickle --- .../Code/Source/AtomViewportDisplayInfoSystemComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp index 9fba4b9c09..af9fd7fdd8 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp @@ -155,7 +155,7 @@ namespace AZ::Render m_drawParams.m_drawViewportId = viewportContext->GetId(); auto viewportSize = viewportContext->GetViewportSize(); - m_drawParams.m_position = AZ::Vector3(viewportSize.m_width, 0.0f, 1.0f) + AZ::Vector3(r_topRightBorderPadding); + m_drawParams.m_position = AZ::Vector3(viewportSize.m_width, 0.0f, 1.0f) + AZ::Vector3(r_topRightBorderPadding) * viewportContext->GetDpiScalingFactor(); m_drawParams.m_color = AZ::Colors::White; m_drawParams.m_scale = AZ::Vector2(BaseFontSize * viewportContext->GetDpiScalingFactor()); m_drawParams.m_hAlign = AzFramework::TextHorizontalAlignment::Right; From 3ee15f1912f02e04205b6fd19c7f2b5b020a781d Mon Sep 17 00:00:00 2001 From: nvsickle Date: Wed, 7 Jul 2021 10:21:21 -0700 Subject: [PATCH 26/67] Try to get some actual log output out of this Signed-off-by: nvsickle --- Tools/LyTestTools/ly_test_tools/log/log_monitor.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Tools/LyTestTools/ly_test_tools/log/log_monitor.py b/Tools/LyTestTools/ly_test_tools/log/log_monitor.py index a2556fa41d..90e0a2280c 100755 --- a/Tools/LyTestTools/ly_test_tools/log/log_monitor.py +++ b/Tools/LyTestTools/ly_test_tools/log/log_monitor.py @@ -133,12 +133,12 @@ class LogMonitor(object): except AssertionError: # Raised by waiter when timeout is reached. logger.warning(f"Timeout of '{timeout}' seconds was reached, log lines may not have been found") # exception will be raised below by _validate_results with failure analysis - - logger.info("Python log output:\n" + self.py_log) - logger.info( - "Finished log monitoring for '{}' seconds, validating results.\n" - "expected_lines_not_found: {}\n unexpected_lines_found: {}".format( - timeout, self.expected_lines_not_found, self.unexpected_lines_found)) + finally: + logger.info("Python log output:\n" + self.py_log) + logger.info( + "Finished log monitoring for '{}' seconds, validating results.\n" + "expected_lines_not_found: {}\n unexpected_lines_found: {}".format( + timeout, self.expected_lines_not_found, self.unexpected_lines_found)) return self._validate_results(self.expected_lines_not_found, self.unexpected_lines_found, expected_lines, unexpected_lines) From 3549e5b946035aac91df705150191a28954af44a Mon Sep 17 00:00:00 2001 From: nvsickle Date: Wed, 7 Jul 2021 10:47:44 -0700 Subject: [PATCH 27/67] More fussing with logs Signed-off-by: nvsickle --- Tools/LyTestTools/ly_test_tools/log/log_monitor.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Tools/LyTestTools/ly_test_tools/log/log_monitor.py b/Tools/LyTestTools/ly_test_tools/log/log_monitor.py index 90e0a2280c..f4266aaace 100755 --- a/Tools/LyTestTools/ly_test_tools/log/log_monitor.py +++ b/Tools/LyTestTools/ly_test_tools/log/log_monitor.py @@ -265,12 +265,21 @@ class LogMonitor(object): self.unexpected_lines_found = unexpected_lines_found self.expected_lines_not_found = expected_lines_not_found + exception_info = None + # To avoid race conditions, we will check *before reading* # If in the mean time the file is closed, we will make sure we read everything by issuing an extra call # by returning the previous alive state process_runing = self.launcher.is_alive() for line in log: line = line[:-1] # remove /n - process_line(line) + try: + process_line(line) + except LogMonitorException as e: + if exception_info is not None: + exception_info = e.args + + if exception_info is not None: + raise LogMonitorException(*exception_info) return not process_runing # Will loop until the process ends From dee591921efd5eb424a116d2cbad7f4b2676d2fa Mon Sep 17 00:00:00 2001 From: nvsickle Date: Wed, 7 Jul 2021 11:47:37 -0700 Subject: [PATCH 28/67] Fix exception bubble-up Signed-off-by: nvsickle --- Tools/LyTestTools/ly_test_tools/log/log_monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/LyTestTools/ly_test_tools/log/log_monitor.py b/Tools/LyTestTools/ly_test_tools/log/log_monitor.py index f4266aaace..54d71b62c0 100755 --- a/Tools/LyTestTools/ly_test_tools/log/log_monitor.py +++ b/Tools/LyTestTools/ly_test_tools/log/log_monitor.py @@ -276,7 +276,7 @@ class LogMonitor(object): try: process_line(line) except LogMonitorException as e: - if exception_info is not None: + if exception_info is None: exception_info = e.args if exception_info is not None: From ca4156e1c005b69d49b83dac1565412e822444a2 Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Wed, 7 Jul 2021 14:02:46 -0500 Subject: [PATCH 29/67] Fixed template.json file name replacements. Signed-off-by: Chris Galvan --- Templates/DefaultProject/template.json | 8 ++++---- Templates/MinimalProject/template.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Templates/DefaultProject/template.json b/Templates/DefaultProject/template.json index 5eaf66e3af..37409a11b4 100644 --- a/Templates/DefaultProject/template.json +++ b/Templates/DefaultProject/template.json @@ -271,8 +271,8 @@ "isOptional": false }, { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", "isTemplated": false, "isOptional": false }, @@ -295,8 +295,8 @@ "isOptional": false }, { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", "isTemplated": false, "isOptional": false }, diff --git a/Templates/MinimalProject/template.json b/Templates/MinimalProject/template.json index a244904578..9d9ef730c1 100644 --- a/Templates/MinimalProject/template.json +++ b/Templates/MinimalProject/template.json @@ -269,8 +269,8 @@ "isOptional": false }, { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128 _2x.png", + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", "isTemplated": false, "isOptional": false }, @@ -293,8 +293,8 @@ "isOptional": false }, { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256 _2x.png", + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", + "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", "isTemplated": false, "isOptional": false }, From 14cab097c772cfd6008386ef4b08074a6f632c56 Mon Sep 17 00:00:00 2001 From: nvsickle Date: Wed, 7 Jul 2021 13:19:51 -0700 Subject: [PATCH 30/67] Fix DPI change callback not being wired up correctly. Signed-off-by: nvsickle --- Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp index 2d9e1c586a..606b5e5b8c 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp @@ -74,6 +74,7 @@ namespace AZ }; viewportContext->m_name = contextName; viewportData.sizeChangedHandler = ViewportContext::SizeChangedEvent::Handler(onSizeChanged); + viewportData.dpiScalingChangedHandler = ViewportContext::ScalarChangedEvent::Handler(onDpiScalingChanged); viewportContext->ConnectSizeChangedHandler(viewportData.sizeChangedHandler); viewportContext->ConnectDpiScalingFactorChangedHandler(viewportData.dpiScalingChangedHandler); ViewPtrStack& associatedViews = GetOrCreateViewStackForContext(contextName); From 4c12e9c5abbbba52f99ea49c431e7390c2d08776 Mon Sep 17 00:00:00 2001 From: Ken Pruiksma Date: Wed, 7 Jul 2021 15:37:49 -0500 Subject: [PATCH 31/67] Refactoring the LTC quad and polygon lights (#1881) * Refactoring the LTC quad and polygon lights to clip the light to the normal hemisphere before applying the LTC matrix. This prevents specular light leaking from behind the surface. Diffuse and specular contribution are now calculated at the same time to avoid clipping the polygon twice. Added a cheaper diffuse integration function that's accurate enough for diffuse. Also added a commented out alternate specular integration for platforms with poor acos() accuracy. Signed-off-by: Ken Pruiksma * PR review feedback - typo and some saturate() protection Signed-off-by: Ken Pruiksma * Making branch more explicit from review feedback. Signed-off-by: Ken Pruiksma --- .../Atom/Features/PBR/Lights/Ltc.azsli | 251 ++++++++++++++---- .../Features/PBR/Lights/PolygonLight.azsli | 17 +- .../Atom/Features/PBR/Lights/QuadLight.azsli | 14 +- 3 files changed, 208 insertions(+), 74 deletions(-) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli index 292f8a8a22..8042758db8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli @@ -80,14 +80,48 @@ float3x3 BuildViewAlignedOrthonormalBasis(in float3 normal, in float3 dirToView) // xy plane in positive z space. float IntegrateEdge(float3 v1, float3 v2) { + // This alternate version may work better for platforms where acos() precision is low. + /* + float x = dot(v1, v2); + float y = abs(x); + + float a = 5.42031 + (3.12829 + 0.0902326 * y) * y; + float b = 3.45068 + (4.18814 + y) * y; + float theta_sinTheta = a / b; + + if (x < 0.0) + { + theta_sinTheta = PI * rsqrt(saturate(1.0 - x * x)) - theta_sinTheta; + } + + float3 u = cross(v1, v2); + return theta_sinTheta * u.z; + */ + float cosTheta = dot(v1, v2); - cosTheta = clamp(cosTheta, -0.9999, 0.9999); + float theta = acos(cosTheta); // calculate 1.0 / sin(theta) - float invSinTheta = rsqrt(1.0 - cosTheta * cosTheta); + float invSinTheta = rsqrt(saturate(1.0 - cosTheta * cosTheta)); - float theta = acos(cosTheta); - return cross(v1, v2).z * theta * invSinTheta; + return cross(v1, v2).z * ((theta > 0.001) ? theta * invSinTheta : 1.0); +} + +// Cheaper version of above which is good enough for diffuse +float IntegrateEdgeDiffuse(float3 v1, float3 v2) +{ + float cosTheta = dot(v1, v2); + float theta_sinTheta = 0.0; + if (cosTheta > 0.0) + { + float absCosTheta = abs(cosTheta); + theta_sinTheta = 1.5708 + (-0.879406 + 0.308609 * absCosTheta) * absCosTheta; + } + else + { + theta_sinTheta = PI * rsqrt(1.0 - cosTheta * cosTheta) - theta_sinTheta; + } + return theta_sinTheta * cross(v1, v2).z; } // Returns the unnormalized z plane intersection point between pointAboveHorizon and pointBelowHorizon. @@ -189,42 +223,90 @@ void ClipQuadToHorizon(inout float3 p[5], out int vertexCount) } } -// Takes 4 points (p) from a quad plus a 5th dummy point, rotates them into the space of the normal, then transforms -// the points by the LTC matrix provided. The points are then clipped to the normal's hemisphere. The number of points -// after the clip is returned in vertexCount. It's possible for the resulting clipped quad to be a triangle (when 3 -// points are below the horizon), or a pentagon (when one point is below the horizon), or be a regular 4 point quad. -void LtcClipAndNormalizeQuad(in float3 normal, in float3 dirToView, float3x3 ltcMat, inout float3 p[5], out int vertexCount) +// Applies the LTC matrix to the clipped points of a quad. +void ApplyLtcMatrixToQuad(in float3x3 ltcMat, inout float3 p[5], in int vertexCount) { - // Rotate ltc matrix - ltcMat = mul(ltcMat, BuildViewAlignedOrthonormalBasis(normal, dirToView)); - // Transform points into ltc space - p[0] = mul(ltcMat, p[0].xyz); - p[1] = mul(ltcMat, p[1].xyz); - p[2] = mul(ltcMat, p[2].xyz); - p[3] = mul(ltcMat, p[3].xyz); + p[0] = mul(ltcMat, p[0]); + p[1] = mul(ltcMat, p[1]); + p[2] = mul(ltcMat, p[2]); - ClipQuadToHorizon(p, vertexCount); - - // visibility check - if (vertexCount == 0) + if (vertexCount > 3) { - return; + p[3] = mul(ltcMat, p[3]); } + if (vertexCount > 4) + { + p[4] = mul(ltcMat, p[4]); + } +} - // project onto sphere +// Projects the clipped points of a quad onto the sphere. +void NormalizeQuadPoints(inout float3 p[5], in int vertexCount) +{ + // project quad points onto a sphere. p[0] = normalize(p[0]); p[1] = normalize(p[1]); p[2] = normalize(p[2]); - p[3] = normalize(p[3]); - p[4] = normalize(p[4]); + + if (vertexCount > 3) + { + p[3] = normalize(p[3]); + } + if (vertexCount > 4) + { + p[4] = normalize(p[4]); + } } -float IntegrateQuad(in float3 v[5], in float vertexCount, in bool doubleSided) +// Transforms the 4 points of a quad into the hemisphere of the normal +void TransformQuadToOrthonormalBasis(in float3 normal, in float3 dirToView, inout float3 p[4]) +{ + float3x3 orthoNormalBasis = BuildViewAlignedOrthonormalBasis(normal, dirToView); + + // Transform points into orthonormal space + p[0] = mul(orthoNormalBasis, p[0]); + p[1] = mul(orthoNormalBasis, p[1]); + p[2] = mul(orthoNormalBasis, p[2]); + p[3] = mul(orthoNormalBasis, p[3]); +} + +// Integrates the edges of a quad for lambertian diffuse contribution. +float IntegrateQuadDiffuse(in float3 v[5], in float vertexCount, in bool doubleSided) { - // Integrate float sum = 0.0; + NormalizeQuadPoints(v, vertexCount); + + // There must be at least 3 points so don't check for the first 2 edges. + sum += IntegrateEdgeDiffuse(v[0], v[1]); + sum += IntegrateEdgeDiffuse(v[1], v[2]); + + if (vertexCount > 3) + { + sum += IntegrateEdgeDiffuse(v[2], v[3]); + if (vertexCount == 5) + { + sum += IntegrateEdgeDiffuse(v[3], v[4]); + } + } + + // Close the polygon + sum += IntegrateEdgeDiffuse(v[vertexCount - 1], v[0]); + + // Note: negated due to winding order + sum = doubleSided ? abs(sum) : max(0.0, -sum); + + return sum; +} + +// Integrates the edges of a quad for specular contribution. +float IntegrateQuadSpecular(in float3 v[5], in float vertexCount, in bool doubleSided) +{ + float sum = 0.0; + + NormalizeQuadPoints(v, vertexCount); + // There must be at least 3 points so don't check for the first 2 edges. sum += IntegrateEdge(v[0], v[1]); sum += IntegrateEdge(v[1], v[2]); @@ -247,26 +329,62 @@ float IntegrateQuad(in float3 v[5], in float vertexCount, in bool doubleSided) return sum; } -float LtcQuadEvaluate(in float3 normal, in float3 dirToView, in float3x3 ltcMat, in float3 p[4], in bool doubleSided) +// Evaluate linear transform cosine lighting for a 4 point quad. +// normal - The surface normal +// dirToView - Normalized direction from the surface to the view +// ltcMat - The LTC matrix for specular, or identity for diffuse. +// p[4] - The 4 light positions relative to the surface position. +// doubleSided - If the quad emits light from both sides +// diffuse - The output diffuse response for the quad light +// specular - The output specular response for the quad light +void LtcQuadEvaluate( + in float3 normal, + in float3 dirToView, + in float3x3 ltcMat, + in float3 p[4], + in bool doubleSided, + out float diffuse, + out float specular) { + // Transform the points of the light into the space of the normal's hemisphere. + TransformQuadToOrthonormalBasis(normal, dirToView, p); + // Initialize quad with dummy point at end in case one corner is clipped (resulting in 5 sided polygon) float3 v[5] = {p[0], p[1], p[2], p[3], float3(0.0, 0.0, 0.0)}; - int vertexCount = 0; - LtcClipAndNormalizeQuad(normal, dirToView, ltcMat, v, vertexCount); + // Clip the light polygon to the normal hemisphere. This is done before the LTC matrix is applied to prevent + // parts of the light below the horizon from impacting the surface. The number of points remaining after + // the clip is returned in vertexCount. It's possible for the vertexCount of the resulting clipped quad to be + // 0 - all points clipped (no work to do, so return) + // 3 - 3 points clipped, leaving only a triangular corner of the quad + // 4 - 2 or 0 points clipped, leaving a quad + // 5 - 1 point clipped leaving a pentagon. - if (vertexCount > 0) + int vertexCount = 0; + ClipQuadToHorizon(v, vertexCount); + + if (vertexCount == 0) { - return IntegrateQuad(v, vertexCount, doubleSided); + // Entire light is below the horizon. + return; } - return 0.0; + + // IntegrateQuadDiffuse is a cheap approximation compared to specular. + diffuse = IntegrateQuadDiffuse(v, vertexCount, doubleSided); + + ApplyLtcMatrixToQuad(ltcMat, v, vertexCount); + + // IntegrateQuadSpecular uses more accurate integration to handle smooth surfaces correctly. + specular = IntegrateQuadSpecular(v, vertexCount, doubleSided); } // Checks an edge against the horizon and integrates it. -// p0 - first point -// p1 - second point -// prevClipPoint - the clip point saved from the last time an edge went from above to below the horizon -// sum - the sum total of all integrations to contribute to. +// p0 - First point +// p1 - Second point +// prevClipPoint - The clip point saved from the last time an edge went from above to below the horizon +// ltcMat - The ltc lookup matrix for specular +// diffuse - The current sum total of diffuse contribution to apply additional contribution to +// specular - The current sum total of specular contribution to apply additional contribution to // // Explanation: // When evaluating edges of a polygon there are four possible states to deal with @@ -283,28 +401,34 @@ float LtcQuadEvaluate(in float3 normal, in float3 dirToView, in float3x3 ltcMat, // 4. Both points are below the horizon // - Do nothing. -void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, inout float sum) +void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in float3x3 ltcMat, inout float diffuse, inout float specular) { if (p0.z > 0.0) { if (p1.z > 0.0) { // Both above horizon - sum += IntegrateEdge(normalize(p0), normalize(p1)); + diffuse += IntegrateEdgeDiffuse(normalize(p0), normalize(p1)); + specular += IntegrateEdge(normalize(mul(ltcMat, p0)), normalize(mul(ltcMat, p1))); } else { // Going from above to below horizon - prevClipPoint = normalize(ClipEdge(p0, p1)); - sum += IntegrateEdge(normalize(p0), prevClipPoint); + prevClipPoint = ClipEdge(p0, p1); + diffuse += IntegrateEdgeDiffuse(normalize(p0), normalize(prevClipPoint)); + specular += IntegrateEdge(normalize(mul(ltcMat, p0)), normalize(mul(ltcMat, prevClipPoint))); } } else if (p1.z > 0.0) { // Going from below to above horizon - float3 clipPoint = normalize(ClipEdge(p1, p0)); - sum += IntegrateEdge(prevClipPoint, clipPoint); - sum += IntegrateEdge(clipPoint, normalize(p1)); + float3 clipPoint = ClipEdge(p1, p0); + diffuse += IntegrateEdgeDiffuse(normalize(prevClipPoint), normalize(clipPoint)); + diffuse += IntegrateEdgeDiffuse(normalize(clipPoint), normalize(p1)); + + clipPoint = mul(ltcMat, clipPoint); + specular += IntegrateEdge(normalize(mul(ltcMat, prevClipPoint)), normalize(clipPoint)); + specular += IntegrateEdge(normalize(clipPoint), normalize(mul(ltcMat, p1))); } } @@ -316,26 +440,38 @@ void EvaluatePolyEdge(in float3 p0, in float3 p1, inout float3 prevClipPoint, in // positions - The buffer where the polygon positions are // startIdx - The index of the first polygon position // endIdx - The index of the point directly after the last polygon position -// +// diffuse - The output diffuse response for the polygon light +// specular - The output specular response for the polygon light // The most complicated aspect of this function is clipping the polygon against the horizon of the surface point. See // EvaluatePolyEdge() above for details on the general concept. However, this function must deal with the case of the // first point being below the horizon. In that case, it needs to search in reverse from the end for the first point // above the horizon, and save the intersection point between the above and below points so it can be used in // EvaluatePolyEdge() later. During this search it also adjusts the end point index as necessary to avoid processing // those points that are below the horizon. -float LtcPolygonEvaluate(in float3 pos, in float3 normal, in float3 dirToView, in float3x3 ltcMat, in StructuredBuffer positions, in uint startIdx, in uint endIdx) +void LtcPolygonEvaluate( + in float3 pos, + in float3 normal, + in float3 dirToView, + in float3x3 ltcMat, + in StructuredBuffer positions, + in uint startIdx, + in uint endIdx, + out float diffuse, + out float specular +) { if (endIdx - startIdx < 3) { - return 0.0; // Must have at least 3 points to form a polygon. + return; // Must have at least 3 points to form a polygon. } // Rotate ltc matrix - ltcMat = mul(ltcMat, BuildViewAlignedOrthonormalBasis(normal, dirToView)); + float3x3 orthonormalMat = BuildViewAlignedOrthonormalBasis(normal, dirToView); // Prepare initial values - float sum = 0.0; // sum of edge integation - float3 p0 = mul(ltcMat, positions[startIdx].xyz - pos); // First point in polygon + float3 p0 = mul(orthonormalMat, positions[startIdx].xyz - pos); // First point in polygon + diffuse = 0.0; + specular = 0.0; float3 prevClipPoint = float3(0.0, 0.0, 0.0); // Used to hold previous clip point when polygon dips below horizon. float3 closePoint = p0; @@ -349,10 +485,10 @@ float LtcPolygonEvaluate(in float3 pos, in float3 normal, in float3 dirToView, i // searching backwards, updating the endIdx along the way to avoid reprocessing those points later for ( ; endIdx > startIdx + 1; --endIdx) { - float3 prevPoint = mul(ltcMat, positions[endIdx - 1].xyz - pos); - if (prevPoint.z > 0) + float3 prevPoint = mul(orthonormalMat, positions[endIdx - 1].xyz - pos); + if (prevPoint.z > 0.0) { - prevClipPoint = normalize(ClipEdge(prevPoint, p0)); + prevClipPoint = ClipEdge(prevPoint, p0); closePoint = prevClipPoint; break; } @@ -362,7 +498,7 @@ float LtcPolygonEvaluate(in float3 pos, in float3 normal, in float3 dirToView, i // Check if all points below horizon if (endIdx == startIdx + 1) { - return 0.0; + return; } p0 = firstPoint; // Restore the original p0 @@ -371,13 +507,14 @@ float LtcPolygonEvaluate(in float3 pos, in float3 normal, in float3 dirToView, i // Evaluate all the points for (uint curIdx = startIdx + 1; curIdx < endIdx; ++curIdx) { - float3 p1 = mul(ltcMat, positions[curIdx].xyz - pos); // Current point in polygon - EvaluatePolyEdge(p0, p1, prevClipPoint, sum); + float3 p1 = mul(orthonormalMat, positions[curIdx].xyz - pos); // Current point in polygon + EvaluatePolyEdge(p0, p1, prevClipPoint, ltcMat, diffuse, specular); p0 = p1; } - EvaluatePolyEdge(p0, closePoint, prevClipPoint, sum); + EvaluatePolyEdge(p0, closePoint, prevClipPoint, ltcMat, diffuse, specular); // Note: negated due to winding order - return -sum; + diffuse = -diffuse; + specular = -specular; } diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli index bbd3c1c9e3..d7313556a2 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/PolygonLight.azsli @@ -50,26 +50,25 @@ void ApplyPoylgonLight(ViewSrg::PolygonLight light, Surface surface, inout Light float radiusAttenuation = 1.0 - (falloff * falloff); radiusAttenuation = radiusAttenuation * radiusAttenuation; - // Diffuse - static const float3x3 identityMatrix = float3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); - float diffuse = LtcPolygonEvaluate(surface.position, surface.normal, lightingData.dirToCamera, identityMatrix, ViewSrg::m_polygonLightPoints, startIndex, endIndex); - diffuse = doubleSided ? abs(diffuse) : max(0.0, diffuse); - - // Specular float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); float3x3 ltcMat = LtcMatrix(SceneSrg::m_ltcMatrix, ltcCoords); - float3 specular = LtcPolygonEvaluate(surface.position, surface.normal, lightingData.dirToCamera, ltcMat, ViewSrg::m_polygonLightPoints, startIndex, endIndex); + + float diffuse = 0.0; + float specular = 0.0; + + LtcPolygonEvaluate(surface.position, surface.normal, lightingData.dirToCamera, ltcMat, ViewSrg::m_polygonLightPoints, startIndex, endIndex, diffuse, specular); + diffuse = doubleSided ? abs(diffuse) : max(0.0, diffuse); specular = doubleSided ? abs(specular) : max(0.0, specular); // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) float2 schlick = SceneSrg::m_ltcAmplification.Sample(PassSrg::LinearSampler, ltcCoords).xy; - specular *= schlick.x + (1.0 - surface.specularF0) * schlick.y; + float3 specularRGB = specular * (schlick.x + (1.0 - surface.specularF0) * schlick.y); // Scale by inverse surface area of hemisphere (1/2pi), attenuation, and light intensity float3 intensity = 0.5 * INV_PI * radiusAttenuation * abs(light.m_rgbIntensityNits); lightingData.diffuseLighting += surface.albedo * diffuse * intensity; - lightingData.specularLighting += surface.specularF0 * specular * intensity; + lightingData.specularLighting += surface.specularF0 * specularRGB * intensity; } void ApplyPolygonLights(Surface surface, inout LightingData lightingData) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli index 91981e4f4d..29ee97fd6f 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/QuadLight.azsli @@ -111,24 +111,22 @@ void ApplyQuadLight(ViewSrg::QuadLight light, Surface surface, inout LightingDat { float3 p[4] = {p0, p1, p2, p3}; - // Diffuse - float3x3 identityMatrix = float3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); - float diffuse = LtcQuadEvaluate(surface.normal, lightingData.dirToCamera, identityMatrix, p, doubleSided); - - // Specular float2 ltcCoords = LtcCoords(dot(surface.normal, lightingData.dirToCamera), surface.roughnessLinear); float3x3 ltcMat = LtcMatrix(SceneSrg::m_ltcMatrix, ltcCoords); - float3 specular = LtcQuadEvaluate(surface.normal, lightingData.dirToCamera, ltcMat, p, doubleSided); + + float diffuse = 0.0; + float specular = 0.0; + LtcQuadEvaluate(surface.normal, lightingData.dirToCamera, ltcMat, p, doubleSided, diffuse, specular); // Apply BRDF scale terms (BRDF magnitude and Schlick Fresnel) float2 schlick = SceneSrg::m_ltcAmplification.Sample(PassSrg::LinearSampler, ltcCoords).xy; - specular *= schlick.x + (1.0 - surface.specularF0) * schlick.y; + float3 specularRGB = specular * (schlick.x + (1.0 - surface.specularF0) * schlick.y); // Scale by inverse surface area of hemisphere (1/2pi), attenuation, and light intensity float3 intensity = 0.5 * INV_PI * radiusAttenuation * light.m_rgbIntensityNits; lightingData.diffuseLighting += surface.albedo * diffuse * intensity; - lightingData.specularLighting += surface.specularF0 * specular * intensity; + lightingData.specularLighting += surface.specularF0 * specularRGB * intensity; } else { From 2dce2eee2d3c7ad3a070a774656e90cfe87f3994 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Wed, 7 Jul 2021 13:42:22 -0700 Subject: [PATCH 32/67] The Great ScriptCanvas Purge, Part X Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Code/Asset/RuntimeAssetSystemComponent.cpp | 2 +- .../Libraries/String/.vs/ProjectSettings.json | 3 --- .../String/.vs/String/v16/Browse.VC.db | Bin 294912 -> 0 bytes .../Libraries/String/.vs/VSWorkspaceState.json | 6 ------ .../Libraries/String/.vs/slnx.sqlite | Bin 90112 -> 0 bytes 5 files changed, 1 insertion(+), 10 deletions(-) delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/ProjectSettings.json delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/String/v16/Browse.VC.db delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/VSWorkspaceState.json delete mode 100644 Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/slnx.sqlite diff --git a/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp index 38995f8dca..0b12d38870 100644 --- a/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp @@ -2,7 +2,7 @@ * 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 - *s + * */ #include diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/ProjectSettings.json b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/ProjectSettings.json deleted file mode 100644 index 0cf5ea5033..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/ProjectSettings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "CurrentProjectSetting": "No Configurations" -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/String/v16/Browse.VC.db b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/String/v16/Browse.VC.db deleted file mode 100644 index 0bd6c3064248f7d9a078ec2376c1505aa698394f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294912 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 Oh+568O6&kh(*7SD>(z$< diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/VSWorkspaceState.json b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/VSWorkspaceState.json deleted file mode 100644 index 6b6114114f..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/VSWorkspaceState.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ExpandedNodes": [ - "" - ], - "PreviewInSolutionExplorer": false -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/slnx.sqlite b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/.vs/slnx.sqlite deleted file mode 100644 index 9b538ebad69051f86689708a3c34f11e6e486cb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 90112 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 Ay8r+H From dae2ddaec239a2c06c0f20e4d7ccc5516686c040 Mon Sep 17 00:00:00 2001 From: alexmontAmazon <85521892+alexmontAmazon@users.noreply.github.com> Date: Wed, 7 Jul 2021 13:49:55 -0700 Subject: [PATCH 33/67] fix for [LYN-4828], message box style changes (#1911) * fix for [LYN-4828], message box style changes Signed-off-by: Alex Montgomery * now with missing .qss file! Friends don't let friends git add -u Signed-off-by: Alex Montgomery --- .../AzQtComponents/Components/Style.cpp | 4 ++++ .../Components/Widgets/BaseStyleSheet.qss | 1 + .../Components/Widgets/MessageBox.qss | 21 +++++++++++++++++++ .../AzQtComponents/Components/resources.qrc | 9 ++++---- 4 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/MessageBox.qss diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp index 4146d1d537..15240c3975 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp @@ -1289,6 +1289,10 @@ namespace AzQtComponents } break; + case QStyle::SP_MessageBoxInformation: + return QIcon(QString::fromUtf8(":/stylesheet/img/UI20/Info.svg")); + break; + default: break; } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BaseStyleSheet.qss b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BaseStyleSheet.qss index 894b2921d4..3499404572 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BaseStyleSheet.qss +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/BaseStyleSheet.qss @@ -123,6 +123,7 @@ QPlainTextEdit:focus @import "LineEdit.qss"; @import "Menu.qss"; @import "MenuBar.qss"; +@import "MessageBox.qss"; @import "ProgressBar.qss"; @import "PushButton.qss"; @import "QDockWidget.qss"; diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/MessageBox.qss b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/MessageBox.qss new file mode 100644 index 0000000000..81aa7fd8d8 --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/MessageBox.qss @@ -0,0 +1,21 @@ + +/* + * Copyright (c) Contributors to the Open 3D Engine Project + * + * SPDX-License-Identifier: Apache-2.0 OR MIT + * + */ + + /* correct the padding around the two main labels to give space at the borders */ +QMessageBox QLabel#qt_msgbox_label +{ + padding-top: 20px; + padding-right: 20px; + padding-bottom: 20px; +} + +QMessageBox QLabel#qt_msgboxex_icon_label +{ + padding-left: 20px; + padding-top: 20px; +} diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc b/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc index 904be3897f..642fc72745 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/resources.qrc @@ -354,17 +354,17 @@ img/UI20/toolbar/Grid.svg img/UI20/toolbar/Lighting.svg img/UI20/toolbar/Load.svg - img/UI20/toolbar/Local.svg + img/UI20/toolbar/Local.svg img/UI20/toolbar/Locked.svg img/UI20/toolbar/Locked_Status.svg - img/UI20/toolbar/LUA.svg + img/UI20/toolbar/LUA.svg img/UI20/toolbar/Material.svg img/UI20/toolbar/Measure.svg img/UI20/toolbar/Move.svg img/UI20/toolbar/Object_follow_terrain.svg img/UI20/toolbar/Object_height.svg img/UI20/toolbar/Object_list.svg - img/UI20/toolbar/Parent.svg + img/UI20/toolbar/Parent.svg img/UI20/toolbar/particle.svg img/UI20/toolbar/Play.svg img/UI20/toolbar/Redo.svg @@ -383,7 +383,7 @@ img/UI20/toolbar/undo.svg img/UI20/toolbar/Unlocked.svg img/UI20/toolbar/Vertex_snapping.svg - img/UI20/toolbar/World.svg + img/UI20/toolbar/World.svg img/UI20/toolbar/X_axis.svg img/UI20/toolbar/Y_axis.svg img/UI20/toolbar/Z_axis.svg @@ -457,6 +457,7 @@ Widgets/ComboBoxConfig.ini Widgets/Menu.qss Widgets/MenuBar.qss + Widgets/MessageBox.qss Widgets/ProgressBarConfig.ini Widgets/ProgressBar.qss Widgets/PushButton.qss From 274669a1b43ec2ff79479db729161ae62518cded Mon Sep 17 00:00:00 2001 From: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> Date: Wed, 7 Jul 2021 16:05:38 -0500 Subject: [PATCH 34/67] Fixed Vegetation Debugger to work with Atom rendering and AZ::Console. (#1924) The previous implementation used Cry rendering and CVars and had been left in a commented-out state. These changes restore it back to full functionality. Signed-off-by: mbalfour --- .../Code/Source/Debugger/DebugComponent.cpp | 211 +++++++++++------- .../Code/Source/Debugger/DebugComponent.h | 12 +- 2 files changed, 137 insertions(+), 86 deletions(-) diff --git a/Gems/Vegetation/Code/Source/Debugger/DebugComponent.cpp b/Gems/Vegetation/Code/Source/Debugger/DebugComponent.cpp index c24c380d6f..5fa2d6fd88 100644 --- a/Gems/Vegetation/Code/Source/Debugger/DebugComponent.cpp +++ b/Gems/Vegetation/Code/Source/Debugger/DebugComponent.cpp @@ -10,7 +10,10 @@ #include "AreaSystemComponent.h" #include "InstanceSystemComponent.h" +#include +#include #include +#include #include #include #include @@ -22,11 +25,6 @@ #include #include -#include -#include -#include -#include - #include namespace Vegetation @@ -112,18 +110,16 @@ void DebugComponent::Activate() DebugRequestBus::Handler::BusConnect(); DebugNotificationBus::Handler::BusConnect(); DebugNotificationBus::AllowFunctionQueuing(true); - AzFramework::DebugDisplayEventBus::Handler::BusConnect(); + AzFramework::EntityDebugDisplayEventBus::Handler::BusConnect(GetEntityId()); SystemConfigurationRequestBus::Handler::BusConnect(); - AddConsoleVariables(); VEG_PROFILE_METHOD(DebugSystemDataBus::BroadcastResult(m_debugData, &DebugSystemDataBus::Events::GetDebugData)); } void DebugComponent::Deactivate() { - RemoveConsoleVariables(); SystemConfigurationRequestBus::Handler::BusDisconnect(); - AzFramework::DebugDisplayEventBus::Handler::BusDisconnect(); + AzFramework::EntityDebugDisplayEventBus::Handler::BusDisconnect(); DebugRequestBus::Handler::BusDisconnect(); DebugNotificationBus::Handler::BusDisconnect(); @@ -153,7 +149,7 @@ bool DebugComponent::WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const return false; } -void DebugComponent::DrawGlobalDebugInfo() +void DebugComponent::DisplayEntityViewport(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) { // time to collect the report? if (AZStd::chrono::microseconds(AZStd::chrono::system_clock::now() - m_lastCollectionTime).count() > m_configuration.m_collectionFrequencyUs) @@ -173,23 +169,25 @@ void DebugComponent::DrawGlobalDebugInfo() m_exportCurrentReport = false; } + if (m_configuration.m_showVisualization) + { + DrawSectorTimingData(viewportInfo, debugDisplay); + } + if (m_configuration.m_showDebugStats) { - DrawDebugStats(); + DrawDebugStats(debugDisplay); } if (m_configuration.m_showInstanceVisualization) { - DrawInstanceDebug(); + DrawInstanceDebug(debugDisplay); } } -void DebugComponent::DrawInstanceDebug() +void DebugComponent::DrawInstanceDebug(AzFramework::DebugDisplayRequests& debugDisplay) { #if defined(VEG_PROFILE_ENABLED) - // ToDo: Re-implement with Atom. LYN-3681 - /*renderAuxGeom->SetRenderFlags(e_Mode3D | e_FillModeSolid | e_CullModeBack | e_DepthWriteOff | e_DepthTestOn); - AZStd::unordered_map areaDebugDisplayDataMap; for (const auto& instance : m_activeInstances) @@ -213,16 +211,87 @@ void DebugComponent::DrawInstanceDebug() { continue; } - - Vec3 pos(AZVec3ToLYVec3(instanceData.m_position)); - Vec3 radius(areaDebugDisplayData.m_instanceSize * 0.5f); - AABB bounds(pos - radius, pos + radius); - renderAuxGeom->DrawAABB(bounds, true, ColorB(areaDebugDisplayData.m_instanceColor.ToU32()), eBBD_Faceted); - }*/ + AZ::Vector3 radius(areaDebugDisplayData.m_instanceSize * 0.5f); + debugDisplay.SetColor(areaDebugDisplayData.m_instanceColor); + debugDisplay.DrawSolidBox(instanceData.m_position - radius, instanceData.m_position + radius); + } #endif } +void DebugComponent::DrawSectorTimingData(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) +{ + static const AZ::Color s_green = AZ::Color(0.3f, 0.9f, 0.3f, .05f); + static const AZ::Color s_yellow = AZ::Color(1.0f, 1.0f, 0.0f, .05f); + static const AZ::Color s_red = AZ::Color(1.0f, 0.0f, 0.0f, .05f); + static const float boxHeightAboveTerrain = 3.0f; + + + AreaSystemConfig areaConfig; + SystemConfigurationRequestBus::Broadcast(&SystemConfigurationRequestBus::Events::GetSystemConfig, &areaConfig); + const auto sectorSizeInMeters = areaConfig.m_sectorSizeInMeters; + const AZ::u32 maxTextDisplayDistance = m_configuration.m_maxLabelDisplayDistance; + const int maxDisplayCount = m_configuration.m_maxDatapointDisplayCount; + + AZ::Vector3 cameraPos(0.0f); + if (auto viewportContextRequests = AZ::RPI::ViewportContextRequests::Get(); viewportContextRequests) + { + AZ::RPI::ViewportContextPtr viewportContext = viewportContextRequests->GetViewportContextById(viewportInfo.m_viewportId); + cameraPos = viewportContext->GetCameraTransform().GetTranslation(); + } + AZ::Vector2 cameraPos2d(cameraPos.GetX(), cameraPos.GetY()); + + for (int i = 0; i < maxDisplayCount && i < m_currentSortedTimingList.size(); ++i) + { + const auto& sectorTiming = m_currentSortedTimingList[i]; + + AZ::Vector3 topCorner{ float(sectorTiming.m_id.first), float(sectorTiming.m_id.second), 0.0f }; + topCorner *= float(sectorSizeInMeters); + + AZ::Vector3 bottomCorner = topCorner + + AZ::Vector3(float(sectorSizeInMeters), float(sectorSizeInMeters), sectorTiming.m_worldPosition.GetZ() + boxHeightAboveTerrain); + + auto aabb = AZ::Aabb::CreateFromMinMax(topCorner, bottomCorner); + const AZ::Color* color = &s_yellow; + + if (sectorTiming.m_averageTimeUs >= m_configuration.m_maxThresholdUs) + { + color = &s_red; + } + else if (sectorTiming.m_averageTimeUs < m_configuration.m_minThresholdUs) + { + color = &s_green; + } + + AZ::Color outlineColor(color->GetR(), color->GetG(), color->GetB(), 1.0f); + + // Box around the entire sector + debugDisplay.SetColor(*color); + debugDisplay.DrawSolidBox(aabb.GetMin(), aabb.GetMax()); + debugDisplay.SetColor(outlineColor); + debugDisplay.DrawWireBox(aabb.GetMin(), aabb.GetMax()); + + // Smaller box inside the sector + const AZ::Vector3 innerBoxRadius(0.5f); + debugDisplay.SetColor(outlineColor); + debugDisplay.DrawSolidBox(sectorTiming.m_worldPosition - innerBoxRadius, sectorTiming.m_worldPosition + innerBoxRadius); + + AZ::Vector2 sectorPos2d(sectorTiming.m_worldPosition.GetX(), sectorTiming.m_worldPosition.GetY()); + float distanceToCamera = cameraPos2d.GetDistance(sectorPos2d); + + if (distanceToCamera <= maxTextDisplayDistance) + { + AZStd::string displayString = AZStd::string::format("Sector %d, %d\nTime: %dus\nUpdate Count: %d", sectorTiming.m_id.first, + sectorTiming.m_id.second, static_cast(sectorTiming.m_averageTimeUs), sectorTiming.m_updateCount); + + constexpr bool centerText = true; + constexpr float fontSize = 1.5f; + debugDisplay.SetColor(AZ::Color(1.0f)); + debugDisplay.DrawTextLabel(sectorTiming.m_worldPosition, fontSize, displayString.c_str(), centerText); + } + } +} + void DebugComponent::CopyReportToSortedList() { m_currentSortedTimingList.clear(); @@ -885,23 +954,9 @@ void DebugComponent::PrepareNextReport() }); } -void DebugComponent::RemoveConsoleVariables() +void DebugComponent::DrawDebugStats(AzFramework::DebugDisplayRequests& debugDisplay) { - ISystem* crySystem = GetISystem(); - if (crySystem && crySystem->GetIConsole()) - { - IConsole* console = crySystem->GetIConsole(); - console->RemoveCommand("veg_debugToggleVisualization"); - console->RemoveCommand("veg_debugDumpReport"); - console->RemoveCommand("veg_debugRefreshAllAreas"); - console->RemoveCommand("veg_debugClearAllAreas"); - } -} - -void DebugComponent::DrawDebugStats() -{ - // ToDo: Re-implement with Atom. LYN-3681 - /*if (!m_debugData) + if (!m_debugData) { return; } @@ -915,52 +970,48 @@ void DebugComponent::DrawDebugStats() AZ::u32 destroyTaskCount = 0; InstanceSystemStatsRequestBus::BroadcastResult(destroyTaskCount, &InstanceSystemStatsRequestBus::Events::GetDestroyTaskCount); - renderAuxGeom->Draw2dLabel(4, 16, 1.5f, ColorF(1, 1, 1), false, - AZStd::string::format("VegetationSystemStats:\nActive Instances Count: %d\nInstance Register Queue: %d\nInstance Unregister Queue: %d\nThread Queue Count: %d\nThread Processing Count: %d", - instanceCount, - createTaskCount, - destroyTaskCount, - m_debugData->m_areaTaskQueueCount.load(AZStd::memory_order_relaxed), - m_debugData->m_areaTaskActiveCount.load(AZStd::memory_order_relaxed) - ).c_str());*/ -} - -void DebugComponent::AddConsoleVariables() -{ - ISystem* crySystem = GetISystem(); - if (crySystem && crySystem->GetIConsole()) - { - IConsole* console = crySystem->GetIConsole(); - - static auto fnCmdToggleDebugger = []([[maybe_unused]] IConsoleCmdArgs* args) - { - DebugNotificationBus::Broadcast(&DebugNotificationBus::Events::ToggleVisualization); - }; - console->AddCommand("veg_debugToggleVisualization", fnCmdToggleDebugger, VF_NULL, "Toggles visualization of sector timings"); - - static auto fnCmdDumpReport = []([[maybe_unused]] IConsoleCmdArgs* args) - { - DebugNotificationBus::Broadcast(&DebugNotificationBus::Events::ExportCurrentReport); - }; - console->AddCommand("veg_debugDumpReport", fnCmdDumpReport, VF_NULL, "Writes out a vegetation sector report"); - - static auto fnRefreshAllAreas = []([[maybe_unused]] IConsoleCmdArgs* args) - { - AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::RefreshAllAreas); - }; - console->AddCommand("veg_debugRefreshAllAreas", fnRefreshAllAreas, VF_NULL, "Refresh all vegetation areas in the current view"); - - static auto fnClearAllAreas = []([[maybe_unused]] IConsoleCmdArgs* args) - { - AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::ClearAllAreas); - AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::RefreshAllAreas); - }; - console->AddCommand("veg_debugClearAllAreas", fnClearAllAreas, VF_NULL, "Clear and refresh all vegetation areas in the current view"); - } + debugDisplay.SetColor(AZ::Color(1.0f)); + debugDisplay.Draw2dTextLabel( + 4.0f, 16.0f, 1.5f, + AZStd::string::format( + "VegetationSystemStats:\nActive Instances Count: %d\nInstance Register Queue: %d\nInstance Unregister Queue: %d\nThread " + "Queue Count: %d\nThread Processing Count: %d", + instanceCount, createTaskCount, destroyTaskCount, m_debugData->m_areaTaskQueueCount.load(AZStd::memory_order_relaxed), + m_debugData->m_areaTaskActiveCount.load(AZStd::memory_order_relaxed)) + .c_str(), + false); } namespace { + static void veg_debugToggleVisualization([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) + { + DebugNotificationBus::Broadcast(&DebugNotificationBus::Events::ToggleVisualization); + } + AZ_CONSOLEFREEFUNC(veg_debugToggleVisualization, AZ::ConsoleFunctorFlags::DontReplicate, "Toggles visualization of sector timings"); + + static void veg_debugDumpReport([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) + { + DebugNotificationBus::Broadcast(&DebugNotificationBus::Events::ExportCurrentReport); + } + AZ_CONSOLEFREEFUNC(veg_debugDumpReport, AZ::ConsoleFunctorFlags::DontReplicate, "Writes out a vegetation sector report"); + + static void veg_debugRefreshAllAreas([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) + { + AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::RefreshAllAreas); + } + AZ_CONSOLEFREEFUNC( + veg_debugRefreshAllAreas, AZ::ConsoleFunctorFlags::DontReplicate, "Refresh all vegetation areas in the current view"); + + static void veg_debugClearAllAreas([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) + { + AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::ClearAllAreas); + AreaSystemRequestBus::Broadcast(&AreaSystemRequestBus::Events::RefreshAllAreas); + } + AZ_CONSOLEFREEFUNC( + veg_debugClearAllAreas, AZ::ConsoleFunctorFlags::DontReplicate, "Clear and refresh all vegetation areas in the current view"); + + const char* GetSortTypeString(DebugRequests::SortType sortType) { switch (sortType) diff --git a/Gems/Vegetation/Code/Source/Debugger/DebugComponent.h b/Gems/Vegetation/Code/Source/Debugger/DebugComponent.h index 6362d98371..224ad5ded5 100644 --- a/Gems/Vegetation/Code/Source/Debugger/DebugComponent.h +++ b/Gems/Vegetation/Code/Source/Debugger/DebugComponent.h @@ -54,7 +54,7 @@ namespace Vegetation class DebugComponent : public AZ::Component - , private AzFramework::DebugDisplayEventBus::Handler + , private AzFramework::EntityDebugDisplayEventBus::Handler , private DebugRequestBus::Handler , private DebugNotificationBus::Handler , private SystemConfigurationRequestBus::Handler @@ -79,7 +79,8 @@ namespace Vegetation ////////////////////////////////////////////////////////////////////////// // EntityDebugDisplayEventBus - void DrawGlobalDebugInfo() override; + void DisplayEntityViewport( + const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) override; ////////////////////////////////////////////////////////////////////////// // DebugNotifications @@ -112,10 +113,9 @@ namespace Vegetation protected: void PrepareNextReport(); void CopyReportToSortedList(); - void AddConsoleVariables(); - void RemoveConsoleVariables(); - void DrawDebugStats(); - void DrawInstanceDebug(); + void DrawSectorTimingData(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay); + void DrawDebugStats(AzFramework::DebugDisplayRequests& debugDisplay); + void DrawInstanceDebug(AzFramework::DebugDisplayRequests& debugDisplay); private: AZStd::atomic_bool m_exportCurrentReport{ false }; From af8e6afc6a5fea4e37c2128821e89404e5e7fc36 Mon Sep 17 00:00:00 2001 From: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com> Date: Wed, 7 Jul 2021 14:31:45 -0700 Subject: [PATCH 35/67] Update README LFS instructions (#1925) Signed-off-by: AMZN-alexpete <26804013+AMZN-alexpete@users.noreply.github.com> --- README.md | 100 +++++++++++------------------------------------------- 1 file changed, 20 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index 9cc816efe9..6b88097739 100644 --- a/README.md +++ b/README.md @@ -1,77 +1,33 @@ -## Updates to this readme -July 06, 2021 -- Switch licenses to APACHE-2.0 OR MIT +# Open 3D Engine -May 14, 2021 -- Removed instructions for the 3rdParty zip file and downloader URL. This is no longer a requirement. -- Updated instructions for dependencies -- Links to full documentation +Open 3D Engine (O3DE) is an open-source, real-time, multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations. -April 7-13, 2021 -- Updates to the 3rdParty zip file - -March 25, 2021 -- Initial commit for instructions +## Contribute +For information about contributing to Open 3D Engine, visit https://o3de.org/docs/contributing/ ## Download and Install -This repository uses Git LFS for storing large binary files. You will need to create a Github personal access token to authenticate with the LFS service. +This repository uses Git LFS for storing large binary files. -To install Git LFS, download the binary here: https://git-lfs.github.com/. +Verify you have Git LFS installed by running the following command to print the version number. +``` +git lfs --version +``` -After installation, you will need to install the necessary git hooks with this command +If Git LFS is not installed, download and run the installer from: https://git-lfs.github.com/. + +### Install Git LFS hooks ``` git lfs install ``` -### Create a Git Personal Access Token - -You will need your personal access token credentials to authenticate when you clone the repository and when downloading objects from Git LFS - -[Create a personal access token with the 'repo' scope.](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) - -During the clone operation, you will be prompted to enter a password. Your token will be used as the password. You will also be prompted a second time for Git LFS. - -### (Recommended) Verify you have a credential manager installed to store your credentials - -Recent versions of Git install a credential manager to store your credentials so you don't have to put in the credentials for every request. - -It is highly recommended you check that you have a [credential manager installed and configured](https://github.com/microsoft/Git-Credential-Manager-Core) - -For Linux and Mac, use the following commands to store credentials - -Linux: -``` -git config --global credential.helper cache -``` -Mac: -``` -git config --global credential.helper osxkeychain -``` ### Clone the repository ```shell -> git clone https://github.com/o3de/o3de.git -Cloning into 'o3de'... - -# initial prompt for credentials to download the repository code -# enter your Github username and personal access token - -remote: Counting objects: 29619, done. -Receiving objects: 100% (29619/29619), 40.50 MiB | 881.00 KiB/s, done. -Resolving deltas: 100% (8829/8829), done. -Updating files: 100% (27037/27037), done. - -# second prompt for credentials when downloading LFS files -# enter your Github username and personal access token - -Filtering content: 100% (3853/3853), 621.43 MiB | 881.00 KiB/s, done. - +git clone https://github.com/o3de/o3de.git ``` -If you have the Git credential manager core or other credential helpers installed, you should not be prompted for your credentials anymore. - ## Building the Engine ### Build Requirements and redistributables #### Windows @@ -85,33 +41,21 @@ If you have the Git credential manager core or other credential helpers installe #### Optional -* WWise - 2019.2.8.7432 minimum: [https://www.audiokinetic.com/download/](https://www.audiokinetic.com/download/) - * Note: This requires registration and installation of a client to download - * You will also need to set a environment variable: `set LY_WWISE_INSTALL_PATH=` - * For example: `set LY_WWISE_INSTALL_PATH="C:\Program Files (x86)\Audiokinetic\Wwise 2019.2.8.7432"` +* Wwise - 2021.1.1.7601 minimum: [https://www.audiokinetic.com/download/](https://www.audiokinetic.com/download/) + * Note: This requires registration and installation of a client application to download + * Make sure to select the SDK(C++) component during installation of Wwise + * You will also need to set an environment variable: `set LY_WWISE_INSTALL_PATH=` + * For example: `set LY_WWISE_INSTALL_PATH="C:\Program Files (x86)\Audiokinetic\Wwise 2021.1.1.7601"` ### Quick Start Build Steps 1. Create a writable folder to cache 3rd Party dependencies. You can also use this to store other redistributable SDKs. - > For the 0.5 branch - Create an empty text file named `3rdParty.txt` in this folder, to allow a legacy CMake validator to pass - 1. Install the following redistributables to the following: - Visual Studio and VC++ redistributable can be installed to any location - CMake can be installed to any location, as long as it's available in the system path - - WWise can be installed anywhere, but you will need to set an environment variable for CMake to detect it: `set LY_WWISE_INSTALL_PATH=` + - (Optional) Wwise can be installed anywhere, but you will need to set an environment variable for CMake to detect it: `set LY_WWISE_INSTALL_PATH=` -1. Navigate into the repo folder, then download the python runtime with this command - - > For the 0.5 branch - Set this environment variable prior to the `get_python` command below: - > ``` - > set LY_PACKAGE_SERVER_URLS=https://d2c171ws20a1rv.cloudfront.net - > ``` - - ``` - python\get_python.bat - ``` - 1. Configure the source into a solution using this command line, replacing and <3rdParty cache path> to a path you've created: ``` cmake -B -S -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<3rdParty cache path> -DLY_UNITY_BUILD=ON -DLY_PROJECTS=AutomatedTesting @@ -139,7 +83,7 @@ If you have the Git credential manager core or other credential helpers installe ``` scripts\o3de.bat register --this-engine ``` -1. Setup new projects using the `o3de create-project` command. In the 0.5 branch, the project directory must be a subdirectory in the repo folder. +1. Setup new projects using the `o3de create-project` command. ``` \scripts\o3de.bat create-project --project-path ``` @@ -151,10 +95,6 @@ If you have the Git credential manager core or other credential helpers installe ``` cmake -B -S -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<3rdParty cache path> - // For the 0.5 branch, you must build a new Editor for each project: - cmake --build --target .GameLauncher Editor --config profile -- /m - - // For all other branches, just build the project: cmake --build --target .GameLauncher --config profile -- /m ``` From f9f711c039049f590a34000ad84c6a4d0b3e1b15 Mon Sep 17 00:00:00 2001 From: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Date: Wed, 7 Jul 2021 15:26:11 -0500 Subject: [PATCH 36/67] Removing superfluous whitespace. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> --- .../Libraries/Core/BinaryOperator.h | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h index 0558decaeb..64e59b593d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/BinaryOperator.h @@ -1,6 +1,6 @@ /* * 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 * */ @@ -23,7 +23,7 @@ namespace ScriptCanvas AZ_COMPONENT(BinaryOperator, "{5BD0E8C7-9B0A-42F5-9EB0-199E6EC8FA99}", Node); static void Reflect(AZ::ReflectContext* reflection); - + static const char* k_lhsName; static const char* k_rhsName; static const char* k_resultName; @@ -31,7 +31,7 @@ namespace ScriptCanvas static const char* k_evaluateName; static const char* k_outName; static const char* k_onTrue; - static const char* k_onFalse; + static const char* k_onFalse; protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override @@ -47,7 +47,7 @@ namespace ScriptCanvas SlotId GetOutputSlotId() const; }; - + class ArithmeticExpression : public BinaryOperator { @@ -57,20 +57,20 @@ namespace ScriptCanvas static void Reflect(AZ::ReflectContext* reflection); bool IsDeprecated() const override { return true; } - + void CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map>& outSlotIdMap) const override; protected: // adds Number inputs, adds Number output type void OnInit() override; }; - + class BooleanExpression : public BinaryOperator { public: AZ_COMPONENT(BooleanExpression, "{36C69825-CFF8-4F70-8F3B-1A9227E8BEEA}", BinaryOperator); - + static void Reflect(AZ::ReflectContext* reflection); ////////////////////////////////////////////////////////////////////////// @@ -93,20 +93,20 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// protected: - // initialize boolean expression, adds boolean output type calls + // initialize boolean expression, adds boolean output type calls void OnInit() override; - virtual void InitializeBooleanExpression(); + virtual void InitializeBooleanExpression(); }; // accepts any type, checks for type equality, and then value equality or pointer equality class EqualityExpression - : public BooleanExpression + : public BooleanExpression { public: AZ_COMPONENT(EqualityExpression, "{78D20EB6-BA07-4071-B646-7C2D68A0A4A6}", BooleanExpression); - + static void Reflect(AZ::ReflectContext* reflection); - + protected: // adds any required input types void InitializeBooleanExpression() override; @@ -125,10 +125,10 @@ namespace ScriptCanvas AZ_COMPONENT(ComparisonExpression, "{82C50EAD-D3DD-45D2-BFCE-981D95771DC8}", EqualityExpression); static void Reflect(AZ::ReflectContext* reflection); - + protected: // adds number types - void InitializeBooleanExpression() override; + void InitializeBooleanExpression() override; }; - } -} + } +} From 3be4c9a3938188de168ea533b47a2cb56440d5c9 Mon Sep 17 00:00:00 2001 From: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Date: Wed, 7 Jul 2021 16:25:26 -0500 Subject: [PATCH 37/67] Removing extra whitespace from the ScriptCanvas Node Library files Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> --- .../Asset/RuntimeAssetSystemComponent.cpp | 4 +- .../Framework/ScriptCanvasTraceUtilities.h | 2 +- .../ScriptCanvas/Components/EditorGraph.h | 24 ++++---- .../Code/Include/ScriptCanvas/Core/GraphBus.h | 6 +- .../Libraries/Core/EBusEventHandler.cpp | 16 ++--- .../Libraries/Core/EBusEventHandler.h | 24 ++++---- .../Libraries/Core/ExtractProperty.cpp | 4 +- .../Libraries/Core/ExtractProperty.h | 2 +- .../Libraries/Core/GetVariable.cpp | 2 +- .../ScriptCanvas/Libraries/Core/GetVariable.h | 2 +- .../ScriptCanvas/Libraries/Core/Method.cpp | 26 ++++----- .../ScriptCanvas/Libraries/Core/Method.h | 6 +- .../Libraries/Core/MethodUtility.cpp | 4 +- .../Libraries/Core/MethodUtility.h | 2 +- .../Libraries/Core/ReceiveScriptEvent.cpp | 14 ++--- .../Libraries/Core/ReceiveScriptEvent.h | 8 +-- .../ScriptCanvas/Libraries/Core/Repeater.cpp | 2 +- .../ScriptCanvas/Libraries/Core/Repeater.h | 2 +- .../Libraries/Core/ScriptEventBase.cpp | 4 +- .../Libraries/Core/ScriptEventBase.h | 2 +- .../Libraries/Core/SendScriptEvent.cpp | 14 ++--- .../ScriptCanvas/Libraries/Core/SetVariable.h | 6 +- .../Libraries/Core/UnaryOperator.h | 4 +- .../ScriptCanvas/Libraries/Entity/Entity.cpp | 2 +- .../ScriptCanvas/Libraries/Libraries.h | 2 +- .../ScriptCanvas/Libraries/Logic/Any.cpp | 2 +- .../ScriptCanvas/Libraries/Logic/Any.h | 6 +- .../ScriptCanvas/Libraries/Logic/Break.h | 4 +- .../ScriptCanvas/Libraries/Logic/Cycle.h | 2 +- .../ScriptCanvas/Libraries/Logic/Gate.h | 2 +- .../ScriptCanvas/Libraries/Logic/IsNull.cpp | 2 +- .../ScriptCanvas/Libraries/Logic/Logic.cpp | 4 +- .../ScriptCanvas/Libraries/Logic/Not.h | 2 +- .../ScriptCanvas/Libraries/Logic/Once.h | 2 +- .../Libraries/Logic/OrderedSequencer.cpp | 24 ++++---- .../Libraries/Logic/OrderedSequencer.h | 12 ++-- .../Libraries/Logic/Sequencer.cpp | 2 +- .../Libraries/Logic/TargetedSequencer.cpp | 24 ++++---- .../Libraries/Logic/TargetedSequencer.h | 8 +-- .../Logic/WeightedRandomSequencer.cpp | 58 +++++++++---------- .../Libraries/Logic/WeightedRandomSequencer.h | 26 ++++----- .../ScriptCanvas/Libraries/Logic/While.cpp | 6 +- .../ScriptCanvas/Libraries/Logic/While.h | 8 +-- .../ScriptCanvas/Libraries/Math/Math.cpp | 4 +- .../Libraries/Math/MathGenerics.h | 2 +- .../Libraries/Math/MathNodeUtilities.cpp | 4 +- .../Libraries/Math/MathNodeUtilities.h | 8 +-- .../ScriptCanvas/Libraries/Math/MathRandom.h | 48 +++++++-------- .../Libraries/Math/RotationNodes.h | 16 ++--- .../Include/ScriptCanvas/Libraries/Math/Sum.h | 2 +- .../Libraries/Math/TransformNodes.h | 20 +++---- .../Libraries/Math/Vector2Nodes.h | 8 +-- .../Libraries/Math/Vector3Nodes.h | 22 +++---- .../Libraries/Math/Vector4Nodes.h | 14 ++--- .../Operators/Containers/OperatorBack.cpp | 2 +- .../Operators/Containers/OperatorInsert.cpp | 2 +- .../Operators/Containers/OperatorSize.cpp | 2 +- .../Operators/Containers/OperatorSize.h | 2 +- .../Libraries/Operators/Math/OperatorAdd.cpp | 4 +- .../Operators/Math/OperatorArithmetic.cpp | 20 +++---- .../Operators/Math/OperatorArithmetic.h | 12 ++-- .../Libraries/Operators/Math/OperatorDiv.cpp | 12 ++-- .../Libraries/Operators/Math/OperatorDiv.h | 2 +- .../Operators/Math/OperatorDivideByNumber.h | 4 +- .../Libraries/Operators/Math/OperatorLerp.cpp | 10 ++-- .../Libraries/Operators/Math/OperatorLerp.h | 14 ++--- .../Operators/Math/OperatorLerpNodeable.h | 2 +- .../Math/OperatorLerpNodeableNode.cpp | 2 +- .../Operators/Math/OperatorLerpNodeableNode.h | 4 +- .../Libraries/Operators/Math/OperatorMul.cpp | 6 +- .../Libraries/Operators/Math/OperatorMul.h | 2 +- .../Libraries/Operators/Math/OperatorSub.cpp | 2 +- .../Libraries/Operators/Math/OperatorSub.h | 2 +- .../Libraries/Operators/Operator.cpp | 12 ++-- .../Libraries/Operators/Operator.h | 6 +- .../Libraries/Operators/Operators.cpp | 2 +- .../Libraries/Spawning/SpawnNodeable.h | 4 +- .../ScriptCanvas/Libraries/String/Format.cpp | 11 ---- .../ScriptCanvas/Libraries/String/Utilities.h | 2 +- .../ScriptCanvas/Libraries/Time/Countdown.h | 2 +- .../Libraries/Time/DelayNodeable.h | 6 +- .../ScriptCanvas/Libraries/Time/Duration.h | 2 +- .../Libraries/Time/DurationNodeable.h | 2 +- .../ScriptCanvas/Libraries/Time/HeartBeat.h | 2 +- .../ScriptCanvas/Libraries/Time/Time.cpp | 4 +- .../ScriptCanvas/Libraries/Time/Timer.h | 4 +- .../Libraries/Time/TimerNodeable.h | 2 +- .../Libraries/UnitTesting/AddFailure.cpp | 10 ---- .../UnitTesting/Auxiliary/Auxiliary.cpp | 14 ++--- .../UnitTesting/Auxiliary/Auxiliary.h | 14 ++--- .../UnitTesting/ExpectGreaterThanEqual.cpp | 6 +- .../Libraries/UnitTesting/ExpectTrue.h | 2 +- 92 files changed, 359 insertions(+), 380 deletions(-) diff --git a/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp b/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp index 38995f8dca..d8fe9e91ca 100644 --- a/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp +++ b/Gems/ScriptCanvas/Code/Asset/RuntimeAssetSystemComponent.cpp @@ -1,8 +1,8 @@ /* * 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 - *s + * */ #include diff --git a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h index 7b6b99d967..2ca5c0857f 100644 --- a/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h +++ b/Gems/ScriptCanvas/Code/Editor/Framework/ScriptCanvasTraceUtilities.h @@ -160,7 +160,7 @@ namespace ScriptCanvasEditor struct ScopedOutputSuppression { - ScopedOutputSuppression([[maybe_unused]] bool suppressState = true) + ScopedOutputSuppression(bool suppressState = true) { AZ::Debug::TraceMessageBus::BroadcastResult(m_oldSuppression, &AZ::Debug::TraceMessageEvents::OnOutput, "", ""); TraceSuppressionBus::Broadcast(&TraceSuppressionRequests::SuppressAllOutput, suppressState); diff --git a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h index 8b01177f79..60e1649620 100644 --- a/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h +++ b/Gems/ScriptCanvas/Code/Editor/Include/ScriptCanvas/Components/EditorGraph.h @@ -110,12 +110,12 @@ namespace ScriptCanvasEditor , m_graphCanvasSaveVersion(GraphCanvas::EntitySaveDataContainer::CurrentVersion) , m_upgradeSM(this) {} - + ~Graph() override; void Activate() override; void Deactivate() override; - + static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { ScriptCanvas::Graph::GetProvidedServices(provided); @@ -160,7 +160,7 @@ namespace ScriptCanvasEditor bool CreateConnection(const GraphCanvas::ConnectionId& connectionId, const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) override; bool IsValidConnection(const GraphCanvas::Endpoint& sourcePoint, const GraphCanvas::Endpoint& targetPoint) const override; - + AZStd::string GetDataTypeString(const AZ::Uuid& typeId) override; void OnRemoveUnusedNodes() override; @@ -188,7 +188,7 @@ namespace ScriptCanvasEditor GraphCanvas::CanHandleMimeEventOutcome CanHandleValueMimeEvent(const GraphCanvas::Endpoint& endpoint, const QMimeData* mimeData) override; bool HandleValueMimeEvent(const GraphCanvas::Endpoint& endpoint, const QMimeData* mimeData) override; - GraphCanvas::SlotId RequestExtension(const GraphCanvas::NodeId& nodeId, const GraphCanvas::ExtenderId& extenderId, GraphModelRequests::ExtensionRequestReason ) override; + GraphCanvas::SlotId RequestExtension(const GraphCanvas::NodeId& nodeId, const GraphCanvas::ExtenderId& extenderId, GraphModelRequests::ExtensionRequestReason) override; void ExtensionCancelled(const GraphCanvas::NodeId& nodeId, const GraphCanvas::ExtenderId& extenderId) override; void FinalizeExtension(const GraphCanvas::NodeId& nodeId, const GraphCanvas::ExtenderId& extenderId) override; @@ -212,7 +212,7 @@ namespace ScriptCanvasEditor void PostCreationEvent() override; void OnPasteBegin() override; void OnPasteEnd() override; - + void OnViewRegistered() override; ///////////////////////////////////////////////////////////////////////////////////////////// @@ -258,7 +258,7 @@ namespace ScriptCanvasEditor AZStd::vector GetNodesOfType(const ScriptCanvas::NodeTypeIdentifier&) override; AZStd::vector GetVariableNodes(const ScriptCanvas::VariableId&) override; - + void RemoveUnusedVariables() override; bool CanConvertVariableNodeToReference(const GraphCanvas::NodeId& nodeId) override; @@ -266,9 +266,9 @@ namespace ScriptCanvasEditor bool ConvertReferenceToVariableNode(const GraphCanvas::Endpoint& endpoint) override; void QueueVersionUpdate(const AZ::EntityId& graphCanvasNodeId) override; - + bool CanExposeEndpoint(const GraphCanvas::Endpoint& endpoint) override; - + ScriptCanvas::Endpoint ConvertToScriptCanvasEndpoint(const GraphCanvas::Endpoint& endpoint) const override; GraphCanvas::Endpoint ConvertToGraphCanvasEndpoint(const ScriptCanvas::Endpoint& endpoint) const override; //// @@ -326,8 +326,8 @@ namespace ScriptCanvasEditor Graph(const Graph&) = delete; void DisplayUpdateToast(); - - AZ::EntityId ConvertToScriptCanvasNodeId(const GraphCanvas::NodeId& nodeId) const; + + AZ::EntityId ConvertToScriptCanvasNodeId(const GraphCanvas::NodeId& nodeId) const; GraphCanvas::NodePropertyDisplay* CreateDisplayPropertyForSlot(const AZ::EntityId& scriptCanvasNodeId, const ScriptCanvas::SlotId& scriptCanvasSlotId) const; @@ -363,10 +363,10 @@ namespace ScriptCanvasEditor AZ::EntityId m_wrapperNodeDropTarget; VariableComboBoxDataModel m_variableDataModel; - + WrappedNodeGroupingMap m_wrappedNodeGroupings; AZStd::vector< AZ::EntityId > m_lastGraphCanvasCreationGroup; - + AZ::Entity* m_graphCanvasSceneEntity; GraphCanvas::EntitySaveDataContainer::VersionInformation m_graphCanvasSaveVersion; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h index b01e23419c..111ee7f339 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/GraphBus.h @@ -54,7 +54,7 @@ namespace ScriptCanvas virtual bool FindConnection(AZ::Entity*& connectionEntity, const Endpoint& firstEndpoint, const Endpoint& otherEndpoint) const = 0; virtual Slot* FindSlot(const Endpoint& endpoint) const = 0; - + //! Retrieves the Entity this Graph component is located on //! NOTE: There can be multiple Graph components on the same entity so calling FindComponent may not not return this GraphComponent virtual AZ::Entity* GetGraphEntity() const = 0; @@ -62,7 +62,7 @@ namespace ScriptCanvas //! Retrieves the Graph Component directly using the BusId virtual Graph* GetGraph() = 0; - virtual bool Connect(const AZ::EntityId& sourceNodeId, const SlotId& sourceSlot, const AZ::EntityId& targetNodeId,const SlotId& targetSlot) = 0; + virtual bool Connect(const AZ::EntityId& sourceNodeId, const SlotId& sourceSlot, const AZ::EntityId& targetNodeId, const SlotId& targetSlot) = 0; virtual bool Disconnect(const AZ::EntityId& sourceNodeId, const SlotId& sourceSlot, const AZ::EntityId& targetNodeId, const SlotId& targetSlot) = 0; virtual bool ConnectByEndpoint(const Endpoint& sourceEndpoint, const Endpoint& targetEndpoint) = 0; @@ -91,7 +91,7 @@ namespace ScriptCanvas virtual bool AddItem(AZ::Entity* itemEntity) = 0; //! Remove item if it is on the graph virtual bool RemoveItem(AZ::Entity* itemEntity) = 0; - + //! Retrieves a pointer the GraphData structure stored on the graph virtual GraphData* GetGraphData() = 0; virtual const GraphData* GetGraphDataConst() const = 0; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp index 1575cd2c75..d28f375707 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp @@ -130,12 +130,12 @@ namespace ScriptCanvas { return IsIDRequired(); } - + bool EBusEventHandler::IsAutoConnected() const { return m_autoConnectToGraphOwner; } - + const Datum* EBusEventHandler::GetHandlerStartAddress() const { return FindDatum(GetSlotId(c_busIdName)); @@ -203,7 +203,7 @@ namespace ScriptCanvas { return AZ::Success(entry->m_eventName); } - + return AZ::Failure(); } @@ -244,7 +244,7 @@ namespace ScriptCanvas { return EventHandlerTranslationHelper::GetSlotsInExecutionThreadByType(*this, executionSlot, targetSlotType); } - + AZStd::vector EBusEventHandler::GetNonEventSlotIds() const { AZStd::vector nonEventSlotIds; @@ -311,7 +311,7 @@ namespace ScriptCanvas return true; } - const AZ::BehaviorEBusHandler::BusForwarderEvent& event = m_handler->GetEvents()[eventIndex]; + const AZ::BehaviorEBusHandler::BusForwarderEvent& event = m_handler->GetEvents()[eventIndex]; // Compare output type const bool eventHasOutput = !event.m_parameters.empty() && !event.m_parameters.front().m_typeId.IsNull() && event.m_parameters.front().m_typeId != azrtti_typeid(); @@ -451,7 +451,7 @@ namespace ScriptCanvas config.m_name = c_busIdName; config.m_toolTip = busToolTip; config.SetConnectionType(ConnectionType::Input); - + if (busId == azrtti_typeid()) { config.SetDefaultValue(GraphOwnerId); @@ -459,7 +459,7 @@ namespace ScriptCanvas else { Data::Type busIdType(AZ::BehaviorContextHelper::IsStringParameter(m_ebus->m_idParam) ? Data::Type::String() : Data::FromAZType(busId)); - + config.ConfigureDatum(AZStd::move(Datum(busIdType, Datum::eOriginality::Original))); } @@ -655,7 +655,7 @@ namespace ScriptCanvas return AZStd::find(m_parameterSlotIds.begin(), m_parameterSlotIds.end(), slotId) != m_parameterSlotIds.end(); } } - + bool EBusEventEntry::EBusEventEntryVersionConverter(AZ::SerializeContext& serializeContext, AZ::SerializeContext::DataElementNode& rootElement) { if (rootElement.GetVersion() == 0) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h index 54776f18de..4e4c3f45c4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.h @@ -36,7 +36,7 @@ namespace ScriptCanvas static void Reflect(AZ::ReflectContext* context); AZ_TYPE_INFO(EBusEventEntry, "{92A20C1B-A54A-4583-97DB-A894377ACE21}"); - + AZStd::string m_eventName; EBusEventId m_eventId; SlotId m_eventSlotId; @@ -44,7 +44,7 @@ namespace ScriptCanvas AZStd::vector m_parameterSlotIds; int m_numExpectedArguments = {}; bool m_resultEvaluated = {}; - + bool m_shouldHandleEvent = false; bool m_isHandlingEvent = false; @@ -54,7 +54,7 @@ namespace ScriptCanvas }; //! Provides a node that represents an EBus handler - class EBusEventHandler + class EBusEventHandler : public Node , public EBusHandlerNodeRequestBus::Handler { @@ -68,7 +68,7 @@ namespace ScriptCanvas using Events = AZStd::vector; using EventMap = AZStd::map; - EBusEventHandler() + EBusEventHandler() : m_autoConnectToGraphOwner(true) {} @@ -79,7 +79,7 @@ namespace ScriptCanvas void OnInit() override; void OnActivate() override; void OnGraphSet() override; - + void CollectVariableReferences(AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const override; bool ContainsReferencesToVariables(const AZStd::unordered_set< ScriptCanvas::VariableId >& variableIds) const override; @@ -93,10 +93,10 @@ namespace ScriptCanvas void InitializeEvent(int eventIndex); - bool IsOutOfDate(const VersionData& graphVersion) const override; - + bool IsOutOfDate(const VersionData& graphVersion) const override; + bool CreateHandler(AZStd::string_view ebusName); - + const EBusEventEntry* FindEventWithSlot(const Slot& slot) const; AZ::Outcome GetFunctionCallName(const Slot* /*slot*/) const override; @@ -119,7 +119,7 @@ namespace ScriptCanvas AZStd::vector GetNonEventSlotIds() const override; AZ::Outcome GetDependencies() const override; - + bool IsEventSlotId(const SlotId& slotId) const; bool IsEventHandler() const override; @@ -129,7 +129,7 @@ namespace ScriptCanvas bool IsVariableWriteHandler() const override; bool IsValid() const; - + inline bool IsIDRequired() const { return m_ebus && BehaviorContextUtils::GetEBusAddressPolicy(*m_ebus) == AZ::EBusAddressPolicy::ById; @@ -156,11 +156,11 @@ namespace ScriptCanvas ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& executionSlot, CombinedSlotType targetSlotType, const Slot* executionChildSlot) const override; inline bool IsConfigured() const { return !m_eventMap.empty(); } - + private: EBusEventHandler(const EBusEventHandler&) = delete; - + EventMap m_eventMap; AZStd::string m_ebusName; ScriptCanvas::EBusBusId m_busId; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp index 574ccaeecb..e2f2627bbc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.cpp @@ -56,7 +56,7 @@ namespace ScriptCanvas AddPropertySlots(dataType); } } - + Data::Type ExtractProperty::GetSourceSlotDataType() const { return m_dataType; @@ -81,7 +81,7 @@ namespace ScriptCanvas { return AZ::Success(DependencyReport::NativeLibrary(Data::GetName(m_dataType))); } - + PropertyFields ExtractProperty::GetPropertyFields() const { PropertyFields propertyFields; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h index 7cde7401db..d686ae0e1e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ExtractProperty.h @@ -44,7 +44,7 @@ namespace ScriptCanvas bool IsOutOfDate(const VersionData& graphVersion) const override; //// - + protected: void OnInit() override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp index fb6d2f21e7..f78a57308a 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.cpp @@ -289,7 +289,7 @@ namespace ScriptCanvas const GraphVariableMapping* variableMap = nullptr; GraphRequestBus::EventResult(variableMap, GetOwningScriptCanvasId(), &GraphRequests::GetVariables); - + if (variableMap && baseType.IsValid()) { for (const auto& variablePair : *variableMap) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h index a73d6b27b3..08d8d115d5 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/GetVariable.h @@ -58,7 +58,7 @@ namespace ScriptCanvas const Slot* GetVariableOutputSlot() const override; // Translation ////////////////////////////////////////////////////////////////////////// - + protected: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp index 7812d80717..32b5e5741f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.cpp @@ -121,7 +121,7 @@ namespace ScriptCanvas { return AZ::Failure(); } - + DependencyReport dependencyNames; for (size_t index(0), sentinel = m_method->GetNumArguments(); index < sentinel; ++index) { @@ -131,7 +131,7 @@ namespace ScriptCanvas return AZ::Success(dependencyNames); } - + AZ::Outcome Method::GetFunctionCallLexicalScope(const Slot* /*slot*/) const { if (m_method) @@ -139,7 +139,7 @@ namespace ScriptCanvas Grammar::LexicalScope lexicalScope; if (m_method->IsMember() - || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, m_method->m_attributes)) + || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, m_method->m_attributes)) { lexicalScope.m_type = Grammar::LexicalScopeType::Variable; } @@ -160,7 +160,7 @@ namespace ScriptCanvas if (m_method) { if (m_method->IsMember() - || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, m_method->m_attributes)) + || AZ::FindAttribute(AZ::Script::Attributes::TreatAsMemberFunction, m_method->m_attributes)) { auto name = BehaviorContextUtils::FindExposedMethodName(*m_method, m_class); if (!name.empty()) @@ -172,7 +172,7 @@ namespace ScriptCanvas return AZ::Success(m_lookupName); } - + EventType Method::GetFunctionEventType(const Slot*) const { return m_eventType; @@ -206,7 +206,7 @@ namespace ScriptCanvas m_lookupName = config.m_lookupName ? AZStd::string(*config.m_lookupName) : config.m_method.m_name; m_methodType = config.m_methodType; m_eventType = config.m_eventType; - + auto isExposableOutcome = IsExposable(config.m_method); AZ_Warning("ScriptCanvas", isExposableOutcome.IsSuccess(), "BehaviorContext Method %s is no longer exposable to ScriptCanvas: %s", isExposableOutcome.GetError().data()); ConfigureMethod(config.m_method, config.m_class); @@ -322,7 +322,7 @@ namespace ScriptCanvas } } - void Method::InitializeEvent(const NamespacePath&, AZStd::string_view ebusName, AZStd::string_view eventName) + void Method::InitializeEvent(const NamespacePath&, AZStd::string_view ebusName, AZStd::string_view eventName) { AZStd::lock_guard lock(m_mutex); @@ -698,7 +698,7 @@ namespace ScriptCanvas return TupleType{ method, m_methodType, eventType, bcClass }; } - return TupleType{ nullptr, MethodType::Count, EventType::Count, nullptr}; + return TupleType{ nullptr, MethodType::Count, EventType::Count, nullptr }; } void Method::OnWriteEnd() @@ -804,13 +804,13 @@ namespace ScriptCanvas { editContext->Class("Method", "Method") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ; } } } - } - } -} + } + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h index 930b6e8539..db34da040c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Method.h @@ -182,6 +182,6 @@ namespace ScriptCanvas Method(const Method&) = delete; }; - } - } -} + } + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp index ea3f2015b1..bfb54d5421 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.cpp @@ -27,7 +27,7 @@ namespace ScriptCanvas AZStd::unordered_map GetTupleGetMethods(const AZ::TypeId& typeId) { AZStd::unordered_map tupleGetMethodMap; - + AZ::BehaviorContext* behaviorContext{}; AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationRequests::GetBehaviorContext); auto bcClassIterator = behaviorContext->m_typeToClassMap.find(typeId); @@ -83,4 +83,4 @@ namespace ScriptCanvas return AZ::Failure(); } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h index 890cb2427d..a6cd84dbf6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/MethodUtility.h @@ -24,4 +24,4 @@ namespace ScriptCanvas AZStd::unordered_map GetTupleGetMethods(const AZ::TypeId& typeId); AZ::Outcome GetTupleGetMethod(const AZ::TypeId& typeID, size_t index); -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp index 9cbbd03e9a..190c1a78c0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp @@ -93,7 +93,7 @@ namespace ScriptCanvas bool isNewSlot = true; const auto busToolTip = AZStd::string::format("%s (Type: %s)", c_busIdTooltip, m_ebus->m_idParam.m_name); - const AZ::TypeId& busId = m_ebus->m_idParam.m_typeId; + const AZ::TypeId& busId = m_ebus->m_idParam.m_typeId; SlotId addressSlotId; @@ -117,8 +117,8 @@ namespace ScriptCanvas } else { - Data::Type busIdType(AZ::BehaviorContextHelper::IsStringParameter(m_ebus->m_idParam) ? Data::Type::String() : Data::FromAZType(busId)); - + Data::Type busIdType(AZ::BehaviorContextHelper::IsStringParameter(m_ebus->m_idParam) ? Data::Type::String() : Data::FromAZType(busId)); + config.ConfigureDatum(AZStd::move(Datum(busIdType, Datum::eOriginality::Original))); config.m_contractDescs = { { [busIdType]() { return aznew RestrictedTypeContract({ busIdType }); } } }; } @@ -267,7 +267,7 @@ namespace ScriptCanvas SlotId slotId = AddSlot(slotConfiguration, isNewSlot); AZ_Error("ScriptCanvas", populationMapping.find(argIdentifier) == populationMapping.end(), "Trying to create the same slot twice. Unable to create sane mapping."); - + populationMapping[argIdentifier] = slotId; eBusEventEntry.m_parameterSlotIds.push_back(slotId); } @@ -281,7 +281,7 @@ namespace ScriptCanvas slotConfiguration.m_isLatent = true; slotConfiguration.m_name = eventID; - slotConfiguration.SetConnectionType(ConnectionType::Output); + slotConfiguration.SetConnectionType(ConnectionType::Output); slotConfiguration.m_addUniqueSlotByNameAndType = true; auto remappingIter = m_eventSlotMapping.find(outputSlotId); @@ -323,7 +323,7 @@ namespace ScriptCanvas void ReceiveScriptEvent::OnDeactivate() { ScriptEventBase::OnDeactivate(); - } + } const Internal::ScriptEventEntry* ReceiveScriptEvent::FindEventWithSlot(const Slot& slot) const { @@ -535,7 +535,7 @@ namespace ScriptCanvas { AZ::BehaviorContext* behaviorContext = nullptr; AZ::ComponentApplicationBus::BroadcastResult(behaviorContext, &AZ::ComponentApplicationBus::Events::GetBehaviorContext); - + const auto& ebusIterator = behaviorContext->m_ebuses.find(m_definition.GetName()); if (ebusIterator == behaviorContext->m_ebuses.end()) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h index 59800c943f..ea86d263f8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.h @@ -54,11 +54,11 @@ namespace ScriptCanvas AZStd::optional GetEventIndex(AZStd::string eventName) const override; AZStd::vector GetEventSlotIds() const override; AZStd::vector GetNonEventSlotIds() const override; - + bool IsIDRequired() const; - + bool IsEventSlotId(const SlotId& slotId) const; - + // NodeVersioning... bool IsOutOfDate(const VersionData& graphVersion) const override; UpdateResult OnUpdateNode() override; @@ -122,6 +122,6 @@ namespace ScriptCanvas bool m_connected; }; - } + } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp index 964c2b8454..b5c2f90fcd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.cpp @@ -59,7 +59,7 @@ namespace ScriptCanvas if (slot == nullptr) { // Handle older versions and improperly updated names - for (auto testUnit : { BaseTimerNode::TimeUnits::Seconds, BaseTimerNode::TimeUnits::Ticks}) + for (auto testUnit : { BaseTimerNode::TimeUnits::Seconds, BaseTimerNode::TimeUnits::Ticks }) { AZStd::string legacyName = BaseTimerNode::s_timeUnitNames[static_cast(testUnit)]; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h index 0cd9c73c98..b7c3dfb698 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/Repeater.h @@ -31,7 +31,7 @@ namespace ScriptCanvas const char* GetTimeSlotFormat() const override { return "Delay (%s)"; } const char* GetBaseTimeSlotName() const override { return "Interval"; } const char* GetBaseTimeSlotToolTip() const override { return "The Interval between repetitions"; } - + protected: int m_repetionCount; }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp index 45314b73f3..52f7b538ef 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.cpp @@ -21,7 +21,7 @@ namespace ScriptCanvas { namespace Internal { - void ScriptEventEntry::Reflect(AZ::ReflectContext* context) + void ScriptEventEntry::Reflect(AZ::ReflectContext* context) { if (AZ::SerializeContext* serialize = azrtti_cast(context)) { @@ -154,7 +154,7 @@ namespace ScriptCanvas } m_definition = definition; - } + } void ScriptEventBase::OnDeactivate() { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h index 5b2104f5dd..5baa76f4b6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ScriptEventBase.h @@ -106,7 +106,7 @@ namespace ScriptCanvas AZStd::pair, bool> IsAssetOutOfDate() const; - virtual void Initialize(const AZ::Data::AssetId assetId); + virtual void Initialize(const AZ::Data::AssetId assetId); protected: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp index 345fb5e5e8..4ce7ee6e02 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp @@ -208,7 +208,7 @@ namespace ScriptCanvas asset.BlockUntilLoadComplete(); const ScriptEvents::ScriptEvent& definition = asset.Get()->m_definition; - + // If no name has been serialized, this is a new node, so initialize it to the Script Event's definition values. if (m_busId == ScriptCanvas::EBusBusId()) { @@ -232,7 +232,7 @@ namespace ScriptCanvas } NamespacePath emptyNamespacePath; - + ScriptEvents::ScriptEventBus::BroadcastResult(m_scriptEvent, &ScriptEvents::ScriptEventRequests::RegisterScriptEvent, assetId, m_version); AZ::BehaviorMethod* method{}; @@ -299,9 +299,9 @@ namespace ScriptCanvas ScriptEvents::Method scriptEventMethod; definition.FindMethod(method->m_name, scriptEventMethod); - + size_t argIndex = 0; - + // Address slot (BusId) if (method->HasBusId()) { @@ -397,7 +397,7 @@ namespace ScriptCanvas { return true; } - + RegisterScriptEvent(asset); if (asset && asset.IsReady()) @@ -428,7 +428,7 @@ namespace ScriptCanvas { ConfigureMethod(*method); InitializeResultSlotId(); - + return true; } } @@ -528,7 +528,7 @@ namespace ScriptCanvas if (m_scriptEvent == nullptr) { return false; - } + } m_ebus = m_scriptEvent->GetBehaviorBus(); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h index b985cabfa8..05695a9b1e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SetVariable.h @@ -61,13 +61,13 @@ namespace ScriptCanvas PropertyFields GetPropertyFields() const override; // Translation ////////////////////////////////////////////////////////////////////////// - + protected: void OnInit() override; - void OnPostActivate() override; - + void OnPostActivate() override; + void AddSlots(); void RemoveSlots(); void AddPropertySlots(const Data::Type& type); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h index 9805c6d9ef..fbc481bb48 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/UnaryOperator.h @@ -42,7 +42,7 @@ namespace ScriptCanvas void ConfigureSlots() override; - SlotId GetOutputSlotId() const; + SlotId GetOutputSlotId() const; }; class UnaryExpression : public UnaryOperator @@ -56,7 +56,7 @@ namespace ScriptCanvas void ConfigureSlots() override; - virtual void InitializeUnaryExpression(); + virtual void InitializeUnaryExpression(); }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp index 914a8cea28..b3bb5f474f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Entity/Entity.cpp @@ -62,7 +62,7 @@ namespace ScriptCanvas const AZ::TypeId nodeFunctionGenericMultiReturnTemplateTypeId("{DC5B1799-6C5B-4190-8D90-EF0C2D1BCE4E}"); const AZ::TypeId oldEntityIdIsValidFuncSignatureTypeId = azrtti_typeid(); const AZ::TypeId oldEntityIdIsValidTypeId("{7CEC53AE-E12B-4738-B542-4587B8B95DC2}"); - + // Aggregate NodeFunctionGenericMultiReturn typeid // NOTE: Aggregation order addition is not commutative and must be in the added last to first: (FirstUuid + ( SecondUuid + (ThirdUuid + ... + (NthUuid)) const AZ::TypeId oldIsValidNodeAggregateTypeId = nodeFunctionGenericMultiReturnTemplateTypeId + (oldEntityIdIsValidFuncSignatureTypeId + oldEntityIdIsValidTypeId); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h index ccc65027ed..529b74d7ab 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Libraries.h @@ -60,7 +60,7 @@ namespace ScriptCanvas virtual ~LibraryDefinition() = default; static const NodeRegistry::NodeList GetNodes(const AZ::Uuid& libraryType) - { + { NodeRegistry& registry = (*GetNodeRegistry()); const auto& libraryIterator = registry.m_nodeMap.find(libraryType); if (libraryIterator != registry.m_nodeMap.end()) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp index 465c336815..54430a3794 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.cpp @@ -28,7 +28,7 @@ namespace ScriptCanvas return AZ::Success(DependencyReport{}); } - bool Any::IsNoOp() const + bool Any::IsNoOp() const { return true; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h index 9fd676c22a..efc8be90d0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Any.h @@ -30,7 +30,7 @@ namespace ScriptCanvas Current }; - + public: SCRIPTCANVAS_NODE(Any); @@ -52,10 +52,10 @@ namespace ScriptCanvas //// /// Translation - bool IsNoOp() const override; + bool IsNoOp() const override; AZ::Outcome GetDependencies() const override; - + protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot&, CombinedSlotType targetSlotType, const Slot*) const override { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Break.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Break.h index 6d0718ff2e..3555fea2e2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Break.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Break.h @@ -27,11 +27,11 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(Break); - Break() = default; + Break() = default; AZ::Outcome GetDependencies() const override; - + }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h index 2d26a1f816..3d903018d0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Cycle.h @@ -54,7 +54,7 @@ namespace ScriptCanvas void FixupStateNames(); int m_numOutputs; - + size_t m_executionSlot; AZStd::vector< SlotId > m_orderedOutputSlots; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h index a8e04489d0..ae9c25573b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Gate.h @@ -32,7 +32,7 @@ namespace ScriptCanvas AZ::Outcome GetDependencies() const override; - bool IsIfBranch() const override { return true; } + bool IsIfBranch() const override { return true; } protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp index 85cefcf5aa..851ccb24dd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/IsNull.cpp @@ -39,7 +39,7 @@ namespace ScriptCanvas { { auto func = []() { return aznew IsReferenceTypeContract(); }; - ContractDescriptor descriptor{ AZStd::move(func) }; + ContractDescriptor descriptor{ AZStd::move(func) }; DynamicDataSlotConfiguration slotConfiguration; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp index 444a312edc..96e511fa49 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Logic.cpp @@ -53,7 +53,7 @@ namespace ScriptCanvas AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); - AddNodeToRegistry(nodeRegistry); + AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); @@ -78,7 +78,7 @@ namespace ScriptCanvas ScriptCanvas::Nodes::Logic::TargetedSequencer::CreateDescriptor(), ScriptCanvas::Nodes::Logic::WeightedRandomSequencer::CreateDescriptor(), ScriptCanvas::Nodes::Logic::While::CreateDescriptor(), - }); + }); } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h index ee61c6637a..119a36e682 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Not.h @@ -63,7 +63,7 @@ namespace ScriptCanvas } // Translation ////////////////////////////////////////////////////////////////////////// - }; + }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h index 31bcf9a158..fc06fafbbe 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Once.h @@ -29,7 +29,7 @@ namespace ScriptCanvas Once(); - AZ::Outcome GetDependencies() const override; + AZ::Outcome GetDependencies() const override; protected: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp index c7c3834594..4061b9adbe 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.cpp @@ -18,7 +18,7 @@ namespace ScriptCanvas OrderedSequencer::OrderedSequencer() : Node() , m_numOutputs(0) - { + { } AZ::Outcome OrderedSequencer::GetDependencies() const @@ -67,15 +67,15 @@ namespace ScriptCanvas visualExtensions.m_connectionType = ConnectionType::Output; visualExtensions.m_identifier = AZ::Crc32("AddOutputGroup"); visualExtensions.m_displayGroup = GetDisplayGroup(); - + RegisterExtension(visualExtensions); } } - + bool OrderedSequencer::CanDeleteSlot(const SlotId& slotId) const { - Slot* slot = GetSlot(slotId); - + Slot* slot = GetSlot(slotId); + // Only remove execution out slots when we have more then 1 output slot. if (slot && slot->IsExecution() && slot->IsOutput()) { @@ -88,17 +88,17 @@ namespace ScriptCanvas SlotId OrderedSequencer::HandleExtension([[maybe_unused]] AZ::Crc32 extensionId) { ExecutionSlotConfiguration executionConfiguration(GenerateOutputName(m_numOutputs), ConnectionType::Output); - + executionConfiguration.m_addUniqueSlotByNameAndType = false; executionConfiguration.m_displayGroup = GetDisplayGroup(); - + ++m_numOutputs; - + return AddSlot(executionConfiguration); } void OrderedSequencer::OnSlotRemoved([[maybe_unused]] const SlotId& slotId) - { + { FixupStateNames(); } @@ -107,12 +107,12 @@ namespace ScriptCanvas AZStd::string slotName = AZStd::string::format("Out %i", counter); return AZStd::move(slotName); } - + void OrderedSequencer::FixupStateNames() { auto outputSlots = GetAllSlotsByDescriptor(SlotDescriptors::ExecutionOut()); m_numOutputs = static_cast(outputSlots.size()); - + for (int i = 0; i < outputSlots.size(); ++i) { Slot* slot = GetSlot(outputSlots[i]->GetId()); @@ -122,7 +122,7 @@ namespace ScriptCanvas slot->Rename(GenerateOutputName(i)); } } - } + } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h index f973446702..ca07b60834 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/OrderedSequencer.h @@ -22,7 +22,7 @@ namespace ScriptCanvas class OrderedSequencer : public Node { - + public: SCRIPTCANVAS_NODE(OrderedSequencer); @@ -43,10 +43,10 @@ namespace ScriptCanvas void ConfigureVisualExtensions() override; - + protected: - + AZStd::string GetDisplayGroup() const { return "OutputGroup"; } protected: @@ -57,11 +57,11 @@ namespace ScriptCanvas AZStd::string GenerateOutputName(int counter) const; void FixupStateNames(); - + int m_numOutputs; - + AZStd::vector< SlotId > m_orderedOutputSlots; }; } - } + } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp index ca32a5eb5a..1612727fc3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/Sequencer.cpp @@ -29,7 +29,7 @@ namespace ScriptCanvas { auto inSlot = SequencerProperty::GetInSlot(this); auto nextSlot = SequencerProperty::GetNextSlot(this); - + if (inSlot && inSlot->IsConnected()) { // Replace by TargetedSequencer diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp index 445c91e1fc..5e47397e46 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.cpp @@ -18,9 +18,9 @@ namespace ScriptCanvas TargetedSequencer::TargetedSequencer() : Node() , m_numOutputs(0) - { + { } - + void TargetedSequencer::OnInit() { m_numOutputs = static_cast(GetAllSlotsByDescriptor(SlotDescriptors::ExecutionOut()).size()); @@ -45,11 +45,11 @@ namespace ScriptCanvas RegisterExtension(visualExtensions); } } - + bool TargetedSequencer::CanDeleteSlot(const SlotId& slotId) const { - Slot* slot = GetSlot(slotId); - + Slot* slot = GetSlot(slotId); + // Only remove execution out slots when we have more then 1 output slot. if (slot && slot->IsExecution() && slot->IsOutput()) { @@ -62,17 +62,17 @@ namespace ScriptCanvas SlotId TargetedSequencer::HandleExtension([[maybe_unused]] AZ::Crc32 extensionId) { ExecutionSlotConfiguration executionConfiguration(GenerateOutputName(m_numOutputs), ConnectionType::Output); - + executionConfiguration.m_addUniqueSlotByNameAndType = false; executionConfiguration.m_displayGroup = GetDisplayGroup(); - + ++m_numOutputs; - + return AddSlot(executionConfiguration); } void TargetedSequencer::OnSlotRemoved([[maybe_unused]] const SlotId& slotId) - { + { FixupStateNames(); } @@ -81,12 +81,12 @@ namespace ScriptCanvas AZStd::string slotName = AZStd::string::format("Out %i", counter); return AZStd::move(slotName); } - + void TargetedSequencer::FixupStateNames() { auto outputSlots = GetAllSlotsByDescriptor(SlotDescriptors::ExecutionOut()); m_numOutputs = static_cast(outputSlots.size()); - + for (int i = 0; i < outputSlots.size(); ++i) { Slot* slot = GetSlot(outputSlots[i]->GetId()); @@ -96,7 +96,7 @@ namespace ScriptCanvas slot->Rename(GenerateOutputName(i)); } } - } + } } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h index 68bf1601f7..f263d8d9e4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/TargetedSequencer.h @@ -31,10 +31,10 @@ namespace ScriptCanvas void OnInit() override; void OnConfigured() override; void ConfigureVisualExtensions() override; - + bool CanDeleteSlot(const SlotId& slotId) const; - SlotId HandleExtension(AZ::Crc32 extensionId); + SlotId HandleExtension(AZ::Crc32 extensionId); // Script Canvas Translation... bool IsSwitchStatement() const override { return true; } @@ -51,7 +51,7 @@ namespace ScriptCanvas ////////////////////////////////////////////////////////////////////////// protected: - + AZStd::string GetDisplayGroup() const { return "OutputGroup"; } void OnSlotRemoved(const SlotId& slotId) override; @@ -60,7 +60,7 @@ namespace ScriptCanvas AZStd::string GenerateOutputName(int counter); void FixupStateNames(); - + int m_numOutputs; }; } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp index 21b2ead10e..1954821587 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.cpp @@ -30,7 +30,7 @@ namespace ScriptCanvas return AZ::Success(DependencyReport()); } - ConstSlotsOutcome WeightedRandomSequencer::GetSlotsInExecutionThreadByTypeImpl(const Slot& , CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const + ConstSlotsOutcome WeightedRandomSequencer::GetSlotsInExecutionThreadByTypeImpl(const Slot&, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const { return AZ::Success(GetSlotsByType(targetSlotType)); } @@ -45,7 +45,7 @@ namespace ScriptCanvas ->Version(1) ->Field("WeightSlotId", &WeightedPairing::m_weightSlotId) ->Field("ExecutionSlotId", &WeightedPairing::m_executionSlotId) - ; + ; } } } @@ -57,7 +57,7 @@ namespace ScriptCanvas EndpointNotificationBus::MultiHandler::BusConnect({ GetEntityId(), weightedPairing.m_weightSlotId }); EndpointNotificationBus::MultiHandler::BusConnect({ GetEntityId(), weightedPairing.m_executionSlotId }); } - + // We always want at least one weighted transition state if (m_weightedPairings.empty()) { @@ -130,7 +130,7 @@ namespace ScriptCanvas return isValid; } - + SlotId WeightedRandomSequencer::HandleExtension(AZ::Crc32 extensionId) { auto weightedPairing = AddWeightedPair(); @@ -162,9 +162,9 @@ namespace ScriptCanvas { for (auto pairIter = m_weightedPairings.begin(); pairIter != m_weightedPairings.end(); ++pairIter) { - + if (pairIter->m_executionSlotId == slotId - || pairIter->m_weightSlotId == slotId) + || pairIter->m_weightSlotId == slotId) { SlotId executionSlot = pairIter->m_executionSlotId; SlotId weightSlot = pairIter->m_weightSlotId; @@ -178,15 +178,15 @@ namespace ScriptCanvas else if (slotId == weightSlot) { RemoveSlot(executionSlot); - } - + } + break; } } - + FixupStateNames(); } - + bool WeightedRandomSequencer::AllWeightsFilled() const { bool isFilled = true; @@ -197,7 +197,7 @@ namespace ScriptCanvas isFilled = false; break; } - } + } return isFilled; } @@ -225,15 +225,15 @@ namespace ScriptCanvas return hasExcess; } - + WeightedRandomSequencer::WeightedPairing WeightedRandomSequencer::AddWeightedPair() { int counterWeight = static_cast(m_weightedPairings.size()) + 1; - - WeightedPairing weightedPairing; + + WeightedPairing weightedPairing; DataSlotConfiguration dataSlotConfiguration; - + dataSlotConfiguration.SetConnectionType(ConnectionType::Input); dataSlotConfiguration.m_name = GenerateDataName(counterWeight); dataSlotConfiguration.m_toolTip = "The weight associated with the execution state."; @@ -242,24 +242,24 @@ namespace ScriptCanvas dataSlotConfiguration.SetDefaultValue(1.0f); dataSlotConfiguration.m_displayGroup = GetDisplayGroup(); - + weightedPairing.m_weightSlotId = AddSlot(dataSlotConfiguration); - + ExecutionSlotConfiguration slotConfiguration; - + slotConfiguration.m_name = GenerateOutName(counterWeight); slotConfiguration.m_addUniqueSlotByNameAndType = false; slotConfiguration.SetConnectionType(ConnectionType::Output); slotConfiguration.m_displayGroup = GetDisplayGroup(); - - weightedPairing.m_executionSlotId = AddSlot(slotConfiguration); - + + weightedPairing.m_executionSlotId = AddSlot(slotConfiguration); + m_weightedPairings.push_back(weightedPairing); return weightedPairing; } - + void WeightedRandomSequencer::FixupStateNames() { int counter = 1; @@ -267,30 +267,30 @@ namespace ScriptCanvas { AZStd::string dataName = GenerateDataName(counter); AZStd::string executionName = GenerateOutName(counter); - + Slot* dataSlot = GetSlot(weightedPairing.m_weightSlotId); - + if (dataSlot) { dataSlot->Rename(dataName); } - + Slot* executionSlot = GetSlot(weightedPairing.m_executionSlotId); - + if (executionSlot) { executionSlot->Rename(executionName); } - + ++counter; } } - + AZStd::string WeightedRandomSequencer::GenerateDataName(int counter) { return AZStd::string::format("Weight %i", counter); } - + AZStd::string WeightedRandomSequencer::GenerateOutName(int counter) { return AZStd::string::format("Out %i", counter); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h index d8be2a95c6..cffd7569c3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/WeightedRandomSequencer.h @@ -26,10 +26,10 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(WeightedRandomSequencer); static void ReflectDataTypes(AZ::ReflectContext* reflectContext); - + WeightedRandomSequencer() = default; ~WeightedRandomSequencer() = default; - + AZ::Outcome GetDependencies() const override; ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& executionSlot, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override; @@ -39,20 +39,20 @@ namespace ScriptCanvas void ConfigureVisualExtensions() override; bool OnValidateNode(ValidationResults& validationResults); - - SlotId HandleExtension(AZ::Crc32 extensionId) override; + + SlotId HandleExtension(AZ::Crc32 extensionId) override; bool CanDeleteSlot(const SlotId& slotId) const override; void OnSlotRemoved(const SlotId& slotId) override; //// - + protected: AZ::Crc32 GetWeightExtensionId() const { return AZ_CRC("WRS_Weight_Extension", 0xd17b9467); } AZ::Crc32 GetExecutionExtensionId() const { return AZ_CRC("WRS_Execution_Extension", 0x0706035e); } - AZStd::string GetDisplayGroup() const { return "WeightedExecutionGroup"; } - + AZStd::string GetDisplayGroup() const { return "WeightedExecutionGroup"; } + private: struct WeightedPairing @@ -68,22 +68,22 @@ namespace ScriptCanvas int m_totalWeight; SlotId m_executionSlotId; }; - + void RemoveWeightedPair(SlotId slotId); - + bool AllWeightsFilled() const; bool HasExcessEndpoints() const; - + WeightedPairing AddWeightedPair(); void FixupStateNames(); - + AZStd::string GenerateDataName(int counter); - AZStd::string GenerateOutName(int counter); + AZStd::string GenerateOutName(int counter); using WeightedPairingList = AZStd::vector; WeightedPairingList m_weightedPairings; }; } - } + } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.cpp index 25535d3102..ffc3af4832 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.cpp @@ -19,7 +19,7 @@ namespace ScriptCanvas { return AZ::Success(DependencyReport{}); } - + SlotId While::GetLoopFinishSlotId() const { return WhileProperty::GetOutSlotId(const_cast(this)); @@ -31,8 +31,8 @@ namespace ScriptCanvas } bool While::IsFormalLoop() const - { - return true; + { + return true; } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h index bb0ed3088b..b4ce578bee 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Logic/While.h @@ -29,11 +29,11 @@ namespace ScriptCanvas AZ::Outcome GetDependencies() const override; SlotId GetLoopFinishSlotId() const override; - + SlotId GetLoopSlotId() const override; - - bool IsFormalLoop() const override; - + + bool IsFormalLoop() const override; + protected: ConstSlotsOutcome GetSlotsInExecutionThreadByTypeImpl(const Slot& /*executionSlot*/, CombinedSlotType targetSlotType, const Slot* /*executionChildSlot*/) const override { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp index d018bf459d..fd3f325ee0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Math.cpp @@ -79,7 +79,7 @@ namespace ScriptCanvas void Math::InitNodeRegistry(NodeRegistry& nodeRegistry) { using namespace ScriptCanvas::Nodes::Math; - + AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); @@ -101,7 +101,7 @@ namespace ScriptCanvas Vector3Nodes::Registrar::AddToRegistry(nodeRegistry); Vector4Nodes::Registrar::AddToRegistry(nodeRegistry); } - + AZStd::vector Math::GetComponentDescriptors() { AZStd::vector descriptors = { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h index 1cd73b770c..baa287488d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathGenerics.h @@ -42,5 +42,5 @@ namespace ScriptCanvas StringToNumberNode >; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp index 5d652c2919..6deb1420e2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.cpp @@ -58,7 +58,7 @@ namespace ScriptCanvas AZ_Assert(randomEngineVar.IsConstructed(), "random engine is not initialized"); return dis(randomEngineVar->m_randomEngine); } - + AZ::s64 GetRandom(AZ::s64 lhs, AZ::s64 rhs) { if (lhs == rhs) @@ -74,5 +74,5 @@ namespace ScriptCanvas } } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h index 1d5c18ecdf..4a6e7713e8 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathNodeUtilities.h @@ -24,11 +24,11 @@ namespace ScriptCanvas template AZ_INLINE void DefaultToleranceEpsilon(Node& node) { SetDefaultValuesByIndex::_(node, Data::ToleranceEpsilon()); } - + Data::NumberType GetRandom(Data::NumberType lhs, Data::NumberType rhs); - AZ::s64 GetRandom(AZ::s64 lhs, AZ::s64 rhs); - + AZ::s64 GetRandom(AZ::s64 lhs, AZ::s64 rhs); + template AZ_INLINE NumberType GetRandomIntegral(NumberType lhs, NumberType rhs) { @@ -56,5 +56,5 @@ namespace ScriptCanvas void RandomEngineInit(); void RandomEngineReset(); } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h index 1e304dc898..74d1abb269 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/MathRandom.h @@ -26,9 +26,9 @@ namespace ScriptCanvas AZ_INLINE Data::ColorType RandomColor(Data::ColorType minValue, Data::ColorType maxValue) { return Data::ColorType(MathNodeUtilities::GetRandomReal(minValue.GetR(), maxValue.GetR()), - MathNodeUtilities::GetRandomReal(minValue.GetG(), maxValue.GetG()), - MathNodeUtilities::GetRandomReal(minValue.GetB(), maxValue.GetB()), - MathNodeUtilities::GetRandomReal(minValue.GetA(), maxValue.GetA())); + MathNodeUtilities::GetRandomReal(minValue.GetG(), maxValue.GetG()), + MathNodeUtilities::GetRandomReal(minValue.GetB(), maxValue.GetB()), + MathNodeUtilities::GetRandomReal(minValue.GetA(), maxValue.GetA())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomColor, SetRandomColorDefaults, k_categoryName, "{0A984F40-322B-44A6-8753-6D2056A96659}", "Returns a random color [Min, Max]", "Min", "Max"); @@ -81,8 +81,8 @@ namespace ScriptCanvas { Data::Vector3Type halfDimensions = 0.5f * dimensions; Data::Vector3Type point(MathNodeUtilities::GetRandomReal(-halfDimensions.GetX(), halfDimensions.GetX()), - MathNodeUtilities::GetRandomReal(-halfDimensions.GetY(), halfDimensions.GetY()), - MathNodeUtilities::GetRandomReal(-halfDimensions.GetZ(), halfDimensions.GetZ())); + MathNodeUtilities::GetRandomReal(-halfDimensions.GetY(), halfDimensions.GetY()), + MathNodeUtilities::GetRandomReal(-halfDimensions.GetZ(), halfDimensions.GetZ())); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInBox, SetRandomPointInBoxDefaults, k_categoryName, "{6785C5F8-2F87-4AD6-AE15-87FE5E72D142}", "returns a random point in a box", "Dimensions"); @@ -99,8 +99,8 @@ namespace ScriptCanvas float theta = MathNodeUtilities::GetRandomReal(0.f, AZ::Constants::TwoPi - std::numeric_limits::epsilon()); Data::Vector3Type point(fRadius * cosf(theta), - fRadius * sinf(theta), - 0.f); + fRadius * sinf(theta), + 0.f); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointOnCircle, SetRandomPointOnCircleDefaults, k_categoryName, "{2F079E35-216D-42B3-AA81-C9823F732893}", "returns a random point on the circumference of a circle", "Radius"); @@ -150,8 +150,8 @@ namespace ScriptCanvas float theta = MathNodeUtilities::GetRandomReal(0.f, AZ::Constants::TwoPi - std::numeric_limits::epsilon()); Data::Vector3Type point(r * cosf(theta), - r * sinf(theta), - MathNodeUtilities::GetRandomReal(fNegHalfHeight, fHalfHeight)); + r * sinf(theta), + MathNodeUtilities::GetRandomReal(fNegHalfHeight, fHalfHeight)); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInCylinder, SetRandomPointInCylinderDefaults, k_categoryName, "{BD81133C-AAC0-44B0-9C9A-D06E780F4CCE}", "returns a random point in a cylinder", "Radius", "Height"); @@ -168,8 +168,8 @@ namespace ScriptCanvas float theta = MathNodeUtilities::GetRandomReal(0.f, AZ::Constants::TwoPi - std::numeric_limits::epsilon()); Data::Vector3Type point(r * cosf(theta), - r * sinf(theta), - 0.f); + r * sinf(theta), + 0.f); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInCircle, SetRandomPointInCircleDefaults, k_categoryName, "{93378981-85DD-42B9-9D2D-826BE68BBE8F}", "returns a random point inside the area of a circle", "Radius"); @@ -234,8 +234,8 @@ namespace ScriptCanvas { Data::Vector2Type halfDimensions = 0.5f * dimensions; Data::Vector3Type point(MathNodeUtilities::GetRandomReal(-halfDimensions.GetX(), halfDimensions.GetX()), - MathNodeUtilities::GetRandomReal(-halfDimensions.GetY(), halfDimensions.GetY()), - 0.f); + MathNodeUtilities::GetRandomReal(-halfDimensions.GetY(), halfDimensions.GetY()), + 0.f); return point; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInSquare, SetRandomPointInSquareDefaults, k_categoryName, "{B81B4049-CBD2-460E-A4AB-155AB8FFDCB9}", "returns a random point in a square", "Dimensions"); @@ -295,7 +295,7 @@ namespace ScriptCanvas { float theta = MathNodeUtilities::GetRandomReal(0.f, AZ::Constants::TwoPi - std::numeric_limits::epsilon()); return Data::Vector2Type(cosf(theta), - sinf(theta)); + sinf(theta)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(RandomUnitVector2, k_categoryName, "{02CE950A-06F8-485D-87E9-77FDE808B160}", "returns a random Vector2 direction"); @@ -324,7 +324,7 @@ namespace ScriptCanvas AZ_INLINE Data::Vector2Type RandomVector2(Data::Vector2Type minValue, Data::Vector2Type maxValue) { return Data::Vector2Type(MathNodeUtilities::GetRandomReal(minValue.GetX(), maxValue.GetX()), - MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY())); + MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomVector2, SetRandomVector2Defaults, k_categoryName, "{6F9982F5-D6F6-4568-8A83-D5A35390D425}", "returns a random Vector2", "Min", "Max"); @@ -337,8 +337,8 @@ namespace ScriptCanvas AZ_INLINE Data::Vector3Type RandomVector3(Data::Vector3Type minValue, Data::Vector3Type maxValue) { return Data::Vector3Type(MathNodeUtilities::GetRandomReal(minValue.GetX(), maxValue.GetX()), - MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY()), - MathNodeUtilities::GetRandomReal(minValue.GetZ(), maxValue.GetZ())); + MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY()), + MathNodeUtilities::GetRandomReal(minValue.GetZ(), maxValue.GetZ())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomVector3, SetRandomVector3Defaults, k_categoryName, "{FF5526DC-E56D-4101-B7DE-4E7283E31B10}", "returns a random Vector3", "Min", "Max"); @@ -351,15 +351,15 @@ namespace ScriptCanvas AZ_INLINE Data::Vector4Type RandomVector4(Data::Vector4Type minValue, Data::Vector4Type maxValue) { return Data::Vector4Type(MathNodeUtilities::GetRandomReal(minValue.GetX(), maxValue.GetX()), - MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY()), - MathNodeUtilities::GetRandomReal(minValue.GetZ(), maxValue.GetZ()), - MathNodeUtilities::GetRandomReal(minValue.GetW(), maxValue.GetW())); + MathNodeUtilities::GetRandomReal(minValue.GetY(), maxValue.GetY()), + MathNodeUtilities::GetRandomReal(minValue.GetZ(), maxValue.GetZ()), + MathNodeUtilities::GetRandomReal(minValue.GetW(), maxValue.GetW())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomVector4, SetRandomVector4Defaults, k_categoryName, "{76FCA9CF-7BBF-471C-9D4A-67FE8E9C6298}", "returns a random Vector4", "Min", "Max"); AZ_INLINE void SetRandomPointInArcDefaults(Node& node) { - SetDefaultValuesByIndex<0>::_(node, Data::Vector3Type(0.f,0.f,0.f)); + SetDefaultValuesByIndex<0>::_(node, Data::Vector3Type(0.f, 0.f, 0.f)); SetDefaultValuesByIndex<1>::_(node, Data::Vector3Type(1.f, 0.f, 0.f)); SetDefaultValuesByIndex<2>::_(node, Data::Vector3Type(0.f, 0.f, 1.f)); SetDefaultValuesByIndex<3>::_(node, Data::NumberType(1.0)); @@ -405,7 +405,7 @@ namespace ScriptCanvas SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_WITH_DEFAULTS(RandomPointInWedge, SetRandomPointInWedgeDefaults, k_categoryName, "{F224DA37-240D-4ABB-A97A-3565197B94B4}", "returns a random point in the specified wedge", "Origin", "Direction", "Normal", "Radius", "Height", "Angle"); - using Registrar = RegistrarGeneric< + using Registrar = RegistrarGeneric < RandomColorNode , RandomGrayscaleNode , RandomIntegerNode @@ -427,6 +427,6 @@ namespace ScriptCanvas , RandomVector4Node , RandomPointInArcNode , RandomPointInWedgeNode - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h index 0f20bcf8c9..9cf3320767 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/RotationNodes.h @@ -20,7 +20,7 @@ namespace ScriptCanvas using namespace Data; using namespace MathNodeUtilities; static const char* k_categoryName = "Math/Quaternion"; - + AZ_INLINE QuaternionType Add(QuaternionType a, QuaternionType b) { return a + b; @@ -106,7 +106,7 @@ namespace ScriptCanvas return QuaternionType::CreateFromVector3AndValue(imaginary, aznumeric_cast(real)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(FromVector3AndValue, k_categoryName, "{955FE6EB-7C38-4587-BBB7-9C886ACEAF94}", "returns a rotation with the imaginary elements from Imaginary and the real element from Real", "Imaginary", "Real"); - + AZ_INLINE NumberType GetElement(QuaternionType source, NumberType index) { return source.GetElement(AZ::GetClamp(aznumeric_cast(index), 0, 3)); @@ -172,7 +172,7 @@ namespace ScriptCanvas return a.Lerp(b, aznumeric_cast(t)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Lerp, k_categoryName, "{91CF1C54-89C6-4A00-A53D-20C58454C4EC}", "returns a the linear interpolation between From and To by the amount T", "From", "To", "T"); - + AZ_INLINE QuaternionType ModX(QuaternionType source, NumberType value) { source.SetX(aznumeric_cast(value)); @@ -228,7 +228,7 @@ namespace ScriptCanvas AZ_INLINE std::tuple NormalizeWithLength(QuaternionType source) { const float length = source.NormalizeWithLength(); - return std::make_tuple( source, length ); + return std::make_tuple(source, length); } SCRIPT_CANVAS_GENERIC_FUNCTION_MULTI_RESULTS_NODE(NormalizeWithLength, k_categoryName, "{E1A7F3F8-854E-4BA1-9DEA-7507BEC6D369}", "returns the normalized version of Source, and the length of Source", "Source", "Normalized", "Length"); @@ -249,7 +249,7 @@ namespace ScriptCanvas return QuaternionType::CreateRotationZ(AZ::DegToRad(aznumeric_caster(degrees))); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(RotationZDegrees, k_categoryName, "{8BC8B0FE-51A1-4ECC-AFF1-A828A0FC8F8F}", "creates a rotation of Degrees around the z-axis", "Degrees"); - + AZ_INLINE QuaternionType ShortestArc(Vector3Type from, Vector3Type to) { return QuaternionType::CreateShortestArc(from, to); @@ -279,7 +279,7 @@ namespace ScriptCanvas return aznumeric_caster(AZ::RadToDeg(source.GetAngle())); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ToAngleDegrees, k_categoryName, "{3EA78793-9AFA-4857-8CB8-CD0D47E97D25}", "returns the angle of angle-axis pair that Source represents in degrees", "Source"); - + AZ_INLINE Vector3Type ToImaginary(QuaternionType source) { return source.GetImaginary(); @@ -301,7 +301,7 @@ namespace ScriptCanvas SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(RotateVector3, k_categoryName, "{DDF7C05C-7148-4860-93A3-D507C5896B6C}", "Returns a new Vector3 that is the source vector3 rotated by the given Quaternion", "Quaternion", "Vector"); - using Registrar = RegistrarGeneric< + using Registrar = RegistrarGeneric < AddNode , ConjugateNode , ConvertTransformToRotationNode @@ -369,5 +369,5 @@ namespace ScriptCanvas > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h index bcff3378c9..b7cf6757e2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Sum.h @@ -24,7 +24,7 @@ namespace ScriptCanvas AZ_COMPONENT(Sum, "{6C52B2D1-3526-4855-A217-5106D54F6B90}", ArithmeticExpression); static void Reflect(AZ::ReflectContext* reflection) - { + { if (AZ::SerializeContext* serializeContext = azrtti_cast(reflection)) { serializeContext->Class() diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h index 0f0fdddcac..441be22702 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/TransformNodes.h @@ -24,7 +24,7 @@ namespace ScriptCanvas AZ_INLINE std::tuple ExtractUniformScale(TransformType source) { auto scale(source.ExtractUniformScale()); - return std::make_tuple( scale, source ); + return std::make_tuple(scale, source); } SCRIPT_CANVAS_GENERIC_FUNCTION_MULTI_RESULTS_NODE(ExtractUniformScale, k_categoryName, "{8DFE5247-0950-4CD1-87E6-0CAAD42F1637}", "returns the uniform scale as a float, and a transform with the scale extracted ", "Source", "Uniform Scale", "Extracted"); @@ -114,7 +114,7 @@ namespace ScriptCanvas return source.IsFinite(); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(IsFinite, k_categoryName, "{B7D23934-0101-40B9-80E8-3D88C8580B25}", "returns true if every row of source is finite, else false", "Source"); - + AZ_INLINE BooleanType IsOrthogonal(const TransformType& source, NumberType tolerance) { return source.IsOrthogonal(aznumeric_cast(tolerance)); @@ -139,7 +139,7 @@ namespace ScriptCanvas return source.TransformVector(multiplier); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Multiply3x3ByVector3, k_categoryName, "{4F2ABFC6-2E93-4A9D-8639-C7967DB318DB}", "returns Source's 3x3 upper matrix post multiplied by Multiplier", "Source", "Multiplier"); - + AZ_INLINE TransformType MultiplyByUniformScale(TransformType source, NumberType scale) { source.MultiplyByUniformScale(scale); @@ -170,7 +170,7 @@ namespace ScriptCanvas return source.GetOrthogonalized(); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Orthogonalize, k_categoryName, "{2B4140CD-6E22-44D3-BDB5-309E69FE7CC2}", "returns an orthogonal matrix if the Source is almost orthogonal", "Source"); - + AZ_INLINE TransformType RotationXDegrees(NumberType degrees) { return TransformType::CreateRotationX(AZ::DegToRad(aznumeric_caster(degrees))); @@ -194,13 +194,13 @@ namespace ScriptCanvas return source.GetUniformScale(); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ToScale, k_categoryName, "{063C58AD-F567-464D-A432-F298FE3953A6}", "returns the uniform scale of the Source", "Source"); - + using Registrar = RegistrarGeneric - < + < #if ENABLE_EXTENDED_MATH_SUPPORT - ExtractUniformScaleNode , + ExtractUniformScaleNode, #endif - FromMatrix3x3AndTranslationNode + FromMatrix3x3AndTranslationNode , FromMatrix3x3Node , FromRotationAndTranslationNode , FromRotationNode @@ -245,8 +245,8 @@ namespace ScriptCanvas , TransposedMultiply3x3Node , ZeroNode #endif - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h index a807243f92..68fc2e729e 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector2Nodes.h @@ -165,7 +165,7 @@ namespace ScriptCanvas return a.GetMin(b); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Min, k_categoryName, "{815685B8-B877-4D54-9E11-D0161185B4B9}", "returns the vector (min(A.x, B.x), min(A.y, B.y))", "A", "B"); - + AZ_INLINE Vector2Type SetX(Vector2Type source, NumberType value) { source.SetX(aznumeric_caster(value)); @@ -242,7 +242,7 @@ namespace ScriptCanvas } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ToPerpendicular, k_categoryName, "{CC4DC102-8B50-4828-BA94-0586F34E0D37}", "returns the vector (-Source.y, Source.x), a 90 degree, positive rotation", "Source"); - using Registrar = RegistrarGeneric< + using Registrar = RegistrarGeneric < AbsoluteNode , AddNode , AngleNode @@ -294,8 +294,8 @@ namespace ScriptCanvas , SlerpNode , SubtractNode , ToPerpendicularNode - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h index a74ae45e67..3c6f4a65e7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector3Nodes.h @@ -33,14 +33,14 @@ namespace ScriptCanvas return lhs + rhs; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_DEPRECATED(Add, k_categoryName, "{0F554E23-9AB6-4D17-A517-C885ECD024F0}", "This node is deprecated, use Add (+), it provides contextual type and slots", "A", "B"); - + AZ_INLINE Vector3Type AngleMod(const Vector3Type source) { return source.GetAngleMod(); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(AngleMod, k_categoryName, "{BF5C12A8-F42D-43E7-9CE3-D16D30B182D2}", "wraps the angle in each element into the range [-pi, pi]", "Source") - AZ_INLINE std::tuple BuildTangentBasis(Vector3Type source) + AZ_INLINE std::tuple BuildTangentBasis(Vector3Type source) { std::tuple tangentBitangent; source.NormalizeSafe(); @@ -48,13 +48,13 @@ namespace ScriptCanvas return tangentBitangent; } SCRIPT_CANVAS_GENERIC_FUNCTION_MULTI_RESULTS_NODE(BuildTangentBasis, k_categoryName, "{3EBA365F-063A-45A0-BDD1-ED0F995AD310}", "returns a tangent basis from the normal", "Normal", "Tangent", "Bitangent"); - + AZ_INLINE Vector3Type Clamp(const Vector3Type source, const Vector3Type min, const Vector3Type max) { return source.GetClamp(min, max); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Clamp, k_categoryName, "{28305F88-0940-43C8-B0A8-B8CEB3B0B82A}", "returns vector clamped to [min, max] and equal to source if possible", "Source", "Min", "Max"); - + AZ_INLINE Vector3Type Cosine(const Vector3Type source) { return source.GetCos(); @@ -66,7 +66,7 @@ namespace ScriptCanvas return lhs.Cross(rhs); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Cross, k_categoryName, "{6FAF4ACA-A100-4B71-ACF8-F1DB4674F51C}", "returns the vector cross product of A X B", "A", "B"); - + AZ_INLINE Vector3Type CrossXAxis(const Vector3Type source) { return source.CrossXAxis(); @@ -120,7 +120,7 @@ namespace ScriptCanvas return lhs.Dot(rhs); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Dot, k_categoryName, "{5DFA6260-C044-4798-A55C-3CF5F3DB45CE}", "returns the vector dot product of A dot B", "A", "B"); - + AZ_INLINE Vector3Type FromElement(Vector3Type source, const NumberType index, const NumberType value) { source.SetElement(AZ::GetClamp(aznumeric_cast(index), 0, 2), aznumeric_cast(value)); @@ -200,7 +200,7 @@ namespace ScriptCanvas return from.Lerp(to, aznumeric_cast(t)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Lerp, k_categoryName, "{AA063267-DA0F-4407-9356-30B4E89A9FA4}", "returns the linear interpolation (From + ((To - From) * T)", "From", "To", "T"); - + AZ_INLINE Vector3Type Max(const Vector3Type a, const Vector3Type b) { return a.GetMax(b); @@ -297,7 +297,7 @@ namespace ScriptCanvas return std::make_tuple(sin, cos); } SCRIPT_CANVAS_GENERIC_FUNCTION_MULTI_RESULTS_NODE(SineCosine, k_categoryName, "{04EE253D-680D-4F95-A451-837EAE104E88}", "returns a vector from the sine of each element from the source, and from the cosine of each element from the source", "Source", "Sine", "Cosine"); - + AZ_INLINE Vector3Type Slerp(const Vector3Type from, const Vector3Type to, const NumberType t) { return from.Slerp(to, aznumeric_cast(t)); @@ -328,7 +328,7 @@ namespace ScriptCanvas } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(ZAxisCross, k_categoryName, "{29206E84-392C-412E-9DD5-781B2759260D}", "returns the vector cross product of Z-Axis X Source", "Source"); - using Registrar = RegistrarGeneric< + using Registrar = RegistrarGeneric < AbsoluteNode , AddNode @@ -409,8 +409,8 @@ namespace ScriptCanvas , ZAxisCrossNode #endif - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h index c8ce20fe14..284582be57 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Math/Vector4Nodes.h @@ -74,13 +74,13 @@ namespace ScriptCanvas return Vector4Type(aznumeric_cast(x), aznumeric_cast(y), aznumeric_cast(z), aznumeric_cast(w)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(FromValues, k_categoryName, "{725D79B8-1CB1-4473-8480-4DE584C75540}", "returns a vector from elements", "X", "Y", "Z", "W"); - + AZ_INLINE Vector4Type FromVector3AndNumber(Vector3Type source, const NumberType w) { return Vector4Type::CreateFromVector3AndFloat(source, aznumeric_cast(w)); } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(FromVector3AndNumber, k_categoryName, "{577E2B26-BEC1-4CC7-B23B-5172ED1BFF6E}", "returns a vector with x,y,z from Source and w from W", "Source", "W"); - + AZ_INLINE NumberType GetElement(const Vector4Type source, const NumberType index) { return source.GetElement(AZ::GetClamp(aznumeric_cast(index), 0, 3)); @@ -99,7 +99,7 @@ namespace ScriptCanvas return source; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE(Homogenize, k_categoryName, "{9A3FAB19-0442-44A5-8454-12003BA146EE}", "returns a vector with all components divided by the w element", "Source"); - + AZ_INLINE BooleanType IsClose(const Vector4Type a, const Vector4Type b, NumberType tolerance) { return a.IsClose(b, aznumeric_cast(tolerance)); @@ -212,8 +212,8 @@ namespace ScriptCanvas return lhs - rhs; } SCRIPT_CANVAS_GENERIC_FUNCTION_NODE_DEPRECATED(Subtract, k_categoryName, "{A5FA6465-9C39-4A44-BD7C-E8ECF9503E46}", "This node is deprecated, use Subtract (-), it provides contextual type and slots", "A", "B"); - - using Registrar = RegistrarGeneric< + + using Registrar = RegistrarGeneric < AbsoluteNode, AddNode, DivideByNumberNode, @@ -260,8 +260,8 @@ namespace ScriptCanvas ReciprocalNode, SubtractNode - >; + > ; } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp index dcfe5fed56..658c561c8b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorBack.cpp @@ -41,7 +41,7 @@ namespace ScriptCanvas slotConfiguration.m_toolTip = "The value at the specified index"; slotConfiguration.m_displayGroup = GetSourceDisplayGroup(); slotConfiguration.SetType(type); - slotConfiguration.SetConnectionType(ConnectionType::Output); + slotConfiguration.SetConnectionType(ConnectionType::Output); m_outputSlots.insert(AddSlot(slotConfiguration)); } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp index 9af3f183b1..7628aa10cc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorInsert.cpp @@ -50,7 +50,7 @@ namespace ScriptCanvas slotConfiguration.m_name = Data::GetName(type); slotConfiguration.m_displayGroup = GetSourceDisplayGroup(); slotConfiguration.SetType(type); - slotConfiguration.SetConnectionType(ConnectionType::Input); + slotConfiguration.SetConnectionType(ConnectionType::Input); m_inputSlots.insert(AddSlot(slotConfiguration)); } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp index 40fbe6f54b..f24bfb2890 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.cpp @@ -66,7 +66,7 @@ namespace ScriptCanvas AZ::SerializeContext::DataElementNode baseNodeElement = operatorBaseClass->GetSubElement(nodeElementIndex); classElement.RemoveElementByName(AZ::Crc32("BaseClass1")); - classElement.AddElement(baseNodeElement); + classElement.AddElement(baseNodeElement); } return true; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h index 71c89c75e9..c323977d33 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Containers/OperatorSize.h @@ -33,7 +33,7 @@ namespace ScriptCanvas // Node... void OnInit() override; //// - }; + }; } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp index a82e8f9871..0eaf7a9a85 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorAdd.cpp @@ -45,13 +45,13 @@ namespace ScriptCanvas Data::ColorType operator()(const Data::ColorType& lhs, const Datum& rhs) { const AZ::Color* dataRhs = rhs.GetAs(); - + float a = AZ::GetClamp(lhs.GetA(), 0.f, 1.f) + AZ::GetClamp(dataRhs->GetA(), 0.f, 1.f); float r = AZ::GetClamp(lhs.GetR(), 0.f, 1.f) + AZ::GetClamp(dataRhs->GetR(), 0.f, 1.f); float g = AZ::GetClamp(lhs.GetG(), 0.f, 1.f) + AZ::GetClamp(dataRhs->GetG(), 0.f, 1.f); float b = AZ::GetClamp(lhs.GetB(), 0.f, 1.f) + AZ::GetClamp(dataRhs->GetB(), 0.f, 1.f); - return AZ::Color(r, g, b, a); + return AZ::Color(r, g, b, a); } }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp index 4e777fff2f..a1dcbbc0e7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.cpp @@ -73,7 +73,7 @@ namespace ScriptCanvas { // Version conversion for previous elements for (Slot& currentSlot : ModSlots()) - { + { if (currentSlot.IsData()) { auto& contracts = currentSlot.GetContracts(); @@ -89,7 +89,7 @@ namespace ScriptCanvas contract->SetSupportedOperator(OperatorFunction()); contract->SetSupportedNativeTypes(GetSupportedNativeDataTypes()); } - } + } } if (!currentSlot.IsDynamicSlot()) @@ -110,17 +110,17 @@ namespace ScriptCanvas void OperatorArithmetic::OnActivate() { if (m_scrapedInputs) - { + { m_scrapedInputs = false; m_applicableInputs.clear(); - m_result.ReconfigureDatumTo(AZStd::move(ScriptCanvas::Datum())); + m_result.ReconfigureDatumTo(AZStd::move(ScriptCanvas::Datum())); } } void OperatorArithmetic::ConfigureVisualExtensions() { - { + { VisualExtensionSlotConfiguration visualExtensions(VisualExtensionSlotConfiguration::VisualExtensionType::ExtenderSlot); visualExtensions.m_name = "Add Operand"; @@ -150,12 +150,12 @@ namespace ScriptCanvas bool OperatorArithmetic::CanDeleteSlot(const SlotId& slotId) const { - Slot* slot = GetSlot(slotId); + Slot* slot = GetSlot(slotId); if (slot && slot->GetDynamicGroup() == GetArithmeticDynamicTypeGroup()) { if (!slot->IsOutput()) - { + { auto slotList = GetSlotsWithDynamicGroup(GetArithmeticDynamicTypeGroup()); int inputCount = 0; @@ -185,14 +185,14 @@ namespace ScriptCanvas } else if (operands.size() == 1) { - const Datum* operand = operands.front(); + const Datum* operand = operands.front(); result = (*operand); return; } auto type = result.GetType(); - Operator(type.GetType(), operands, result); - } + Operator(type.GetType(), operands, result); + } void OperatorArithmetic::Operator(Data::eType type, const ArithmeticOperands& operands, Datum& result) { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h index 5b2ea00871..86a5b17c52 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorArithmetic.h @@ -65,7 +65,7 @@ namespace ScriptCanvas AZ::Crc32 GetArithmeticExtensionId() const { return AZ_CRC("AddnewValueExtension", 0xea20301c); } AZ::Crc32 GetArithmeticDynamicTypeGroup() const { return AZ_CRC("ArithmeticGroup", 0x4271e41f); } AZStd::string GetArithmeticDisplayGroup() const { return "ArithmeticGroup"; } - + virtual AZStd::string_view OperatorFunction() const { return ""; } virtual AZStd::unordered_set< Data::Type > GetSupportedNativeDataTypes() const { @@ -81,14 +81,14 @@ namespace ScriptCanvas Data::Type::Matrix4x4() }; } - + // Node void OnSlotDisplayTypeChanged(const SlotId& slotId, const Data::Type& dataType) override final; void OnDynamicGroupDisplayTypeChanged(const AZ::Crc32& dynamicGroup, const Data::Type& dataType) override final; - + void OnConfigured() override; void OnInit() override; - void OnActivate() override; + void OnActivate() override; void ConfigureVisualExtensions() override; SlotId HandleExtension(AZ::Crc32 extensionId) override; @@ -100,7 +100,7 @@ namespace ScriptCanvas virtual void Operator(Data::eType type, const ArithmeticOperands& operands, Datum& result); virtual void InitializeSlot(const SlotId& slotId, const Data::Type& dataType); - + ////////////////////////////////////////////////////////////////////////// // Translation AZ::Outcome GetDependencies() const override; @@ -128,7 +128,7 @@ namespace ScriptCanvas Slot* m_resultSlot; SlotId m_outSlot; }; - + //! Deprecated: kept here for version conversion class OperatorArithmeticUnary : public OperatorArithmetic { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp index b50d06e9e9..8d26ad221f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.cpp @@ -27,7 +27,7 @@ namespace ScriptCanvas Type operator()(const Type& a, const Datum& b) { const Type* dataB = b.GetAs(); - + const Type& divisor = (*dataB); if (AZ::IsClose(divisor, Type(0), std::numeric_limits::epsilon())) { @@ -35,7 +35,7 @@ namespace ScriptCanvas return Type(0); } - return a / divisor; + return a / divisor; } private: @@ -65,9 +65,9 @@ namespace ScriptCanvas SCRIPTCANVAS_REPORT_ERROR((*m_node), "Divide by Zero"); return VectorType(0); } - } - - return a / (*divisor); + } + + return a / (*divisor); } OperatorDivVectorTypes(Node* node) @@ -114,7 +114,7 @@ namespace ScriptCanvas { const AZ::Color* dataA = lhs.GetAs(); const AZ::Color* dataB = rhs.GetAs(); - + if (dataB->IsClose(AZ::Color(), std::numeric_limits::epsilon())) { // Divide by zero diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h index 61121ff85d..37089fe5ec 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDiv.h @@ -33,7 +33,7 @@ namespace ScriptCanvas protected: - void InitializeSlot(const SlotId& slotId, const ScriptCanvas::Data::Type& dataType) override; + void InitializeSlot(const SlotId& slotId, const ScriptCanvas::Data::Type& dataType) override; bool IsValidArithmeticSlot(const SlotId& slotId) const override; void OnResetDatumToDefaultValue(ModifiableDatumView& datumView) override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h index bb33242ad4..c1eb08fddc 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorDivideByNumber.h @@ -19,9 +19,9 @@ namespace ScriptCanvas #define DIVIDABLE_TYPES { Data::Type::Number(), Data::Type::Vector2(), Data::Type::Vector3(), Data::Type::Vector4() } //! Deprecated: see MethodOverloaded for "Divide by Number (/)" - class OperatorDivideByNumber + class OperatorDivideByNumber : public Node - { + { public: SCRIPTCANVAS_NODE(OperatorDivideByNumber); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp index d5cbadbfee..43b1be3f6d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.cpp @@ -25,7 +25,7 @@ namespace ScriptCanvas SlotId stepId = LerpBetweenProperty::GetStepSlotId(this); if (stepId.IsValid()) - { + { for (const SlotId& slotId : { m_startSlotId, m_stopSlotId, m_speedSlotId, stepId }) { Slot* slot = GetSlot(slotId); @@ -54,7 +54,7 @@ namespace ScriptCanvas void LerpBetween::OnConfigured() { SetupInternalSlotReferences(); - } + } void LerpBetween::SetupInternalSlotReferences() { @@ -66,7 +66,7 @@ namespace ScriptCanvas m_stepSlotId = LerpBetweenProperty::GetStepSlotId(this); m_percentSlotId = LerpBetweenProperty::GetPercentSlotId(this); } - + bool LerpBetween::IsGroupConnected() const { bool hasConnections = false; @@ -78,10 +78,10 @@ namespace ScriptCanvas break; } } - + return hasConnections; } - + bool LerpBetween::IsInGroup(const SlotId& slotId) const { return m_groupedSlotIds.count(slotId) > 0; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h index 7b8b7d2143..f6f67f30bf 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerp.h @@ -25,7 +25,7 @@ namespace ScriptCanvas #define LERPABLE_TYPES { Data::Type::Number(), Data::Type::Vector2(), Data::Type::Vector3(), Data::Type::Vector4() } //! Deprecated: see NodeableNodeOverloadedLerp - class LerpBetween + class LerpBetween : public Node { public: @@ -50,21 +50,21 @@ namespace ScriptCanvas LerpBetween() = default; ~LerpBetween() override = default; - + void OnInit() override; void OnConfigured() override; - + private: void SetupInternalSlotReferences(); bool IsGroupConnected() const; - bool IsInGroup(const SlotId& slotId) const; - + bool IsInGroup(const SlotId& slotId) const; + AZStd::unordered_set< SlotId > m_groupedSlotIds; - + float m_duration; float m_counter; - + Datum m_startDatum; Datum m_differenceDatum; }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h index 3807bff5e7..813c433a4f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeable.h @@ -129,7 +129,7 @@ namespace ScriptCanvas return AZ::TickBus::Handler::BusIsConnected() || AZ::SystemTickBus::Handler::BusIsConnected(); } - + protected: size_t GetRequiredOutCount() const override { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp index 6082e768ef..4ae3ff8c1f 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.cpp @@ -189,7 +189,7 @@ namespace ScriptCanvas dataSlotConfiguration.SetConnectionType(ScriptCanvas::ConnectionType::Output); dataSlotConfiguration.m_dynamicDataType = DynamicDataType::Value; - + SlotId slotIdStep = AddSlot(dataSlotConfiguration); AZ_Assert(slotIdStep.IsValid(), "Data slot is not created successfully."); latentOut.outputs.push_back(slotIdStep); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h index 27b1f85612..1c2ed58403 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorLerpNodeableNode.h @@ -29,7 +29,7 @@ namespace ScriptCanvas AZ::Crc32 GetDataDynamicGroup() const { return AZ_CRC("LerpDataDynamicGroup", 0x62b5f89e); } }; - } + } -} +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp index 62d10ba58d..1eaba6bf17 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.cpp @@ -75,7 +75,7 @@ namespace ScriptCanvas break; case Data::eType::Matrix4x4: OperatorEvaluator::Evaluate(OperatorMulImpl(), operands, result); - break; + break; default: AZ_Assert(false, "Multiplication operator not defined for type: %s", Data::ToAZType(type).ToString().c_str()); break; @@ -88,7 +88,7 @@ namespace ScriptCanvas FindModifiableDatumView(slotId, datumView); OnResetDatumToDefaultValue(datumView); - } + } bool OperatorMul::IsValidArithmeticSlot(const SlotId& slotId) const { @@ -110,7 +110,7 @@ namespace ScriptCanvas return (datum != nullptr); } - void OperatorMul::OnResetDatumToDefaultValue(ModifiableDatumView& datumView) + void OperatorMul::OnResetDatumToDefaultValue(ModifiableDatumView& datumView) { Data::Type displayType = GetDisplayType(GetArithmeticDynamicTypeGroup()); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h index e901aa519b..91ec6cc112 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorMul.h @@ -29,7 +29,7 @@ namespace ScriptCanvas AZStd::unordered_set< Data::Type > GetSupportedNativeDataTypes() const override; void Operator(Data::eType type, const ArithmeticOperands& operands, Datum& result) override; - + protected: void InitializeSlot(const SlotId& slotId, const ScriptCanvas::Data::Type& dataType) override; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp index 1246feb521..82e16591a3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.cpp @@ -50,7 +50,7 @@ namespace ScriptCanvas { const AZ::Matrix3x3* dataRhs = rhs.GetAs(); - return AZ::Matrix3x3::CreateFromColumns(lhs.GetColumn(0) - dataRhs->GetColumn(0), lhs.GetColumn(1) - dataRhs->GetColumn(1), lhs.GetColumn(2) - dataRhs->GetColumn(2)); + return AZ::Matrix3x3::CreateFromColumns(lhs.GetColumn(0) - dataRhs->GetColumn(0), lhs.GetColumn(1) - dataRhs->GetColumn(1), lhs.GetColumn(2) - dataRhs->GetColumn(2)); } }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h index 2797a4fdea..bf1db9bfe2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Math/OperatorSub.h @@ -17,7 +17,7 @@ namespace ScriptCanvas namespace Operators { //! Node that provides subtraction - class OperatorSub: public OperatorArithmetic + class OperatorSub : public OperatorArithmetic { public: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.cpp index 329b8d4c31..94b42d2829 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.cpp @@ -182,7 +182,7 @@ namespace ScriptCanvas break; } } - } + } if (!handledConfiguration) { @@ -250,7 +250,7 @@ namespace ScriptCanvas if (handledConfiguration) { - configurationIter = unhandledConfigurations.erase(configurationIter); + configurationIter = unhandledConfigurations.erase(configurationIter); } else { @@ -296,7 +296,7 @@ namespace ScriptCanvas m_sourceDisplayType = dataType; OnDisplayTypeChanged(dataType); } - } + } } void OperatorBase::OnSlotRemoved(const SlotId& slotId) @@ -319,7 +319,7 @@ namespace ScriptCanvas return nullptr; } - + Slot* OperatorBase::GetFirstOutputSourceSlot() const { for (const SlotId& slotId : m_sourceSlots) @@ -429,7 +429,7 @@ namespace ScriptCanvas bool isInBatchAdd = false; GraphRequestBus::EventResult(isInBatchAdd, GetOwningScriptCanvasId(), &GraphRequests::IsBatchAddingGraphData); - + if (IsSourceSlotId(currentSlotId)) { auto node = AZ::EntityUtils::FindFirstDerivedComponent(endpoint.GetNodeId()); @@ -493,7 +493,7 @@ namespace ScriptCanvas } SlotId OperatorBase::AddSlotWithSourceType() - { + { Data::Type type = Data::Type::Invalid(); if (!m_sourceTypes.empty()) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h index 9882ff4564..57efee7faf 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operator.h @@ -22,7 +22,7 @@ namespace ScriptCanvas { namespace Operators { - class OperatorBase + class OperatorBase : public ScriptCanvas::Node { public: @@ -41,7 +41,7 @@ namespace ScriptCanvas { SourceType m_sourceType = SourceType::SourceInput; - DynamicDataType m_dynamicDataType = DynamicDataType::Any; + DynamicDataType m_dynamicDataType = DynamicDataType::Any; AZStd::string m_name; AZStd::string m_tooltip; @@ -103,7 +103,7 @@ namespace ScriptCanvas virtual void OnInputSlotAdded(const SlotId& inputSlotId) { AZ_UNUSED(inputSlotId); }; virtual void OnDataInputSlotConnected([[maybe_unused]] const SlotId& slotId, [[maybe_unused]] const Endpoint& endpoint) {} - virtual void OnDataInputSlotDisconnected([[maybe_unused]] const SlotId& slotId, [[maybe_unused]] const Endpoint& endpoint) {} + virtual void OnDataInputSlotDisconnected([[maybe_unused]] const SlotId& slotId, [[maybe_unused]] const Endpoint& endpoint) {} AZ::BehaviorMethod* GetOperatorMethod(const char* methodName); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operators.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operators.cpp index 6a35c246c9..b1ee7bf471 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operators.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Operators/Operators.cpp @@ -49,7 +49,7 @@ namespace ScriptCanvas void Operators::InitNodeRegistry(NodeRegistry& nodeRegistry) { using namespace ScriptCanvas::Nodes::Operators; - + // Math AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h index 3a913826c2..05bf91f5dd 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Spawning/SpawnNodeable.h @@ -20,8 +20,8 @@ namespace ScriptCanvas::Nodeables::Spawning { class SpawnNodeable - : public ScriptCanvas::Nodeable, - public AZ::TickBus::Handler + : public ScriptCanvas::Nodeable + , public AZ::TickBus::Handler { SCRIPTCANVAS_NODE(SpawnNodeable); public: diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp index d05f2cd5ac..b362209cb0 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Format.cpp @@ -6,14 +6,3 @@ */ #include "Format.h" - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace String - { - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h index c325414ca3..fef7fb2bd7 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/String/Utilities.h @@ -24,7 +24,7 @@ namespace ScriptCanvas { public: SCRIPTCANVAS_NODE(StartsWith); - }; + }; //! Deprecated: see class String's reflection of method "Ends With" class EndsWith diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h index f859c9900c..00bc52edfa 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Countdown.h @@ -62,7 +62,7 @@ namespace ScriptCanvas }; //! Deprecated: see DelayNodeableNode - class Countdown + class Countdown : public Node { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DelayNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DelayNodeable.h index 260f0dd5f0..8d3231f170 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DelayNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DelayNodeable.h @@ -21,13 +21,13 @@ namespace ScriptCanvas { namespace Time { - class DelayNodeable + class DelayNodeable : public ScriptCanvas::Nodeable , public AZ::TickBus::Handler { public: SCRIPTCANVAS_NODE(DelayNodeable); - + protected: void OnDeactivate() override; @@ -43,7 +43,7 @@ namespace ScriptCanvas float m_currentTime = 0.0f; float m_holdTime = 0.0f; - void InitiateCountdown(bool reset, float countdownSeconds, bool looping, float holdTime); + void InitiateCountdown(bool reset, float countdownSeconds, bool looping, float holdTime); }; } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h index 481f0c97be..98136225c6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Duration.h @@ -23,7 +23,7 @@ namespace ScriptCanvas namespace Time { //! Deprecated: see DurationNodeableNode - class Duration + class Duration : public Node { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DurationNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DurationNodeable.h index 2915232cff..1b0169699b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DurationNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/DurationNodeable.h @@ -21,7 +21,7 @@ namespace ScriptCanvas { namespace Time { - class DurationNodeable + class DurationNodeable : public ScriptCanvas::Nodeable , public AZ::TickBus::Handler { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h index 680e974429..1e12395834 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/HeartBeat.h @@ -33,7 +33,7 @@ namespace ScriptCanvas protected: - }; + }; } } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Time.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Time.cpp index 7a6e5bc859..e55ddb3b35 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Time.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Time.cpp @@ -57,7 +57,7 @@ namespace ScriptCanvas AddNodeToRegistry(nodeRegistry); AddNodeToRegistry(nodeRegistry); } - + AZStd::vector Time::GetComponentDescriptors() { return AZStd::vector({ @@ -73,7 +73,7 @@ namespace ScriptCanvas ScriptCanvas::Nodes::HeartBeatNodeableNode::CreateDescriptor(), ScriptCanvas::Nodes::TimeDelayNodeableNode::CreateDescriptor(), ScriptCanvas::Nodes::TimerNodeableNode::CreateDescriptor(), - }); + }); } } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h index 14fa3a767c..8cabda3f15 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/Timer.h @@ -23,7 +23,7 @@ namespace ScriptCanvas namespace Time { //! Deprecated: See TimerNodeableNode - class Timer + class Timer : public Node { public: @@ -31,7 +31,7 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(Timer); Timer(); - + float m_seconds; float m_milliseconds; }; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/TimerNodeable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/TimerNodeable.h index 2e73dc524c..e2de4b25ba 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/TimerNodeable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Time/TimerNodeable.h @@ -21,7 +21,7 @@ namespace ScriptCanvas { namespace Time { - class TimerNodeable + class TimerNodeable : public Nodeables::Time::BaseTimer { SCRIPTCANVAS_NODE(TimerNodeable); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp index 55eded5b2f..b27065aca2 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/AddFailure.cpp @@ -9,13 +9,3 @@ #include "UnitTestBus.h" -namespace ScriptCanvas -{ - namespace Nodes - { - namespace UnitTesting - { - - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp index dff5dff30c..d9da655cc3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.cpp @@ -37,8 +37,8 @@ namespace ScriptCanvas } const char* StringConversion::CStyleToCStyle(const char* input) - { - return input; + { + return input; } void StringConversion::Reflect(AZ::ReflectContext* reflection) @@ -69,17 +69,17 @@ namespace ScriptCanvas ->Field("outcomeVector3Void", &TypeExposition::m_outcomeVector3Void) ; } - + if (auto behaviorContext = azrtti_cast(reflection)) { behaviorContext->Class("TypeExposition") ->Method("Reflect_AZStd::array", [](AZStd::array& vector) { return vector.size(); }) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ->Method("Reflect_AZ::Outcome", [](AZ::Outcome& vector) { return vector.IsSuccess(); }) - ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All) ; } } } - } -} + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h index 94c307e07d..a56dd8775b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/Auxiliary/Auxiliary.h @@ -36,14 +36,14 @@ namespace ScriptCanvas }; using EBus = AZ::EBus; - - class EBusHandler + + class EBusHandler : public EBus::Handler , public AZ::BehaviorEBusHandler { public: AZ_EBUS_BEHAVIOR_BINDER - ( EBusHandler + (EBusHandler , "{5168D163-AAB9-417D-9FD4-CE10541D51CE}" , AZ::SystemAllocator , CStyleToCStyle @@ -95,14 +95,14 @@ namespace ScriptCanvas return result; } }; - + class StringConversion { public: AZ_TYPE_INFO(StringConversion, "{47A9CF0C-6F34-4E0C-B1F9-F908FC2B7388}"); static const char* CStyleToCStyle(const char* input); - + static void Reflect(AZ::ReflectContext* reflection); }; @@ -118,5 +118,5 @@ namespace ScriptCanvas AZ::Outcome m_outcomeVector3Void; }; } - } -} + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp index 6e2931112d..b2d4279b5c 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectGreaterThanEqual.cpp @@ -50,6 +50,6 @@ namespace ScriptCanvas } //// } - } - } -} + } + } +} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h index 12d28af093..c5d163bb88 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/UnitTesting/ExpectTrue.h @@ -24,7 +24,7 @@ namespace ScriptCanvas SCRIPTCANVAS_NODE(ExpectTrue); - void OnInit() override; + void OnInit() override; }; } } From 80bdd4e17b615c910b488ab75c441985c85262dd Mon Sep 17 00:00:00 2001 From: Chris Burel Date: Wed, 7 Jul 2021 14:34:45 -0700 Subject: [PATCH 38/67] Clang compile fixes (#1876) * Fix compile error from -Wwritable-strings Signed-off-by: Chris Burel * Fix flags used to build MaskedOcclusionCulling with clang Signed-off-by: Chris Burel * Fix class that has a final destructor, but the class itself was not final Signed-off-by: Chris Burel --- .../IO/Streamer/StorageDriveTests_Windows.cpp | 2 +- Gems/Atom/RPI/Code/CMakeLists.txt | 2 ++ .../Common/Clang/atom_rpi_public_clang.cmake | 18 ++++++++++++++++++ .../Common/MSVC/atom_rpi_public_msvc.cmake | 19 +++++++++++++++++++ .../Source/Platform/Windows/PAL_windows.cmake | 13 ------------- .../SceneAPIExt/Rules/MotionMetaDataRule.h | 4 ++-- 6 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 Gems/Atom/RPI/Code/Source/Platform/Common/Clang/atom_rpi_public_clang.cmake create mode 100644 Gems/Atom/RPI/Code/Source/Platform/Common/MSVC/atom_rpi_public_msvc.cmake diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp index e654ef4aa3..b505bba5dd 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp @@ -1155,7 +1155,7 @@ namespace Benchmark class StorageDriveWindowsFixture : public benchmark::Fixture { public: - constexpr static char* TestFileName = "StreamerBenchmark.bin"; + constexpr static const char* TestFileName = "StreamerBenchmark.bin"; constexpr static size_t FileSize = 64_mib; void SetupStreamer(bool enableFileSharing) diff --git a/Gems/Atom/RPI/Code/CMakeLists.txt b/Gems/Atom/RPI/Code/CMakeLists.txt index 71e5d82e48..d806b8c687 100644 --- a/Gems/Atom/RPI/Code/CMakeLists.txt +++ b/Gems/Atom/RPI/Code/CMakeLists.txt @@ -25,6 +25,8 @@ ly_add_target( ../Assets/atom_rpi_asset_files.cmake ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake ${MASKED_OCCLUSION_CULLING_FILES} + PLATFORM_INCLUDE_FILES + ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common/${PAL_TRAIT_COMPILER_ID}/atom_rpi_public_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake INCLUDE_DIRECTORIES PRIVATE Source diff --git a/Gems/Atom/RPI/Code/Source/Platform/Common/Clang/atom_rpi_public_clang.cmake b/Gems/Atom/RPI/Code/Source/Platform/Common/Clang/atom_rpi_public_clang.cmake new file mode 100644 index 0000000000..88309e590c --- /dev/null +++ b/Gems/Atom/RPI/Code/Source/Platform/Common/Clang/atom_rpi_public_clang.cmake @@ -0,0 +1,18 @@ +# +# 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 +# +# + +ly_add_source_properties( + SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp + PROPERTY COMPILE_OPTIONS + VALUES -mavx2 -mfma -msse4.1 +) + +ly_add_source_properties( + SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp + PROPERTY COMPILE_OPTIONS + VALUES -mno-avx +) diff --git a/Gems/Atom/RPI/Code/Source/Platform/Common/MSVC/atom_rpi_public_msvc.cmake b/Gems/Atom/RPI/Code/Source/Platform/Common/MSVC/atom_rpi_public_msvc.cmake new file mode 100644 index 0000000000..50cfc8a179 --- /dev/null +++ b/Gems/Atom/RPI/Code/Source/Platform/Common/MSVC/atom_rpi_public_msvc.cmake @@ -0,0 +1,19 @@ +# +# 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 +# +# + +ly_add_source_properties( + SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp + PROPERTY COMPILE_OPTIONS + VALUES /arch:AVX2 /W3 +) +ly_add_source_properties( + SOURCES + External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX512.cpp + External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp + PROPERTY COMPILE_OPTIONS + VALUES /W3 +) diff --git a/Gems/Atom/RPI/Code/Source/Platform/Windows/PAL_windows.cmake b/Gems/Atom/RPI/Code/Source/Platform/Windows/PAL_windows.cmake index 896f505d05..a9e3cf10f9 100644 --- a/Gems/Atom/RPI/Code/Source/Platform/Windows/PAL_windows.cmake +++ b/Gems/Atom/RPI/Code/Source/Platform/Windows/PAL_windows.cmake @@ -7,16 +7,3 @@ set (PAL_TRAIT_BUILD_ATOM_RPI_ASSETS_SUPPORTED TRUE) set (PAL_TRAIT_BUILD_ATOM_RPI_MASKED_OCCLUSION_CULLING_SUPPORTED TRUE) - -ly_add_source_properties( - SOURCES External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX2.cpp - PROPERTY COMPILE_OPTIONS - VALUES /arch:AVX2 /W3 -) -ly_add_source_properties( - SOURCES - External/MaskedOcclusionCulling/MaskedOcclusionCullingAVX512.cpp - External/MaskedOcclusionCulling/MaskedOcclusionCulling.cpp - PROPERTY COMPILE_OPTIONS - VALUES /W3 -) \ No newline at end of file diff --git a/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Rules/MotionMetaDataRule.h b/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Rules/MotionMetaDataRule.h index 873dccef72..e2f530a887 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Rules/MotionMetaDataRule.h +++ b/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Rules/MotionMetaDataRule.h @@ -37,7 +37,7 @@ namespace EMotionFX::Pipeline::Rule AZStd::unique_ptr m_motionEventTable; }; - class MotionMetaDataRule + class MotionMetaDataRule final : public ExternalToolRule> { public: @@ -46,7 +46,7 @@ namespace EMotionFX::Pipeline::Rule MotionMetaDataRule(); MotionMetaDataRule(const AZStd::shared_ptr& data); - ~MotionMetaDataRule() final = default; + ~MotionMetaDataRule() = default; const AZStd::shared_ptr& GetData() const override { return m_data; } void SetData(const AZStd::shared_ptr& data) override { m_data = data; } From 3037837be6b9dff3ebd2a1031feb5a4fa3e381fc Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Wed, 7 Jul 2021 16:37:25 -0500 Subject: [PATCH 39/67] Fixed logic to remove the tabs not close them. Signed-off-by: Chris Galvan --- .../AzQtComponents/Components/FancyDocking.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 3b9fe9f011..7417bed2a0 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -3297,7 +3297,12 @@ namespace AzQtComponents continue; } - tabWidget->closeTabs(); + // Remove the tabs from the tab widget (we don't actually want to close them, which could delete them at this point) + int numTabs = tabWidget->count(); + for (int i = 0; i < numTabs; ++i) + { + tabWidget->removeTab(0); + } } // Restore the floating windows From 1b474afdb085748042e2d17c5c2b40b4e8f8a6c1 Mon Sep 17 00:00:00 2001 From: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com> Date: Wed, 7 Jul 2021 14:55:36 -0700 Subject: [PATCH 40/67] ATOM-14322 Random crashes when exist RHI/Raytracing sample running __fullTestSuite__ (#1926) Signed-off-by: Tao --- Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp b/Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp index 5e5932456e..480c11b7c9 100644 --- a/Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp +++ b/Gems/Atom/RHI/Code/Source/RHI/RayTracingPipelineState.cpp @@ -142,6 +142,8 @@ namespace AZ void RayTracingPipelineState::Shutdown() { + ShutdownInternal(); + DeviceObject::Shutdown(); } } } From 5b9647c11b319b5cc3b898754d70730180466e5d Mon Sep 17 00:00:00 2001 From: Tommy Walton <82672795+amzn-tommy@users.noreply.github.com> Date: Wed, 7 Jul 2021 15:08:57 -0700 Subject: [PATCH 41/67] Fix for ATOM-15923 : Editor Spends Several Minutes Entering/Ending Play Game Mode (#1846) * Cut off kd-tree generation if more than 10 percent of triangles straddle split axis Signed-off-by: amzn-tommy * Switched to aznumeric_cast and added a comment with a JIRA to follow up on Signed-off-by: amzn-tommy --- .../RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h | 3 ++- Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h index cd3f1968bf..fc915bcd07 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelKdTree.h @@ -67,7 +67,8 @@ namespace AZ void ConstructMeshList(const ModelAsset* model, const AZ::Transform& matParent); static const int s_MinimumVertexSizeInLeafNode = 3 * 10; - + // Stop splitting the tree if more than 10% of the triangles are straddling the split axis + static constexpr float s_MaximumSplitAxisStraddlingTriangles = 1.1; AZStd::unique_ptr m_pRootNode; struct MeshData diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp index 54ec002893..ace4df5c0b 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelKdTree.cpp @@ -84,7 +84,11 @@ namespace AZ // If either the top or bottom contain all the input indices, the triangles are too close to cut any // further and the split failed - return indices.size() != outInfo.m_aboveIndices.size() && indices.size() != outInfo.m_belowIndices.size(); + // Additionally, if too many triangles straddle the split-axis, + // the triangles are too close and the split failed + // [ATOM-15944] - Use a more sophisticated method to terminate KdTree generation + return indices.size() != outInfo.m_aboveIndices.size() && indices.size() != outInfo.m_belowIndices.size() + && aznumeric_cast(outInfo.m_aboveIndices.size() + outInfo.m_belowIndices.size()) / aznumeric_cast(indices.size()) < s_MaximumSplitAxisStraddlingTriangles; } bool ModelKdTree::Build(const ModelAsset* model) From f177f671ac14d24ac46d10df835aa611df4a8f30 Mon Sep 17 00:00:00 2001 From: Tommy Walton <82672795+amzn-tommy@users.noreply.github.com> Date: Wed, 7 Jul 2021 15:09:14 -0700 Subject: [PATCH 42/67] Fix for LYN-4594: [Atom][EMFX] Loading a saved level with entity and an actor component causes the editor to freeze. (DCO fixup) (#1878) * Queue shader loads and register with the dynamic draw context after the shader is loaded to avoid a deadlock when there are multiple scenes processing at the same time. Signed-off-by: amzn-tommy * Fixed AzCore case in AtomFont.h and two other files I found while searching Signed-off-by: amzn-tommy * Switched to a utility that will both get the assetId and create the Asset, without calling GetAsset explicitely Signed-off-by: amzn-tommy * Fixing typos in error message Signed-off-by: amzn-tommy --- .../AtomLyIntegration/AtomFont/AtomFont.h | 5 ++ .../AtomFont/Code/Source/AtomFont.cpp | 56 +++++++++++++------ ...tomViewportDisplayIconsSystemComponent.cpp | 39 +++++++++---- .../AtomViewportDisplayIconsSystemComponent.h | 4 ++ Gems/Blast/Code/Include/Blast/BlastDebug.h | 2 +- .../Code/Source/Family/ActorRenderManager.h | 2 +- 6 files changed, 78 insertions(+), 30 deletions(-) diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h b/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h index 9fe3f2c25b..9e6c38a939 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h +++ b/Gems/AtomLyIntegration/AtomFont/Code/Include/AtomLyIntegration/AtomFont/AtomFont.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,7 @@ namespace AZ class AtomFont : public ICryFont , public AzFramework::FontQueryInterface + , private Data::AssetBus::Handler { friend class FFont; @@ -122,6 +124,9 @@ namespace AZ //! \param outputFullPath Full path to loaded font family, may need resolving with PathUtil::MakeGamePath. XmlNodeRef LoadFontFamilyXml(const char* fontFamilyName, string& outputDirectory, string& outputFullPath); + // Data::AssetBus::Handler overrides... + void OnAssetReady(Data::Asset asset) override; + private: AzFramework::ISceneSystem::SceneEvent::Handler m_sceneEventHandler; diff --git a/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp b/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp index 114dbf62bb..cb157b95f6 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp +++ b/Gems/AtomLyIntegration/AtomFont/Code/Source/AtomFont.cpp @@ -29,6 +29,7 @@ #include #include +#include // Static member definitions const AZ::AtomFont::GlyphSize AZ::AtomFont::defaultGlyphSize = AZ::AtomFont::GlyphSize(ICryFont::defaultGlyphSizeX, ICryFont::defaultGlyphSizeY); @@ -349,30 +350,18 @@ AZ::AtomFont::AtomFont(ISystem* system) #endif AZ::Interface::Register(this); - // register font per viewport dynamic draw context. + // Queue a load for the font per viewport dynamic draw context shader, and wait for it to load static const char* shaderFilepath = "Shaders/SimpleTextured.azshader"; - AZ::AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext( - AZ::Name(AZ::AtomFontDynamicDrawContextName), - [](RPI::Ptr drawContext) - { - Data::Instance shader = AZ::RPI::LoadShader(shaderFilepath); - AZ::RPI::ShaderOptionList shaderOptions; - shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_useColorChannels"), AZ::Name("false"))); - shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_clamp"), AZ::Name("true"))); - drawContext->InitShaderWithVariant(shader, &shaderOptions); - drawContext->InitVertexFormat( - { - {"POSITION", RHI::Format::R32G32B32_FLOAT}, - {"COLOR", RHI::Format::B8G8R8A8_UNORM}, - {"TEXCOORD0", RHI::Format::R32G32_FLOAT} - }); - drawContext->EndInit(); - }); + Data::Asset shaderAsset = RPI::AssetUtils::GetAssetByProductPath(shaderFilepath, RPI::AssetUtils::TraceLevel::Assert); + shaderAsset.QueueLoad(); + Data::AssetBus::Handler::BusConnect(shaderAsset.GetId()); } AZ::AtomFont::~AtomFont() { + Data::AssetBus::Handler::BusDisconnect(); + AZ::Interface::Unregister(this); m_defaultFontDrawInterface = nullptr; @@ -864,5 +853,36 @@ XmlNodeRef AZ::AtomFont::LoadFontFamilyXml(const char* fontFamilyName, string& o return root; } + +void AZ::AtomFont::OnAssetReady(Data::Asset asset) +{ + Data::Asset shaderAsset = asset; + + AZ::AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext( + AZ::Name(AZ::AtomFontDynamicDrawContextName), + [shaderAsset](RPI::Ptr drawContext) + { + AZ_Assert(shaderAsset->IsReady(), "Attempting to register the AtomFont" + " dynamic draw context before the shader asset is loaded. The shader should be loaded first" + " to avoid a blocking asset load and potential deadlock, since the DynamicDrawContext lambda" + " will be executed during scene processing and there may be multiple scenes executing in parallel."); + + Data::Instance shader = RPI::Shader::FindOrCreate(shaderAsset); + AZ::RPI::ShaderOptionList shaderOptions; + shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_useColorChannels"), AZ::Name("false"))); + shaderOptions.push_back(AZ::RPI::ShaderOption(AZ::Name("o_clamp"), AZ::Name("true"))); + drawContext->InitShaderWithVariant(shader, &shaderOptions); + drawContext->InitVertexFormat( + { + {"POSITION", RHI::Format::R32G32B32_FLOAT}, + {"COLOR", RHI::Format::B8G8R8A8_UNORM}, + {"TEXCOORD0", RHI::Format::R32G32_FLOAT} + }); + drawContext->EndInit(); + }); + + Data::AssetBus::Handler::BusDisconnect(); +} + #endif diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp index 305fad8ad0..f3f06a2efc 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -87,6 +88,7 @@ namespace AZ::Render void AtomViewportDisplayIconsSystemComponent::Deactivate() { + Data::AssetBus::Handler::BusDisconnect(); Bootstrap::NotificationBus::Handler::BusDisconnect(); auto perViewportDynamicDrawInterface = AtomBridge::PerViewportDynamicDraw::Get(); @@ -338,15 +340,32 @@ namespace AZ::Render void AtomViewportDisplayIconsSystemComponent::OnBootstrapSceneReady([[maybe_unused]]AZ::RPI::Scene* bootstrapScene) { - AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext(m_drawContextName, [](RPI::Ptr drawContext) - { - auto shader = RPI::LoadShader(DrawContextShaderPath); - drawContext->InitShader(shader); - drawContext->InitVertexFormat( - {{"POSITION", RHI::Format::R32G32B32_FLOAT}, - {"COLOR", RHI::Format::R8G8B8A8_UNORM}, - {"TEXCOORD", RHI::Format::R32G32_FLOAT}}); - drawContext->EndInit(); - }); + // Queue a load for the draw context shader, and wait for it to load + Data::Asset shaderAsset = RPI::AssetUtils::GetAssetByProductPath(DrawContextShaderPath, RPI::AssetUtils::TraceLevel::Assert); + shaderAsset.QueueLoad(); + Data::AssetBus::Handler::BusConnect(shaderAsset.GetId()); + } + + void AtomViewportDisplayIconsSystemComponent::OnAssetReady(Data::Asset asset) + { + // Once the shader is loaded, register it with the dynamic draw context + Data::Asset shaderAsset = asset; + AtomBridge::PerViewportDynamicDraw::Get()->RegisterDynamicDrawContext(m_drawContextName, [shaderAsset](RPI::Ptr drawContext) + { + AZ_Assert(shaderAsset->IsReady(), "Attempting to register the AtomViewportDisplayIconsSystemComponent" + " dynamic draw context before the shader asset is loaded. The shader should be loaded first" + " to avoid a blocking asset load and potential deadlock, since the DynamicDrawContext lambda" + " will be executed during scene processing and there may be multiple scenes executing in parallel."); + + Data::Instance shader = RPI::Shader::FindOrCreate(shaderAsset); + drawContext->InitShader(shader); + drawContext->InitVertexFormat( + { {"POSITION", RHI::Format::R32G32B32_FLOAT}, + {"COLOR", RHI::Format::R8G8B8A8_UNORM}, + {"TEXCOORD", RHI::Format::R32G32_FLOAT} }); + drawContext->EndInit(); + }); + + Data::AssetBus::Handler::BusDisconnect(); } } // namespace AZ::Render diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.h b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.h index 8cb268d36a..cd6fddf745 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.h +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/Code/Source/AtomViewportDisplayIconsSystemComponent.h @@ -27,6 +27,7 @@ namespace AZ : public AZ::Component , public AzToolsFramework::EditorViewportIconDisplayInterface , public AZ::Render::Bootstrap::NotificationBus::Handler + , private Data::AssetBus::Handler { public: AZ_COMPONENT(AtomViewportDisplayIconsSystemComponent, "{AEC1D3E1-1D9A-437A-B4C6-CFAEE620C160}"); @@ -51,6 +52,9 @@ namespace AZ // AZ::Render::Bootstrap::NotificationBus::Handler overrides... void OnBootstrapSceneReady(AZ::RPI::Scene* bootstrapScene) override; + // Data::AssetBus::Handler overrides... + void OnAssetReady(Data::Asset asset) override; + private: static constexpr const char* DrawContextShaderPath = "Shaders/TexturedIcon.azshader"; static constexpr QSize MinimumRenderedSvgSize = QSize(128, 128); diff --git a/Gems/Blast/Code/Include/Blast/BlastDebug.h b/Gems/Blast/Code/Include/Blast/BlastDebug.h index 2530eb4217..9613b94ff5 100644 --- a/Gems/Blast/Code/Include/Blast/BlastDebug.h +++ b/Gems/Blast/Code/Include/Blast/BlastDebug.h @@ -8,7 +8,7 @@ #include #include -#include +#include namespace Blast { diff --git a/Gems/Blast/Code/Source/Family/ActorRenderManager.h b/Gems/Blast/Code/Source/Family/ActorRenderManager.h index c4037bb638..c0cdda158c 100644 --- a/Gems/Blast/Code/Source/Family/ActorRenderManager.h +++ b/Gems/Blast/Code/Source/Family/ActorRenderManager.h @@ -8,7 +8,7 @@ #include #include -#include +#include namespace Blast { From 992f5aab1bc38568d99f81f2460b9f13a2cea81e Mon Sep 17 00:00:00 2001 From: Shirang Jia Date: Wed, 7 Jul 2021 15:12:10 -0700 Subject: [PATCH 43/67] Convert Incremental scripts to Python3 (#1934) Convert incremental build script to Python3 --- scripts/build/Jenkins/Jenkinsfile | 8 +- .../build/bootstrap/incremental_build_util.py | 84 +++++++++---------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index 8e73524878..a7a796f3b7 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -269,8 +269,8 @@ def PreBuildCommonSteps(Map pipelineConfig, String repositoryName, String projec unstash name: 'incremental_build_script' def pythonCmd = '' - if(env.IS_UNIX) pythonCmd = 'sudo -E python -u ' - else pythonCmd = 'python -u ' + if(env.IS_UNIX) pythonCmd = 'sudo -E python3 -u ' + else pythonCmd = 'python3 -u ' if(env.RECREATE_VOLUME?.toBoolean()) { palSh("${pythonCmd} ${INCREMENTAL_BUILD_SCRIPT_PATH} --action delete --repository_name ${repositoryName} --project ${projectName} --pipeline ${pipeline} --branch ${branchName} --platform ${platform} --build_type ${buildType}", 'Deleting volume', winSlashReplacement=false) @@ -382,8 +382,8 @@ def PostBuildCommonSteps(String workspace, boolean mount = true) { if (mount) { def pythonCmd = '' - if(env.IS_UNIX) pythonCmd = 'sudo -E python -u ' - else pythonCmd = 'python -u ' + if(env.IS_UNIX) pythonCmd = 'sudo -E python3 -u ' + else pythonCmd = 'python3 -u ' try { timeout(5) { diff --git a/scripts/build/bootstrap/incremental_build_util.py b/scripts/build/bootstrap/incremental_build_util.py index 0a1dce5130..ef49a27bb1 100755 --- a/scripts/build/bootstrap/incremental_build_util.py +++ b/scripts/build/bootstrap/incremental_build_util.py @@ -7,7 +7,7 @@ import argparse import ast import boto3 import datetime -import urllib2 +import urllib.request, urllib.error, urllib.parse import os import psutil import time @@ -49,7 +49,7 @@ if os.name == 'nt': def is_dir_symlink(path): FILE_ATTRIBUTE_REPARSE_POINT = 0x0400 - return os.path.isdir(path) and (ctypes.windll.kernel32.GetFileAttributesW(unicode(path)) & FILE_ATTRIBUTE_REPARSE_POINT) + return os.path.isdir(path) and (ctypes.windll.kernel32.GetFileAttributesW(str(path)) & FILE_ATTRIBUTE_REPARSE_POINT) def get_free_space_mb(path): if sys.version_info < (3,): # Python 2? @@ -84,7 +84,7 @@ else: return st.f_bavail * st.f_frsize / 1024 / 1024 def error(message): - print message + print(message) exit(1) def parse_args(): @@ -137,19 +137,19 @@ def get_ec2_client(region): def get_ec2_instance_id(): try: - instance_id = urllib2.urlopen('http://169.254.169.254/latest/meta-data/instance-id').read() - return instance_id + instance_id = urllib.request.urlopen('http://169.254.169.254/latest/meta-data/instance-id').read() + return instance_id.decode("utf-8") except Exception as e: - print e.message + print(e.message) error('No EC2 metadata! Check if you are running this script on an EC2 instance.') def get_availability_zone(): try: - availability_zone = urllib2.urlopen('http://169.254.169.254/latest/meta-data/placement/availability-zone').read() - return availability_zone + availability_zone = urllib.request.urlopen('http://169.254.169.254/latest/meta-data/placement/availability-zone').read() + return availability_zone.decode("utf-8") except Exception as e: - print e.message + print(e.message) error('No EC2 metadata! Check if you are running this script on an EC2 instance.') @@ -158,11 +158,11 @@ def kill_processes(workspace='/dev/'): Kills all processes that have open file paths associated with the workspace. Uses PSUtil for cross-platform compatibility ''' - print 'Checking for any stuck processes...' + print('Checking for any stuck processes...') for proc in psutil.process_iter(): try: if workspace in str(proc.open_files()): - print "{} has open files in {}. Terminating".format(proc.name(), proc.open_files()) + print("{} has open files in {}. Terminating".format(proc.name(), proc.open_files())) proc.kill() time.sleep(1) # Just to make sure a parent process has time to close except (psutil.NoSuchProcess, psutil.AccessDenied, psutil.ZombieProcess): @@ -171,7 +171,7 @@ def kill_processes(workspace='/dev/'): def delete_volume(ec2_client, volume_id): response = ec2_client.delete_volume(VolumeId=volume_id) - print 'Volume {} deleted'.format(volume_id) + print('Volume {} deleted'.format(volume_id)) def find_snapshot_id(ec2_client, repository_name, project, pipeline, platform, build_type, disk_size): mount_name = get_mount_name(repository_name, project, pipeline, 'stabilization_2106', platform, build_type) # we take snapshots out of stabilization_2106 @@ -234,29 +234,29 @@ def create_volume(ec2_client, availability_zone, repository_name, project, pipel time.sleep(1) response = ec2_client.describe_volumes(VolumeIds=[volume_id, ]) - print("Volume {} created\n\tSnapshot: {}\n\tRepository {}\n\tProject {}\n\tPipeline {}\n\tBranch {}\n\tPlatform: {}\n\tBuild type: {}" - .format(volume_id, snapshot_id, repository_name, project, pipeline, branch, platform, build_type)) + print(("Volume {} created\n\tSnapshot: {}\n\tRepository {}\n\tProject {}\n\tPipeline {}\n\tBranch {}\n\tPlatform: {}\n\tBuild type: {}" + .format(volume_id, snapshot_id, repository_name, project, pipeline, branch, platform, build_type))) return volume_id, created def mount_volume(created): - print 'Mounting volume...' + print('Mounting volume...') if os.name == 'nt': f = tempfile.NamedTemporaryFile(delete=False) f.write(""" select disk 1 online disk attribute disk clear readonly - """) # assume disk # for now + """.encode('utf-8')) # assume disk # for now if created: - print 'Creating filesystem on new volume' + print('Creating filesystem on new volume') f.write("""create partition primary select partition 1 format quick fs=ntfs assign active - """) + """.encode('utf-8')) f.close() @@ -267,7 +267,7 @@ def mount_volume(created): drives_after = win32api.GetLogicalDriveStrings() drives_after = drives_after.split('\000')[:-1] - print drives_after + print(drives_after) #drive_letter = next(item for item in drives_after if item not in drives_before) drive_letter = MOUNT_PATH @@ -284,7 +284,7 @@ def mount_volume(created): def attach_volume(volume, volume_id, instance_id, timeout=DEFAULT_TIMEOUT): - print 'Attaching volume {} to instance {}'.format(volume_id, instance_id) + print('Attaching volume {} to instance {}'.format(volume_id, instance_id)) volume.attach_to_instance(Device='xvdf', InstanceId=instance_id, VolumeId=volume_id) @@ -297,7 +297,7 @@ def attach_volume(volume, volume_id, instance_id, timeout=DEFAULT_TIMEOUT): time.sleep(1) volume.load() if (time.clock() - timeout_init) > timeout: - print 'ERROR: Timeout reached trying to mount EBS' + print('ERROR: Timeout reached trying to mount EBS') exit(1) volume.create_tags( Tags=[ @@ -307,11 +307,11 @@ def attach_volume(volume, volume_id, instance_id, timeout=DEFAULT_TIMEOUT): }, ] ) - print 'Volume {} has been attached to instance {}'.format(volume_id, instance_id) + print('Volume {} has been attached to instance {}'.format(volume_id, instance_id)) def unmount_volume(): - print 'Umounting volume...' + print('Umounting volume...') if os.name == 'nt': kill_processes(MOUNT_PATH + 'workspace') f = tempfile.NamedTemporaryFile(delete=False) @@ -328,7 +328,7 @@ def unmount_volume(): def detach_volume(volume, ec2_instance_id, force, timeout=DEFAULT_TIMEOUT): - print 'Detaching volume {} from instance {}'.format(volume.volume_id, ec2_instance_id) + print('Detaching volume {} from instance {}'.format(volume.volume_id, ec2_instance_id)) volume.detach_from_instance(Device='xvdf', Force=force, InstanceId=ec2_instance_id, @@ -338,16 +338,16 @@ def detach_volume(volume, ec2_instance_id, force, timeout=DEFAULT_TIMEOUT): time.sleep(1) volume.load() if (time.clock() - timeout_init) > timeout: - print 'ERROR: Timeout reached trying to unmount EBS.' + print('ERROR: Timeout reached trying to unmount EBS.') volume.detach_from_instance(Device='xvdf',Force=True,InstanceId=ec2_instance_id,VolumeId=volume.volume_id) exit(1) - print 'Volume {} has been detached from instance {}'.format(volume.volume_id, ec2_instance_id) + print('Volume {} has been detached from instance {}'.format(volume.volume_id, ec2_instance_id)) volume.load() if len(volume.attachments): - print 'Volume still has attachments' + print('Volume still has attachments') for attachment in volume.attachments: - print 'Volume {} {} to instance {}'.format(attachment['VolumeId'], attachment['State'], attachment['InstanceId']) + print('Volume {} {} to instance {}'.format(attachment['VolumeId'], attachment['State'], attachment['InstanceId'])) def attach_ebs_and_create_partition_with_retry(volume, volume_id, ec2_instance_id, created): @@ -379,10 +379,10 @@ def mount_ebs(repository_name, project, pipeline, branch, platform, build_type, for volume in ec2_instance.volumes.all(): for attachment in volume.attachments: - print 'attachment device: {}'.format(attachment['Device']) + print('attachment device: {}'.format(attachment['Device'])) if 'xvdf' in attachment['Device'] and attachment['State'] != 'detached': - print 'A device is already attached to xvdf. This likely means a previous build failed to detach its ' \ - 'build volume. This volume is considered orphaned and will be detached from this instance.' + print('A device is already attached to xvdf. This likely means a previous build failed to detach its ' \ + 'build volume. This volume is considered orphaned and will be detached from this instance.') unmount_volume() detach_volume(volume, ec2_instance_id, False) # Force unmounts should not be used, as that will cause the EBS block device driver to fail the remount @@ -393,21 +393,21 @@ def mount_ebs(repository_name, project, pipeline, branch, platform, build_type, created = False if 'Volumes' in response and not len(response['Volumes']): - print 'Volume for {} doesn\'t exist creating it...'.format(mount_name) + print('Volume for {} doesn\'t exist creating it...'.format(mount_name)) # volume doesn't exist, create it volume_id, created = create_volume(ec2_client, ec2_availability_zone, repository_name, project, pipeline, branch, platform, build_type, disk_size, disk_type) else: volume = response['Volumes'][0] volume_id = volume['VolumeId'] - print 'Current volume {} is a {} GB {}'.format(volume_id, volume['Size'], volume['VolumeType']) + print('Current volume {} is a {} GB {}'.format(volume_id, volume['Size'], volume['VolumeType'])) if (volume['Size'] != disk_size or volume['VolumeType'] != disk_type): - print 'Override disk attributes does not match the existing volume, deleting {} and replacing the volume'.format(volume_id) + print('Override disk attributes does not match the existing volume, deleting {} and replacing the volume'.format(volume_id)) delete_volume(ec2_client, volume_id) volume_id, created = create_volume(ec2_client, ec2_availability_zone, repository_name, project, pipeline, branch, platform, build_type, disk_size, disk_type) if len(volume['Attachments']): # this is bad we shouldn't be attached, we should have detached at the end of a build attachment = volume['Attachments'][0] - print ('Volume already has attachment {}, detaching...'.format(attachment)) + print(('Volume already has attachment {}, detaching...'.format(attachment))) detach_volume(ec2_resource.Volume(volume_id), attachment['InstanceId'], True) volume = ec2_resource.Volume(volume_id) @@ -416,23 +416,23 @@ def mount_ebs(repository_name, project, pipeline, branch, platform, build_type, drives_before = win32api.GetLogicalDriveStrings() drives_before = drives_before.split('\000')[:-1] - print drives_before + print(drives_before) attach_ebs_and_create_partition_with_retry(volume, volume_id, ec2_instance_id, created) free_space_mb = get_free_space_mb(MOUNT_PATH) - print 'Free disk space {}MB'.format(free_space_mb) + print('Free disk space {}MB'.format(free_space_mb)) if free_space_mb < LOW_EBS_DISK_SPACE_LIMIT: - print 'Volume is running below EBS free disk space treshhold {}MB. Recreating volume and running clean build.'.format(LOW_EBS_DISK_SPACE_LIMIT) + print('Volume is running below EBS free disk space treshhold {}MB. Recreating volume and running clean build.'.format(LOW_EBS_DISK_SPACE_LIMIT)) unmount_volume() detach_volume(volume, ec2_instance_id, False) delete_volume(ec2_client, volume_id) new_disk_size = int(volume.size * 1.25) if new_disk_size > MAX_EBS_DISK_SIZE: - print 'Error: EBS disk size reached to the allowed maximum disk size {}MB, please contact ly-infra@ and ly-build@ to investigate.'.format(MAX_EBS_DISK_SIZE) + print('Error: EBS disk size reached to the allowed maximum disk size {}MB, please contact ly-infra@ and ly-build@ to investigate.'.format(MAX_EBS_DISK_SIZE)) exit(1) - print 'Recreating the EBS with disk size {}'.format(new_disk_size) + print('Recreating the EBS with disk size {}'.format(new_disk_size)) volume_id, created = create_volume(ec2_client, ec2_availability_zone, repository_name, project, pipeline, branch, platform, build_type, new_disk_size, disk_type) volume = ec2_resource.Volume(volume_id) attach_ebs_and_create_partition_with_retry(volume, volume_id, ec2_instance_id, created) @@ -454,13 +454,13 @@ def unmount_ebs(): for attached_volume in ec2_instance.volumes.all(): for attachment in attached_volume.attachments: - print 'attachment device: {}'.format(attachment['Device']) + print('attachment device: {}'.format(attachment['Device'])) if attachment['Device'] == 'xvdf': volume = attached_volume if not volume: # volume is not mounted - print 'Volume is not mounted' + print('Volume is not mounted') else: unmount_volume() detach_volume(volume, ec2_instance_id, False) From 5e98eefcc27cdcc4bce4b69e191c4e321a0f91ff Mon Sep 17 00:00:00 2001 From: Ken Pruiksma Date: Wed, 7 Jul 2021 17:13:43 -0500 Subject: [PATCH 44/67] Undoing change from review feedback as it led to an incorrect result in some cases. Signed-off-by: Ken Pruiksma --- .../ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli index 8042758db8..6e45cf30c8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli @@ -111,13 +111,9 @@ float IntegrateEdge(float3 v1, float3 v2) float IntegrateEdgeDiffuse(float3 v1, float3 v2) { float cosTheta = dot(v1, v2); - float theta_sinTheta = 0.0; - if (cosTheta > 0.0) - { - float absCosTheta = abs(cosTheta); - theta_sinTheta = 1.5708 + (-0.879406 + 0.308609 * absCosTheta) * absCosTheta; - } - else + float absCosTheta = abs(cosTheta); + float theta_sinTheta = 1.5708 + (-0.879406 + 0.308609 * absCosTheta) * absCosTheta; + if (cosTheta < 0.0) { theta_sinTheta = PI * rsqrt(1.0 - cosTheta * cosTheta) - theta_sinTheta; } From b9964bbb5a3c360b4ead64939b445c0ed698102e Mon Sep 17 00:00:00 2001 From: Twolewis Date: Wed, 7 Jul 2021 17:16:09 -0500 Subject: [PATCH 45/67] Fixed Material Editor not launching (#1920) * Fixed Material Editor not launching Explicitly providing project-path as part of launch parameters. Signed-off-by: Lloyd Tullues * Update Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Signed-off-by: Lloyd Tullues * Minor - adding whitespace for consistency Signed-off-by: Lloyd Tullues Co-authored-by: Lloyd Tullues Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> --- .../Code/Source/Material/EditorMaterialSystemComponent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp index a8d6270c7e..efb79bb06c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp @@ -130,6 +130,12 @@ namespace AZ arguments.append(QString("--rhi=%1").arg(apiName.GetCStr())); } + AZ::IO::FixedMaxPathString projectPath(AZ::Utils::GetProjectPath()); + if (!projectPath.empty()) + { + arguments.append(QString("--project-path=%1").arg(projectPath.c_str())); + } + AtomToolsFramework::LaunchTool("MaterialEditor", ".exe", arguments); } From a75b8eb6360748fe22faaf6543d5a45f0223bddc Mon Sep 17 00:00:00 2001 From: Ken Pruiksma Date: Wed, 7 Jul 2021 18:00:40 -0500 Subject: [PATCH 46/67] [LYN-3913] Fix conversion to unsupported photometric unit on light type change. When converting to a light type that doesn't support the currently used photometric unit, the editor component will convert the photometric unit to the universally supported lumen. Signed-off-by: Ken Pruiksma --- .../CoreLights/EditorAreaLightComponent.cpp | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp index 5dabd7317b..b9d63f6dc3 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp @@ -263,7 +263,23 @@ namespace AZ // Update the cached light type. m_lightType = m_controller.m_configuration.m_lightType; + + // Check to see if the current photometric type is supported by the light type. If not, convert to lumens before deactivating. + auto supportedPhotometricUnits = m_controller.m_configuration.GetValidPhotometricUnits(); + auto foundIt = AZStd::find_if( + supportedPhotometricUnits.begin(), + supportedPhotometricUnits.end(), + [&](const Edit::EnumConstant& entry) -> bool + { + return AZStd::RemoveEnum::type(m_controller.m_configuration.m_intensityMode) == entry.m_value; + } + ); + if (foundIt == supportedPhotometricUnits.end()) + { + m_controller.ConvertToIntensityMode(PhotometricUnit::Lumen); + } + // componets may be removed or added here, so deactivate now and reactivate the entity when everything is done shifting around. GetEntity()->Deactivate(); @@ -320,7 +336,7 @@ namespace AZ // Some light types don't require a shape, this is ok. break; } - + GetEntity()->Activate(); // Set more reasonable default values for certain shapes. @@ -333,7 +349,12 @@ namespace AZ LmbrCentral::DiskShapeComponentRequestBus::Event(GetEntityId(), &LmbrCentral::DiskShapeComponentRequests::SetRadius, 0.05f); break; } - + + if (foundIt == supportedPhotometricUnits.end()) + { + m_controller.ConvertToIntensityMode(PhotometricUnit::Lumen); + } + return true; } From 6c0264862e4cc588ff0fb9974a80238785925727 Mon Sep 17 00:00:00 2001 From: Ken Pruiksma Date: Wed, 7 Jul 2021 18:05:36 -0500 Subject: [PATCH 47/67] Removing unnecessary code Signed-off-by: Ken Pruiksma --- .../Code/Source/CoreLights/EditorAreaLightComponent.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp index b9d63f6dc3..81e87f3cb5 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp @@ -350,11 +350,6 @@ namespace AZ break; } - if (foundIt == supportedPhotometricUnits.end()) - { - m_controller.ConvertToIntensityMode(PhotometricUnit::Lumen); - } - return true; } From 9ca7a698dfa0af31c61db28ab70e6e40b3d5c37e Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 7 Jul 2021 16:17:40 -0700 Subject: [PATCH 48/67] Fix Mac Editor crash when adding PhysX Collider component to an entity. (#1930) Signed-off-by: amzn-sj --- Code/Framework/AzFramework/AzFramework/Physics/Material.cpp | 4 ++-- Code/Framework/AzFramework/AzFramework/Physics/Material.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp b/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp index cdcdbe4655..05f41cc8da 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/Material.cpp @@ -504,7 +504,7 @@ namespace Physics } } - const AZ::Data::Asset& MaterialSelection::GetMaterialLibrary() + AZ::Data::Asset MaterialSelection::GetMaterialLibrary() { if (auto* physicsSystem = AZ::Interface::Get()) { @@ -516,7 +516,7 @@ namespace Physics return s_invalidMaterialLibrary; } - const AZ::Data::AssetId& MaterialSelection::GetMaterialLibraryId() + AZ::Data::AssetId MaterialSelection::GetMaterialLibraryId() { return GetMaterialLibrary().GetId(); } diff --git a/Code/Framework/AzFramework/AzFramework/Physics/Material.h b/Code/Framework/AzFramework/AzFramework/Physics/Material.h index bd15dd338e..455da207d1 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/Material.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/Material.h @@ -306,8 +306,8 @@ namespace Physics void SyncSelectionToMaterialLibrary(); - static const AZ::Data::Asset& GetMaterialLibrary(); - static const AZ::Data::AssetId& GetMaterialLibraryId(); + static AZ::Data::Asset GetMaterialLibrary(); + static AZ::Data::AssetId GetMaterialLibraryId(); bool AreMaterialSlotsReadOnly() const; From 55a3b412226b5485f3f5bf5c1c52c4142c3de017 Mon Sep 17 00:00:00 2001 From: Shirang Jia Date: Wed, 7 Jul 2021 16:44:42 -0700 Subject: [PATCH 49/67] Fix unmounting error (#1940) --- scripts/build/bootstrap/incremental_build_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/bootstrap/incremental_build_util.py b/scripts/build/bootstrap/incremental_build_util.py index ef49a27bb1..32a6b0f526 100755 --- a/scripts/build/bootstrap/incremental_build_util.py +++ b/scripts/build/bootstrap/incremental_build_util.py @@ -318,7 +318,7 @@ def unmount_volume(): f.write(""" select disk 1 offline disk - """) + """.encode('utf-8')) f.close() subprocess.call('diskpart /s %s' % f.name) os.unlink(f.name) From 15e0aa7984c691f9b4e4614c0ecd633145950b17 Mon Sep 17 00:00:00 2001 From: moraaar Date: Tue, 6 Jul 2021 16:06:24 +0100 Subject: [PATCH 50/67] Use latest version of nvcloth, poly2tri and v-hacd 3rdParty libraries for windows, android, mac and ios. Signed-off-by: moraaar --- Gems/NvCloth/Code/Platform/Android/PAL_android.cmake | 2 +- Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake | 2 +- Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake | 2 +- Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake | 2 +- Gems/PhysX/Code/CMakeLists.txt | 3 --- Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake | 5 +++++ Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake | 5 +++++ Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake | 5 +++++ 8 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake b/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake index 77e8a42871..ffaa3f828f 100644 --- a/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake +++ b/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-android TARGETS NvCloth PACKAGE_HASH 01eb0bc7fae91bb088a7d4c0f9555743a2c442f7b823a89072eacad361a20b42) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake b/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake index 77e8a42871..1e856fa1c2 100644 --- a/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake +++ b/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-mac TARGETS NvCloth PACKAGE_HASH 9156548da6fc35f89b592306cc512257042159e3c9c2ce5f483d8d0701b63716) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake b/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake index afedeb2df8..f62da3def9 100644 --- a/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake +++ b/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake @@ -7,4 +7,4 @@ set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows TARGETS NvCloth PACKAGE_HASH 2f521d961443d66ca941800377a8afb328daf8e39f4808e4d18dde382451ab46) diff --git a/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake b/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake index 77e8a42871..fa099bfd3e 100644 --- a/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake +++ b/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-ios TARGETS NvCloth PACKAGE_HASH 62e17ed51da9a3452b7397a4e1f64aca79e8f4c70181a75aeb6ca596c6692971) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/PhysX/Code/CMakeLists.txt b/Gems/PhysX/Code/CMakeLists.txt index 21f9172055..9b867a7652 100644 --- a/Gems/PhysX/Code/CMakeLists.txt +++ b/Gems/PhysX/Code/CMakeLists.txt @@ -74,9 +74,6 @@ ly_create_alias(NAME PhysX.Servers NAMESPACE Gem TARGETS Gem::PhysX) if(PAL_TRAIT_BUILD_HOST_TOOLS) - ly_associate_package(PACKAGE_NAME poly2tri-0.3.3-rev2-multiplatform TARGETS poly2tri PACKAGE_HASH 04092d06716f59b936b61906eaf3647db23b685d81d8b66131eb53e0aeaa1a38) - ly_associate_package(PACKAGE_NAME v-hacd-2.0-rev1-multiplatform TARGETS v-hacd PACKAGE_HASH 5c71aef19cc9787d018d64eec076e9f51ea5a3e0dc6b6e22e57c898f6cc4afe3) - ly_add_target( NAME PhysX.Editor.Static STATIC NAMESPACE Gem diff --git a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake index 9033ea99c2..cf5b77edc3 100644 --- a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake @@ -6,3 +6,8 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_associate_package(PACKAGE_NAME poly2tri-0.3.3-rev2-multiplatform TARGETS poly2tri PACKAGE_HASH 04092d06716f59b936b61906eaf3647db23b685d81d8b66131eb53e0aeaa1a38) + ly_associate_package(PACKAGE_NAME v-hacd-2.0-rev1-multiplatform TARGETS v-hacd PACKAGE_HASH 5c71aef19cc9787d018d64eec076e9f51ea5a3e0dc6b6e22e57c898f6cc4afe3) +endif() diff --git a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake index 9033ea99c2..88c3808ed9 100644 --- a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake +++ b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake @@ -6,3 +6,8 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-mac TARGETS poly2tri PACKAGE_HASH 23e49e6b06d79327985d17b40bff20ab202519c283a842378f5f1791c1bf8dbc) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-mac TARGETS v-hacd PACKAGE_HASH c1de9fadb2c0db42416a1bd5fe3423401c6f41b58409bc652064b5ad23667c09) +endif() diff --git a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake index 9033ea99c2..cc671f7014 100644 --- a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake +++ b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake @@ -6,3 +6,8 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-windows TARGETS poly2tri PACKAGE_HASH 5fea2bf294e5130e0654fbfa39f192e6369f3853901dde90bb9b3f3a11edcb1e) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-windows TARGETS v-hacd PACKAGE_HASH c5826ec28aedc3b5931ddf655d055395872cd3e75cd829f5745a2e607deb7468) +endif() From 7d5f8d51257ebe66637b34a15426b31c2b7d2df1 Mon Sep 17 00:00:00 2001 From: moraaar Date: Tue, 6 Jul 2021 18:19:08 +0100 Subject: [PATCH 51/67] Updating linux version of NvCloth, poly2tri and v-hacd. Signed-off-by: moraaar --- Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake | 2 +- Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake b/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake index 77e8a42871..eaf3d92b1c 100644 --- a/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake +++ b/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux TARGETS NvCloth PACKAGE_HASH c2e469c909fb358105ffe854476e87d9c69626aa16bd0ca0bcd941522adadc6d) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake index cf5b77edc3..492d0957c7 100644 --- a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake @@ -8,6 +8,6 @@ set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) if(PAL_TRAIT_BUILD_HOST_TOOLS) - ly_associate_package(PACKAGE_NAME poly2tri-0.3.3-rev2-multiplatform TARGETS poly2tri PACKAGE_HASH 04092d06716f59b936b61906eaf3647db23b685d81d8b66131eb53e0aeaa1a38) - ly_associate_package(PACKAGE_NAME v-hacd-2.0-rev1-multiplatform TARGETS v-hacd PACKAGE_HASH 5c71aef19cc9787d018d64eec076e9f51ea5a3e0dc6b6e22e57c898f6cc4afe3) + ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-linux TARGETS poly2tri PACKAGE_HASH b16eef8f0bc469de0e3056d28d7484cf42659667e39b68b239f0d3a4cbb533d0) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-linux TARGETS v-hacd PACKAGE_HASH 777bed3c7805a63446ddfea51c505b35398744f9245fa7ddc58e6a25d034e682) endif() From 8a582fdf3f1822ae98f403bcd480f41dd3ec41a4 Mon Sep 17 00:00:00 2001 From: moraaar Date: Wed, 7 Jul 2021 10:56:17 +0100 Subject: [PATCH 52/67] Udating SHA for nvcloth windows package. Signed-off-by: moraaar --- Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake b/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake index f62da3def9..1e8ba72eb8 100644 --- a/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake +++ b/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake @@ -7,4 +7,4 @@ set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) -ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows TARGETS NvCloth PACKAGE_HASH 2f521d961443d66ca941800377a8afb328daf8e39f4808e4d18dde382451ab46) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows TARGETS NvCloth PACKAGE_HASH 8f7b3d151db93fcd511afcbcb3a34884eec47fb511c90c8f2c770ac602150010) From af48fc44e383c8f953e4a7096a86297c992949f6 Mon Sep 17 00:00:00 2001 From: moraaar Date: Thu, 8 Jul 2021 10:15:26 +0100 Subject: [PATCH 53/67] Fixed warning of variable not being used in release of ImguiAtom. Signed-off-by: moraaar --- .../ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp index 843f30fced..c9fcbe33ca 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp +++ b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp @@ -115,7 +115,7 @@ namespace AZ #endif //define(IMGUI_ENABLED) } - void ImguiAtomSystemComponent::OnViewportDpiScalingChanged(float dpiScale) + void ImguiAtomSystemComponent::OnViewportDpiScalingChanged([[maybe_unused]] float dpiScale) { #if defined(IMGUI_ENABLED) ImGui::ImGuiManagerBus::Broadcast(&ImGui::ImGuiManagerBus::Events::SetDpiScalingFactor, dpiScale); From 86c9c04c37718ea7ddadf6ece55fe58f0866c50e Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Thu, 8 Jul 2021 08:02:27 -0500 Subject: [PATCH 54/67] Fixed EMFX nodes min/max attributes. Signed-off-by: Chris Galvan --- .../EMotionFX/Source/BlendTreeLookAtNode.cpp | 8 +++---- .../Source/BlendTreeTransformNode.cpp | 24 +++++++++---------- .../Source/BlendTreeVector3Math2Node.cpp | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp index 57fa502abd..76b788facd 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeLookAtNode.cpp @@ -433,12 +433,12 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_limitMin, "Yaw/pitch min", "The minimum rotational yaw and pitch angle limits, in degrees.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector2(-90.0f, -90.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector2(90.0f, 90.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -90.0f) + ->Attribute(AZ::Edit::Attributes::Max, 90.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_limitMax, "Yaw/pitch max", "The maximum rotational yaw and pitch angle limits, in degrees.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector2(-90.0f, -90.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector2(90.0f, 90.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -90.0f) + ->Attribute(AZ::Edit::Attributes::Max, 90.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeLookAtNode::m_constraintRotation, "Constraint rotation", "A rotation that rotates the constraint space.") ->Attribute(AZ::Edit::Attributes::Visibility, &BlendTreeLookAtNode::GetLimitWidgetsVisibility) ->DataElement(AZ::Edit::UIHandlers::ComboBox, &BlendTreeLookAtNode::m_twistAxis, "Roll axis", "The axis used for twist/roll.") diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp index b8abf2cc90..cfbff381eb 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp @@ -261,23 +261,23 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::ChangeNotify, &BlendTreeTransformNode::Reinit) ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minTranslation, "Min Translation", "The minimum translation value, used when the input translation amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxTranslation, "Max Translation", "The maximum translation value, used when the input translation amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minRotation, "Min Rotation", "The minimum rotation value, in degrees, used when the input rotation amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-360.0f, -360.0f, -360.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(360.0f, 360.0f, 360.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -360.0f) + ->Attribute(AZ::Edit::Attributes::Max, 360.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxRotation, "Max Rotation", "The maximum rotation value, in degrees, used when the input rotation amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-360.0f, -360.0f, -360.0f)) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(360.0f, 360.0f, 360.0f)) + ->Attribute(AZ::Edit::Attributes::Min, -360.0f) + ->Attribute(AZ::Edit::Attributes::Max, 360.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minScale, "Min Scale", "The minimum scale value, used when the input scale amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxScale, "Max Scale", "The maximum scale value, used when the input scale amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ; } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp index 2ee0d92dcc..acd9321ede 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp @@ -254,8 +254,8 @@ namespace EMotionFX ->EnumAttribute(MATHFUNCTION_DIVIDE, "Divide") ->EnumAttribute(MATHFUNCTION_ANGLEDEGREES, "AngleDegrees") ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeVector3Math2Node::m_defaultValue, "Default Value", "The default value for x or y when one of them has no incomming connection.") - ->Attribute(AZ::Edit::Attributes::Min, AZ::Vector3(-std::numeric_limits::max())) - ->Attribute(AZ::Edit::Attributes::Max, AZ::Vector3(std::numeric_limits::max())) + ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) + ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ; } } // namespace EMotionFX From 6d9230e2922188a4a3f8fd5dbab23d7875029fe5 Mon Sep 17 00:00:00 2001 From: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com> Date: Thu, 8 Jul 2021 08:23:37 -0700 Subject: [PATCH 55/67] ATOM-15939 Add support to capture attachment for ParentPass (#1887) * ATOM-15939 Add support to capture attachment for ParentPass - Moved the attachment read back support to Pass class so it supports both ParentPass and RenderPass. - Added support to output input or output state of an InputOutput attachment. - Enabled showing ParentPass attachments in PassTree tool. Signed-off-by: Tao --- .../TrackView/AtomOutputFrameCapture.cpp | 2 +- .../Atom/Feature/Utils/FrameCaptureBus.h | 6 +- .../Source/FrameCaptureSystemComponent.cpp | 40 ++--- .../Code/Source/FrameCaptureSystemComponent.h | 5 +- .../Source/LuxCore/LuxCoreTexturePass.cpp | 18 +-- .../Code/Include/Atom/RPI.Public/Pass/Pass.h | 23 ++- .../Include/Atom/RPI.Public/Pass/RenderPass.h | 8 +- .../Specific/ImageAttachmentPreviewPass.h | 3 - .../Pass/Specific/RenderToTexturePass.h | 3 - .../RPI.Public/Pass/Specific/SelectorPass.h | 1 - .../RPI.Public/Pass/Specific/SwapChainPass.h | 4 - .../RPI/Code/Source/RPI.Public/Pass/Pass.cpp | 61 ++++++- .../Source/RPI.Public/Pass/RenderPass.cpp | 33 +--- .../Specific/ImageAttachmentPreviewPass.cpp | 12 +- .../Pass/Specific/RenderToTexturePass.cpp | 17 +- .../Pass/Specific/SwapChainPass.cpp | 14 +- .../Code/Include/Atom/Utils/ImGuiPassTree.h | 3 + .../Code/Include/Atom/Utils/ImGuiPassTree.inl | 152 ++++++++++-------- .../ThumbnailRendererSteps/CaptureStep.cpp | 2 +- 19 files changed, 200 insertions(+), 207 deletions(-) diff --git a/Code/Editor/TrackView/AtomOutputFrameCapture.cpp b/Code/Editor/TrackView/AtomOutputFrameCapture.cpp index d5ceeae9b2..cd5a977367 100644 --- a/Code/Editor/TrackView/AtomOutputFrameCapture.cpp +++ b/Code/Editor/TrackView/AtomOutputFrameCapture.cpp @@ -73,7 +73,7 @@ namespace TrackView bool startedCapture = false; AZ::Render::FrameCaptureRequestBus::BroadcastResult( startedCapture, &AZ::Render::FrameCaptureRequestBus::Events::CapturePassAttachmentWithCallback, m_passHierarchy, - AZStd::string("Output"), attachmentReadbackCallback); + AZStd::string("Output"), attachmentReadbackCallback, AZ::RPI::PassAttachmentReadbackOption::Output); return startedCapture; } diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h index e783a03071..53e7de9148 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h @@ -46,14 +46,16 @@ namespace AZ //! Save a buffer attachment or a image attachment binded to a pass's slot to a data file. //! @param passHierarchy For finding the pass by using PassHierarchyFilter //! @param slotName Name of the pass's slot. The attachment bound to this slot will be captured. + //! @param option Only valid for an InputOutput attachment. Use PassAttachmentReadbackOption::Input to capture the input state + //! and use PassAttachmentReadbackOption::Output to capture the output state //! @param outputFilename The output file path. virtual bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , const AZStd::string& outputFilePath) = 0; + , const AZStd::string& outputFilePath, RPI::PassAttachmentReadbackOption option) = 0; //! Similar to CapturePassAttachment. But instead of saving the read back result to a file, it will call the callback function provide //! in the input when callback is finished virtual bool CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) = 0; + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) = 0; }; using FrameCaptureRequestBus = EBus; diff --git a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp index a115bfa6e8..e8e4609ec4 100644 --- a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp @@ -343,7 +343,7 @@ namespace AZ } bool FrameCaptureSystemComponent::CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slot, - const AZStd::string& outputFilePath) + const AZStd::string& outputFilePath, RPI::PassAttachmentReadbackOption option) { InitReadback(); @@ -376,40 +376,22 @@ namespace AZ return false; } - AZ::RPI::RenderPass* renderPass = azrtti_cast(foundPasses[0]); - if (renderPass) + AZ::RPI::Pass* pass = foundPasses[0]; + if (pass->ReadbackAttachment(m_readback, Name(slot), option)) { - Name slotName = Name(slot); - AZ::RPI::PassAttachment* attachment = nullptr; - for (auto& binding : renderPass->GetAttachmentBindings()) - { - if (binding.m_name == slotName) - { - attachment = binding.m_attachment.get(); - break; - } - } - if (attachment) - { - m_state = State::Pending; - m_result = FrameCaptureResult::None; - SystemTickBus::Handler::BusConnect(); - renderPass->ReadbackAttachment(m_readback, attachment); - } - else - { - AZ_Warning("FrameCaptureSystemComponent", false, "Failed to find attachment bound to pass [%s] slot [%s]", - renderPass->GetName().GetCStr(), slotName.GetCStr()); - return false; - } + m_state = State::Pending; + m_result = FrameCaptureResult::None; + SystemTickBus::Handler::BusConnect(); + return true; } - return true; + AZ_Warning("FrameCaptureSystemComponent", false, "Failed to readback the attachment bound to pass [%s] slot [%s]", pass->GetName().GetCStr(), slot.c_str()); + return false; } bool FrameCaptureSystemComponent::CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) { - bool result = CapturePassAttachment(passHierarchy, slotName, ""); + bool result = CapturePassAttachment(passHierarchy, slotName, "", option); // Append state change to user provided call back AZ::RPI::AttachmentReadback::CallbackFunction callbackSetState = [&, callback](const AZ::RPI::AttachmentReadback::ReadbackResult& result) diff --git a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h index 472dd5da74..eb08494699 100644 --- a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h +++ b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h @@ -36,9 +36,10 @@ namespace AZ bool CaptureScreenshot(const AZStd::string& filePath) override; bool CaptureScreenshotForWindow(const AZStd::string& filePath, AzFramework::NativeWindowHandle windowHandle) override; bool CaptureScreenshotWithPreview(const AZStd::string& outputFilePath) override; - bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName, const AZStd::string& outputFilePath) override; + bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName, const AZStd::string& outputFilePath, + RPI::PassAttachmentReadbackOption option) override; bool CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) override; + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) override; private: void CaptureAttachmentCallback(const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult); diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp index 5faaba136e..63437ebbad 100644 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp @@ -64,23 +64,9 @@ namespace AZ // Set up read back attachment before children prepare if (m_readback->IsReady()) { - AZ::RPI::RenderPass* renderPass = azrtti_cast(m_renderTargetPass.get()); - if (renderPass) + if (m_renderTargetPass) { - RPI::PassAttachment* attachment = nullptr; - for (auto& binding : renderPass->GetAttachmentBindings()) - { - if (binding.m_slotType == RPI::PassSlotType::Output) - { - attachment = binding.m_attachment.get(); - break; - } - } - if (attachment) - { - renderPass->ReadbackAttachment(m_readback, attachment); - m_attachmentReadbackComplete = true; - } + m_attachmentReadbackComplete = m_renderTargetPass->ReadbackAttachment(m_readback, AZ::Name("RenderTargetOutput")); } } } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h index c6667e660a..736252a8a2 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h @@ -57,6 +57,7 @@ namespace AZ class PassTemplate; struct PassRequest; struct PassValidationResults; + class AttachmentReadback; using SortedPipelineViewTags = AZStd::set; using PassesByDrawList = AZStd::map; @@ -65,7 +66,12 @@ namespace AZ const uint32_t PassInputBindingCountMax = 16; const uint32_t PassInputOutputBindingCountMax = PassInputBindingCountMax; const uint32_t PassOutputBindingCountMax = PassInputBindingCountMax; - + + enum class PassAttachmentReadbackOption : uint8_t + { + Input = 0, + Output + }; //! Atom's base pass class (every pass class in Atom must derive from this class). //! @@ -222,6 +228,14 @@ namespace AZ //! Enables/Disables PipelineStatistics queries for this pass virtual void SetPipelineStatisticsQueryEnabled(bool enable); + //! Readback an attachment attached to the specified slot name + //! @param readback The AttachmentReadback object which is used for readback. Its callback function will be called when readback is finished. + //! @param slotName The attachment bind to the slot with this slotName is to be readback + //! @param option The option is used for choosing input or output state when readback an InputOutput attachment. + //! It's ignored if the attachment isn't an InputOutput attachment. + //! Return true if the readback request was successful. User may expect the AttachmentReadback's callback function would be called. + bool ReadbackAttachment(AZStd::shared_ptr readback, const Name& slotName, PassAttachmentReadbackOption option = PassAttachmentReadbackOption::Output); + //! Returns whether the Timestamp queries is enabled/disabled for this pass bool IsTimestampQueryEnabled() const; @@ -266,7 +280,6 @@ namespace AZ // Update output bindings on this pass that are connected to bindings on other passes void UpdateConnectedOutputBindings(); - protected: explicit Pass(const PassDescriptor& descriptor); @@ -349,6 +362,7 @@ namespace AZ void FrameEnd(); virtual void FrameEndInternal() { } + void UpdateReadbackAttachment(FramePrepareParams params, bool beforeAddScopes); // --- Protected Members --- @@ -442,7 +456,10 @@ namespace AZ // Sort type to be used by the default sort implementation. Passes can also provide // fully custom sort implementations by overriding the SortDrawList() function. RHI::DrawListSortType m_drawListSortType = RHI::DrawListSortType::KeyThenDepth; - + + // For read back attachment + AZStd::shared_ptr m_attachmentReadback; + PassAttachmentReadbackOption m_readbackOption; private: // Return the Timestamp result of this pass diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h index b13091082b..3d4ab0a573 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h @@ -55,10 +55,7 @@ namespace AZ //! Get MultisampleState of this pass from its output attachments RHI::MultisampleState GetMultisampleState() const; - - //! Capture pass's output and input/output attachments in following frames - void ReadbackAttachment(AZStd::shared_ptr readback, const PassAttachment* attachment); - + //! Returns a pointer to the Pass ShaderResourceGroup Data::Instance GetShaderResourceGroup(); @@ -145,9 +142,6 @@ namespace AZ // Readback the results from the ScopeQueries void ReadbackScopeQueryResults(); - // For read back attachments - AZStd::shared_ptr m_attachmentReadback; - AZStd::weak_ptr m_attachmentCopy; // Readback results from the Timestamp queries diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h index f855154975..fac9abfe28 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h @@ -166,9 +166,6 @@ namespace AZ AZ::Vector2 m_position = AZ::Vector2(0, 0.6f); AZ::Vector2 m_size = AZ::Vector2(0.4f, 0.4f); bool m_keepAspectRatio = true; - - // For readback the output image attachment - AZStd::shared_ptr m_readback; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h index 0a689f2f74..f96fe92610 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h @@ -60,9 +60,6 @@ namespace AZ // Name of the template used to create the child pass. Needed for Recreate() Name m_childTemplateName; - // For read back output - AZStd::shared_ptr m_readback; - Ptr m_outputAttachment; // saved settings for this pass diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h index 6b9559e824..9d1376c840 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h index e7869d463c..e8aeddf7e7 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -88,9 +87,6 @@ namespace AZ // Name of the template used to create the child pass. Needed for Recreate() Name m_childTemplateName; - - // For read back swap chain - AZStd::shared_ptr m_swapChainReadback; }; } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp index 9d3a776b80..dfe470c3f8 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -36,8 +37,7 @@ namespace AZ { namespace RPI - { - + { // --- Constructors --- Pass::Pass(const PassDescriptor& descriptor) @@ -1285,9 +1285,15 @@ namespace AZ CreateTransientAttachments(params.m_frameGraphBuilder->GetAttachmentDatabase()); ImportAttachments(params.m_frameGraphBuilder->GetAttachmentDatabase()); + // readback attachment with input state + UpdateReadbackAttachment(params, true); + // FrameBeginInternal needs to be the last function be called in FrameBegin because its implementation expects // all the attachments are imported to database (for example, ImageAttachmentPreview) FrameBeginInternal(params); + + // readback attachment with output state + UpdateReadbackAttachment(params, false); UpdateConnectedOutputBindings(); } @@ -1426,6 +1432,57 @@ namespace AZ m_flags.m_pipelineStatisticsQueryEnabled = enable; } + bool Pass::ReadbackAttachment(AZStd::shared_ptr readback, const Name& slotName, PassAttachmentReadbackOption option) + { + // Return false if it's already readback + if (m_attachmentReadback) + { + AZ_Warning("Pass", false, "ReadbackAttachment: skip readback pass [%s] slot [%s]because there is an another active readback", m_name.GetCStr(), slotName.GetCStr()); + return false; + } + uint32_t bindingIndex = 0; + for (auto& binding : m_attachmentBindings) + { + if (slotName == binding.m_name) + { + RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); + if (type == RHI::AttachmentType::Buffer || type == RHI::AttachmentType::Image) + { + RHI::AttachmentId attachmentId = binding.m_attachment->GetAttachmentId(); + + // Append slot index and pass name so the read back's name won't be same as the attachment used in other passes. + AZStd::string readbackName = AZStd::string::format("%s_%d_%s", attachmentId.GetCStr(), + bindingIndex, GetName().GetCStr()); + if (readback->ReadPassAttachment(binding.m_attachment.get(), AZ::Name(readbackName))) + { + m_readbackOption = PassAttachmentReadbackOption::Output; + // The m_readbackOption is only meaningful if the attachment is used for InputOutput. + if (binding.m_slotType == PassSlotType::InputOutput) + { + m_readbackOption = option; + } + m_attachmentReadback = readback; + return true; + } + return false; + } + } + bindingIndex++; + } + AZ_Warning("Pass", false, "ReadbackAttachment: failed to find slot [%s] from pass [%s]", slotName.GetCStr(), m_name.GetCStr()); + return false; + } + + void Pass::UpdateReadbackAttachment(FramePrepareParams params, bool beforeAddScopes) + { + if (beforeAddScopes == (m_readbackOption == PassAttachmentReadbackOption::Input) && m_attachmentReadback) + { + // Read the attachment for one frame. The reference can be released afterwards + m_attachmentReadback->FrameBegin(params); + m_attachmentReadback = nullptr; + } + } + bool Pass::IsTimestampQueryEnabled() const { return m_flags.m_timestampQueryEnabled; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp index f386c93f63..a3e7e2a9e2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp @@ -188,14 +188,8 @@ namespace AZ { SetScopeId(RHI::ScopeId(GetPathName())); } - params.m_frameGraphBuilder->ImportScopeProducer(*this); - // Read the attachment for one frame. The reference can be released afterwards - if (m_attachmentReadback) - { - m_attachmentReadback->FrameBegin(params); - m_attachmentReadback = nullptr; - } + params.m_frameGraphBuilder->ImportScopeProducer(*this); // Read back the ScopeQueries submitted from previous frames ReadbackScopeQueryResults(); @@ -414,31 +408,6 @@ namespace AZ m_flags.m_hasPipelineViewTag = !viewTag.IsEmpty(); } - void RenderPass::ReadbackAttachment(AZStd::shared_ptr readback, const PassAttachment* attachment) - { - m_attachmentReadback = readback; - - uint32_t bindingIndex = 0; - for (auto& binding : m_attachmentBindings) - { - if (attachment == binding.m_attachment) - { - RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); - if (type == RHI::AttachmentType::Buffer || type == RHI::AttachmentType::Image) - { - RHI::AttachmentId attachmentId = binding.m_attachment->GetAttachmentId(); - - // Append slot index and pass name so the read back's name won't be same as the attachment used in other passes. - AZStd::string readbackName = AZStd::string::format("%s_%d_%s", attachmentId.GetCStr(), - bindingIndex, GetName().GetCStr()); - m_attachmentReadback->ReadPassAttachment(binding.m_attachment.get(), AZ::Name(readbackName)); - return; - } - } - bindingIndex++; - } - } - TimestampResult RenderPass::GetTimestampResultInternal() const { return m_timestampResult; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp index abca45493a..66c994e113 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp @@ -334,22 +334,16 @@ namespace AZ m_passSrg->Compile(); m_passSrgChanged = false; } - - // Read preview output - if (m_readback) - { - m_readback->FrameBegin(params); - m_readback = nullptr; - } } bool ImageAttachmentPreviewPass::ReadbackOutput(AZStd::shared_ptr readback) { if (m_outputColorAttachment) { - m_readback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; AZStd::string readbackName = AZStd::string::format("%s_%s", m_outputColorAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - return m_readback->ReadPassAttachment(m_outputColorAttachment.get(), AZ::Name(readbackName)); + return m_attachmentReadback->ReadPassAttachment(m_outputColorAttachment.get(), AZ::Name(readbackName)); } return false; } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp index 8b4c9b8aab..c532a1324f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -77,17 +78,6 @@ namespace AZ params.m_viewportState = m_viewport; Base::FrameBeginInternal(params); - - // for read back output - if (m_readback) - { - m_readback->FrameBegin(params); - if (m_readback->IsFinished()) - { - // Done reading. Remove the reference - m_readback = nullptr; - } - } } void RenderToTexturePass::ResizeOutput(uint32_t width, uint32_t height) @@ -118,9 +108,10 @@ namespace AZ { if (m_outputAttachment) { - m_readback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; AZStd::string readbackName = AZStd::string::format("%s_%s", m_outputAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - m_readback->ReadPassAttachment(m_outputAttachment.get(), AZ::Name(readbackName)); + m_attachmentReadback->ReadPassAttachment(m_outputAttachment.get(), AZ::Name(readbackName)); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp index 7a3bf3a011..62649cd0b2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -134,13 +135,6 @@ namespace AZ attachmentDatabase.ImportSwapChain(m_windowContext->GetSwapChainAttachmentId(), m_windowContext->GetSwapChain()); ParentPass::FrameBeginInternal(params); - - // Read swap chain for one frame. The reference can be released afterwards - if (m_swapChainReadback) - { - m_swapChainReadback->FrameBegin(params); - m_swapChainReadback = nullptr; - } } void SwapChainPass::OnWindowResized([[maybe_unused]] uint32_t width, [[maybe_unused]] uint32_t height) @@ -152,9 +146,11 @@ namespace AZ { if (m_swapChainAttachment) { - m_swapChainReadback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; + AZStd::string readbackName = AZStd::string::format("%s_%s", m_swapChainAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - m_swapChainReadback->ReadPassAttachment(m_swapChainAttachment.get(), AZ::Name(readbackName)); + m_attachmentReadback->ReadPassAttachment(m_swapChainAttachment.get(), AZ::Name(readbackName)); } } diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h index e735852926..d907e7e7eb 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h @@ -32,11 +32,14 @@ namespace AZ void ReadbackCallback(const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult); + void DrawPassAttachments(AZ::RPI::Pass* pass); + bool m_previewAttachment = false; bool m_showAttachments = false; AZ::RPI::Pass* m_selectedPass = nullptr; AZ::RHI::AttachmentId m_attachmentId; + AZ::Name m_slotName; bool m_selectedChanged = false; AZStd::shared_ptr m_readback; diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl index cd53131933..d31674754e 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl @@ -76,6 +76,7 @@ namespace AZ::Render { m_selectedChanged = true; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; } } @@ -88,13 +89,12 @@ namespace AZ::Render m_readback->SetCallback(AZStd::bind(&ImGuiPassTree::ReadbackCallback, this, AZStd::placeholders::_1)); } - if (m_selectedPass && !m_attachmentId.IsEmpty()) + if (m_selectedPass && !m_slotName.IsEmpty()) { - AZ::RPI::RenderPass* renderPass = azrtti_cast(m_selectedPass); - if (renderPass) + bool readbackResult = m_selectedPass->ReadbackAttachment(m_readback, m_slotName); + if (!readbackResult) { - AZ::RPI::PassAttachment* attachment = FindPassAttachment(renderPass, m_attachmentId); - renderPass->ReadbackAttachment(m_readback, attachment); + AZ_Error("ImGuiPassTree", false, "Failed to readback attachment from pass [%s] slot [%s]", m_selectedPass->GetName().GetCStr(), m_slotName.GetCStr()); } } } @@ -144,6 +144,77 @@ namespace AZ::Render } ImGui::End(); } + + inline void ImGuiPassTree::DrawPassAttachments(AZ::RPI::Pass* pass) + { + for (const auto& binding : pass->GetAttachmentBindings()) + { + // Binding info: [slot type] [slot name] + AZStd::string label = AZStd::string::format("[%s] [%s]", AZ::RPI::ToString(binding.m_slotType), + binding.m_name.GetCStr()); + + // Append attachment info if the attachment exists + if (binding.m_attachment) + { + AZ::RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); + + // Append attachment info: [attachment type] attachment name + label += AZStd::string::format(" [%s] %s", + AZ::RHI::ToString(type), + binding.m_attachment->m_name.GetCStr()); + + if (type == AZ::RHI::AttachmentType::Image) + { + // Append image info: [format] [size] [msaa] + AZ::RHI::ImageDescriptor descriptor; + if (binding.m_attachment->m_importedResource) + { + AZ::RPI::Image* image = static_cast(binding.m_attachment->m_importedResource.get()); + descriptor = image->GetRHIImage()->GetDescriptor(); + } + else + { + descriptor = binding.m_attachment->m_descriptor.m_image; + } + auto format = descriptor.m_format; + auto size = descriptor.m_size; + label += AZStd::string::format(" [%s] [%dx%d]", AZ::RHI::ToString(format), size.m_width, size.m_height); + + if (descriptor.m_multisampleState.m_samples > 1) + { + if (descriptor.m_multisampleState.m_customPositionsCount > 0) + { + label += AZStd::string::format(" [MSAA_Custom_%dx]", descriptor.m_multisampleState.m_samples); + } + else + { + label += AZStd::string::format(" [MSAA_%dx]", descriptor.m_multisampleState.m_samples); + } + } + } + else if (type == AZ::RHI::AttachmentType::Buffer) + { + // Append buffer info: [size] + auto size = binding.m_attachment->m_descriptor.m_buffer.m_byteCount; + label += AZStd::string::format(" [%llu]", size); + } + + if (Scriptable_ImGui::Selectable(label.c_str(), m_attachmentId == binding.m_attachment->GetAttachmentId())) + { + m_selectedPass = pass; + m_attachmentId = binding.m_attachment->GetAttachmentId(); + m_slotName = binding.m_name; + m_selectedChanged = true; + } + } + else + { + // Only draw text (not selectable) if there is no attachment binded to the slot. + ImGui::Text(label.c_str()); + } + } + + } inline void ImGuiPassTree::DrawTreeView(AZ::RPI::Pass* pass) { @@ -164,6 +235,7 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } } @@ -179,76 +251,13 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } if (nodeOpen) { - for (const auto& binding : pass->GetAttachmentBindings()) - { - // Binding info: [slot type] [slot name] - AZStd::string label = AZStd::string::format("[%s] [%s]", AZ::RPI::ToString(binding.m_slotType), - binding.m_name.GetCStr()); - - // Append attachment info if the attachment exists - if (binding.m_attachment) - { - AZ::RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); - - // Append attachment info: [attachment type] attachment name - label += AZStd::string::format(" [%s] %s", - AZ::RHI::ToString(type), - binding.m_attachment->m_name.GetCStr()); - - if (type == AZ::RHI::AttachmentType::Image) - { - // Append image info: [format] [size] [msaa] - AZ::RHI::ImageDescriptor descriptor; - if (binding.m_attachment->m_importedResource) - { - AZ::RPI::Image* image = static_cast(binding.m_attachment->m_importedResource.get()); - descriptor = image->GetRHIImage()->GetDescriptor(); - } - else - { - descriptor = binding.m_attachment->m_descriptor.m_image; - } - auto format = descriptor.m_format; - auto size = descriptor.m_size; - label += AZStd::string::format(" [%s] [%dx%d]", AZ::RHI::ToString(format), size.m_width, size.m_height); - - if (descriptor.m_multisampleState.m_samples > 1) - { - if (descriptor.m_multisampleState.m_customPositionsCount > 0) - { - label += AZStd::string::format(" [MSAA_Custom_%dx]", descriptor.m_multisampleState.m_samples); - } - else - { - label += AZStd::string::format(" [MSAA_%dx]", descriptor.m_multisampleState.m_samples); - } - } - } - else if (type == AZ::RHI::AttachmentType::Buffer) - { - // Append buffer info: [size] - auto size = binding.m_attachment->m_descriptor.m_buffer.m_byteCount; - label += AZStd::string::format(" [%llu]", size); - } - - if (Scriptable_ImGui::Selectable(label.c_str(), m_attachmentId == binding.m_attachment->GetAttachmentId())) - { - m_selectedPass = pass; - m_attachmentId = binding.m_attachment->GetAttachmentId(); - m_selectedChanged = true; - } - } - else - { - // Only draw text (not selectable) if there is no attachment binded to the slot. - ImGui::Text(label.c_str()); - } - } + DrawPassAttachments(pass); Scriptable_ImGui::TreePop(); } @@ -266,11 +275,13 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } if (nodeOpen) { + DrawPassAttachments(pass); for (const auto& child : asParent->GetChildren()) { DrawTreeView(child.get()); @@ -354,6 +365,7 @@ namespace AZ::Render m_selectedPass = nullptr; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = false; m_readback = nullptr; m_previewPass = nullptr; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp index 46d9b59edb..3881a8c8f8 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp @@ -114,7 +114,7 @@ namespace AZ Render::FrameCaptureRequestBus::BroadcastResult( startedCapture, &Render::FrameCaptureRequestBus::Events::CapturePassAttachmentWithCallback, - m_context->GetData()->m_passHierarchy, AZStd::string("Output"), readbackCallback); + m_context->GetData()->m_passHierarchy, AZStd::string("Output"), readbackCallback, RPI::PassAttachmentReadbackOption::Output); // Reset the capture flag if the capture request was successful. Otherwise try capture it again next tick. if (startedCapture) { From ffb4a3c4323f37c70d1c89694c226fbe3dd2dc51 Mon Sep 17 00:00:00 2001 From: pereslav Date: Thu, 8 Jul 2021 17:07:51 +0100 Subject: [PATCH 56/67] Fixed crash when non-net entities get activated Signed-off-by: pereslav --- .../ServerToClientReplicationWindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp b/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp index 9892cdc7e4..082d556d85 100644 --- a/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp +++ b/Gems/Multiplayer/Code/Source/ReplicationWindows/ServerToClientReplicationWindow.cpp @@ -201,10 +201,11 @@ namespace Multiplayer void ServerToClientReplicationWindow::OnEntityActivated(AZ::Entity* entity) { - ConstNetworkEntityHandle entityHandle(entity, GetNetworkEntityTracker()); - NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent(); + NetBindComponent* netBindComponent = entity->FindComponent(); if (netBindComponent != nullptr) { + ConstNetworkEntityHandle entityHandle(netBindComponent, GetNetworkEntityTracker()); + if (netBindComponent->HasController()) { if (IFilterEntityManager* filter = GetMultiplayer()->GetFilterEntityManager()) @@ -233,10 +234,10 @@ namespace Multiplayer void ServerToClientReplicationWindow::OnEntityDeactivated(AZ::Entity* entity) { - ConstNetworkEntityHandle entityHandle(entity, GetNetworkEntityTracker()); - NetBindComponent* netBindComponent = entityHandle.GetNetBindComponent(); + NetBindComponent* netBindComponent = entity->FindComponent(); if (netBindComponent != nullptr) { + ConstNetworkEntityHandle entityHandle(netBindComponent, GetNetworkEntityTracker()); m_replicationSet.erase(entityHandle); } } From c132b00f6eda1fdcce5d530faf5bc263ea9729ac Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 8 Jul 2021 09:46:31 -0700 Subject: [PATCH 57/67] Removing some unused files from Code/Editor/Plugins (#1943) * fix path Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * remove some unused files from Code/Editor/Plugins Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Plugins/EditorCommon/EditorCommon.def | 6 -- .../Plugins/EditorCommon/res/EditorCommon.rc2 | Bin 782 -> 0 bytes Code/Editor/Plugins/QtMocRule.props | 10 --- Code/Editor/Plugins/QtMocRule.targets | 46 ----------- Code/Editor/Plugins/QtMocRule.xml | 74 ------------------ Code/Editor/Plugins/QtRccRule.props | 10 --- Code/Editor/Plugins/QtRccRule.targets | 46 ----------- Code/Editor/Plugins/QtRccRule.xml | 74 ------------------ Code/Editor/Plugins/QtUicRule.props | 10 --- Code/Editor/Plugins/QtUicRule.targets | 47 ----------- Code/Editor/Plugins/QtUicRule.xml | 74 ------------------ 11 files changed, 397 deletions(-) delete mode 100644 Code/Editor/Plugins/EditorCommon/EditorCommon.def delete mode 100644 Code/Editor/Plugins/EditorCommon/res/EditorCommon.rc2 delete mode 100644 Code/Editor/Plugins/QtMocRule.props delete mode 100644 Code/Editor/Plugins/QtMocRule.targets delete mode 100644 Code/Editor/Plugins/QtMocRule.xml delete mode 100644 Code/Editor/Plugins/QtRccRule.props delete mode 100644 Code/Editor/Plugins/QtRccRule.targets delete mode 100644 Code/Editor/Plugins/QtRccRule.xml delete mode 100644 Code/Editor/Plugins/QtUicRule.props delete mode 100644 Code/Editor/Plugins/QtUicRule.targets delete mode 100644 Code/Editor/Plugins/QtUicRule.xml diff --git a/Code/Editor/Plugins/EditorCommon/EditorCommon.def b/Code/Editor/Plugins/EditorCommon/EditorCommon.def deleted file mode 100644 index a8d10ff297..0000000000 --- a/Code/Editor/Plugins/EditorCommon/EditorCommon.def +++ /dev/null @@ -1,6 +0,0 @@ -; EditorCommon.def : Declares the module parameters for the DLL. - -LIBRARY - -EXPORTS - ; Explicit exports can go here diff --git a/Code/Editor/Plugins/EditorCommon/res/EditorCommon.rc2 b/Code/Editor/Plugins/EditorCommon/res/EditorCommon.rc2 deleted file mode 100644 index 8ffc09417a13a873c604cd8f4fc9571c11d6906d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 782 zcmd6l%L>9U5Jm6WuL!slE%*nbE<}9bYb#nKEoci>7yi6@CPYLKbSXoUd1dC_OzyWt ziE6AwPJQi^>#S0hy6i`!RH2q;*ljYJtV&)d{1>z|=uRW;;M1hiR_7ccBhV}nroq@dKze=HT#%;6Aj_e3;CW( zhNmL`tSn%0+|H@&@fkJ;w|5L1ZDV{(|KE8TLQgegU - - - - %(RootDir)%(Directory)%(FileName).moc - $(QTDIR)\bin\moc.exe [AllOptions] [Inputs] - Moc'ing %(Filename)%(Extension)... - - - diff --git a/Code/Editor/Plugins/QtMocRule.targets b/Code/Editor/Plugins/QtMocRule.targets deleted file mode 100644 index fdcb95e6a3..0000000000 --- a/Code/Editor/Plugins/QtMocRule.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - _QtMOC - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(QtMOC, '|') - - - - - - - diff --git a/Code/Editor/Plugins/QtMocRule.xml b/Code/Editor/Plugins/QtMocRule.xml deleted file mode 100644 index 21850b34ab..0000000000 --- a/Code/Editor/Plugins/QtMocRule.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - diff --git a/Code/Editor/Plugins/QtRccRule.props b/Code/Editor/Plugins/QtRccRule.props deleted file mode 100644 index 9c06b5c082..0000000000 --- a/Code/Editor/Plugins/QtRccRule.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - %(RootDir)%(Directory)rcc_%(FileName).h - $(QTDIR)\bin\rcc.exe [AllOptions] [Inputs] - Rcc'ing %(Filename)%(Extension)... - - - diff --git a/Code/Editor/Plugins/QtRccRule.targets b/Code/Editor/Plugins/QtRccRule.targets deleted file mode 100644 index bd4e7ae90e..0000000000 --- a/Code/Editor/Plugins/QtRccRule.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - _QtRCC - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(QtRCC, '|') - - - - - - - diff --git a/Code/Editor/Plugins/QtRccRule.xml b/Code/Editor/Plugins/QtRccRule.xml deleted file mode 100644 index ce7b98c323..0000000000 --- a/Code/Editor/Plugins/QtRccRule.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - diff --git a/Code/Editor/Plugins/QtUicRule.props b/Code/Editor/Plugins/QtUicRule.props deleted file mode 100644 index ce08b40be7..0000000000 --- a/Code/Editor/Plugins/QtUicRule.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - %(RootDir)%(Directory)ui_%(FileName).h - $(QTDIR)\bin\uic.exe [AllOptions] [Inputs] - Uic'ing %(Filename)%(Extension)... - - - diff --git a/Code/Editor/Plugins/QtUicRule.targets b/Code/Editor/Plugins/QtUicRule.targets deleted file mode 100644 index a5ada15f79..0000000000 --- a/Code/Editor/Plugins/QtUicRule.targets +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - _QtUIC - - - - $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml - - - - - - - - @(QtUIC, '|') - - - - - - - - diff --git a/Code/Editor/Plugins/QtUicRule.xml b/Code/Editor/Plugins/QtUicRule.xml deleted file mode 100644 index ec7ce4b214..0000000000 --- a/Code/Editor/Plugins/QtUicRule.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - General - - - - - Command Line - - - - - - - - - - - - - - Additional Options - - - Additional Options - - - - - - From cb069d68f084513261eee819de772842e9dbe632 Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Thu, 8 Jul 2021 11:54:51 -0500 Subject: [PATCH 58/67] Removed min/max settings that were just using the float min/max since these are the default. Signed-off-by: Chris Galvan --- .../Code/EMotionFX/Source/BlendTreeTransformNode.cpp | 8 -------- .../Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp | 2 -- 2 files changed, 10 deletions(-) diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp index cfbff381eb..f67bf831f9 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeTransformNode.cpp @@ -261,11 +261,7 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::ChangeNotify, &BlendTreeTransformNode::Reinit) ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minTranslation, "Min Translation", "The minimum translation value, used when the input translation amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxTranslation, "Max Translation", "The maximum translation value, used when the input translation amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minRotation, "Min Rotation", "The minimum rotation value, in degrees, used when the input rotation amount equals zero.") ->Attribute(AZ::Edit::Attributes::Min, -360.0f) ->Attribute(AZ::Edit::Attributes::Max, 360.0f) @@ -273,11 +269,7 @@ namespace EMotionFX ->Attribute(AZ::Edit::Attributes::Min, -360.0f) ->Attribute(AZ::Edit::Attributes::Max, 360.0f) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_minScale, "Min Scale", "The minimum scale value, used when the input scale amount equals zero.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeTransformNode::m_maxScale, "Max Scale", "The maximum scale value, used when the input scale amount equals one.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ; } } // namespace EMotionFX diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp index acd9321ede..356fa78b59 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/BlendTreeVector3Math2Node.cpp @@ -254,8 +254,6 @@ namespace EMotionFX ->EnumAttribute(MATHFUNCTION_DIVIDE, "Divide") ->EnumAttribute(MATHFUNCTION_ANGLEDEGREES, "AngleDegrees") ->DataElement(AZ::Edit::UIHandlers::Default, &BlendTreeVector3Math2Node::m_defaultValue, "Default Value", "The default value for x or y when one of them has no incomming connection.") - ->Attribute(AZ::Edit::Attributes::Min, -std::numeric_limits::max()) - ->Attribute(AZ::Edit::Attributes::Max, std::numeric_limits::max()) ; } } // namespace EMotionFX From d075d5f7b5043c54b1389b39533e2a415923845c Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 8 Jul 2021 11:29:55 -0700 Subject: [PATCH 59/67] fix AzGenericTypeInfo template handling with clang 12+ (#833) (#1947) Co-authored-by: Tom spot Callaway Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Co-authored-by: Tom "spot" Callaway <72474383+spotaws@users.noreply.github.com> Co-authored-by: Tom spot Callaway --- Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h | 21 ++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h b/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h index 4bb4bac2d3..27a3e9d2cf 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h +++ b/Code/Framework/AzCore/AzCore/RTTI/TypeInfo.h @@ -145,8 +145,13 @@ namespace AZ // also needs to be an overload for every version because they all represent overloads for different non-types. namespace AzGenericTypeInfo { - template - constexpr bool false_v = false; + /// Needs to match declared parameter type. + template