Merge pull request #6911 from aws-lumberyard-dev/carlitosan-sc-bug-bash-4
Make SC User data slots proper, immutable variable references
This commit is contained in:
+2
-2
@@ -97,7 +97,7 @@ namespace GraphCanvas
|
||||
// Only want to try to convert to references when we have no connections
|
||||
if (!hasConnections)
|
||||
{
|
||||
DataSlotRequestBus::EventResult(acceptConnection, sourceEndpoint.GetSlotId(), &DataSlotRequests::CanConvertToReference);
|
||||
DataSlotRequestBus::EventResult(acceptConnection, sourceEndpoint.GetSlotId(), &DataSlotRequests::CanConvertToReference, false);
|
||||
}
|
||||
}
|
||||
else if (targetType == DataSlotType::Value)
|
||||
@@ -115,7 +115,7 @@ namespace GraphCanvas
|
||||
// Only want to try to convert to references when we have no connections
|
||||
if (!hasConnections)
|
||||
{
|
||||
DataSlotRequestBus::EventResult(acceptConnection, targetEndpoint.GetSlotId(), &DataSlotRequests::CanConvertToReference);
|
||||
DataSlotRequestBus::EventResult(acceptConnection, targetEndpoint.GetSlotId(), &DataSlotRequests::CanConvertToReference, false);
|
||||
}
|
||||
}
|
||||
else if (sourceType == DataSlotType::Value)
|
||||
|
||||
+2
-2
@@ -92,7 +92,7 @@ namespace GraphCanvas
|
||||
}
|
||||
else if (sourceSlotType == DataSlotType::Reference)
|
||||
{
|
||||
DataSlotRequestBus::EventResult(converted, GetTargetSlotId(), &DataSlotRequests::ConvertToReference);
|
||||
DataSlotRequestBus::EventResult(converted, GetTargetSlotId(), &DataSlotRequests::ConvertToReference, false);
|
||||
}
|
||||
}
|
||||
else if (m_dragContext == DragContext::MoveSource)
|
||||
@@ -103,7 +103,7 @@ namespace GraphCanvas
|
||||
}
|
||||
else if (targetSlotType == DataSlotType::Reference)
|
||||
{
|
||||
DataSlotRequestBus::EventResult(converted, GetSourceSlotId(), &DataSlotRequests::ConvertToReference);
|
||||
DataSlotRequestBus::EventResult(converted, GetSourceSlotId(), &DataSlotRequests::ConvertToReference, false);
|
||||
}
|
||||
}
|
||||
else if (m_dragContext == DragContext::TryConnection)
|
||||
|
||||
@@ -294,9 +294,9 @@ namespace GraphCanvas
|
||||
}
|
||||
}
|
||||
|
||||
bool DataSlotComponent::ConvertToReference()
|
||||
bool DataSlotComponent::ConvertToReference(bool isNewSlot)
|
||||
{
|
||||
if (CanConvertToReference())
|
||||
if (CanConvertToReference(isNewSlot))
|
||||
{
|
||||
AZ::EntityId nodeId = GetNode();
|
||||
GraphId graphId;
|
||||
@@ -307,7 +307,7 @@ namespace GraphCanvas
|
||||
ScopedGraphUndoBlocker undoBlocker(graphId);
|
||||
|
||||
bool convertedToReference = false;
|
||||
GraphModelRequestBus::EventResult(convertedToReference, graphId, &GraphModelRequests::ConvertSlotToReference, Endpoint(nodeId, GetEntityId()));
|
||||
GraphModelRequestBus::EventResult(convertedToReference, graphId, &GraphModelRequests::ConvertSlotToReference, Endpoint(nodeId, GetEntityId()), isNewSlot);
|
||||
|
||||
if (convertedToReference)
|
||||
{
|
||||
@@ -326,7 +326,7 @@ namespace GraphCanvas
|
||||
return m_dataSlotType == DataSlotType::Reference;
|
||||
}
|
||||
|
||||
bool DataSlotComponent::CanConvertToReference() const
|
||||
bool DataSlotComponent::CanConvertToReference([[maybe_unused]] bool isNewSlot) const
|
||||
{
|
||||
bool canToggleReference = false;
|
||||
|
||||
@@ -336,7 +336,7 @@ namespace GraphCanvas
|
||||
GraphId graphId;
|
||||
|
||||
SceneMemberRequestBus::EventResult(graphId, nodeId, &SceneMemberRequests::GetScene);
|
||||
GraphModelRequestBus::EventResult(canToggleReference, graphId, &GraphModelRequests::CanConvertSlotToReference, Endpoint(nodeId, GetEntityId()));
|
||||
GraphModelRequestBus::EventResult(canToggleReference, graphId, &GraphModelRequests::CanConvertSlotToReference, Endpoint(nodeId, GetEntityId()), isNewSlot);
|
||||
}
|
||||
|
||||
return canToggleReference;
|
||||
|
||||
@@ -47,8 +47,8 @@ namespace GraphCanvas
|
||||
////
|
||||
|
||||
// DataSlotRequestBus
|
||||
bool ConvertToReference() override;
|
||||
bool CanConvertToReference() const override;
|
||||
bool ConvertToReference(bool isNewSlot = false) override;
|
||||
bool CanConvertToReference(bool isNewSlot = false) const override;
|
||||
|
||||
bool ConvertToValue() override;
|
||||
bool CanConvertToValue() const override;
|
||||
|
||||
@@ -70,8 +70,8 @@ namespace GraphCanvas
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
|
||||
using BusIdType = AZ::EntityId;
|
||||
|
||||
virtual bool ConvertToReference() = 0;
|
||||
virtual bool CanConvertToReference() const = 0;
|
||||
virtual bool ConvertToReference(bool isNewSlot = false) = 0;
|
||||
virtual bool CanConvertToReference(bool isNewSlot = false) const = 0;
|
||||
|
||||
virtual bool ConvertToValue() = 0;
|
||||
virtual bool CanConvertToValue() const = 0;
|
||||
|
||||
@@ -125,12 +125,12 @@ namespace GraphCanvas
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool ConvertSlotToReference([[maybe_unused]] const Endpoint& endpoint)
|
||||
virtual bool ConvertSlotToReference([[maybe_unused]] const Endpoint& endpoint, [[maybe_unused]] bool isNewSlot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool CanConvertSlotToReference([[maybe_unused]] const Endpoint& endpoint)
|
||||
virtual bool CanConvertSlotToReference([[maybe_unused]] const Endpoint& endpoint, [[maybe_unused]] bool isNewSlot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -145,12 +145,13 @@ namespace GraphCanvas
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool CanPromoteToVariable([[maybe_unused]] const Endpoint& endpoint) const
|
||||
virtual bool CanPromoteToVariable([[maybe_unused]] const Endpoint& endpoint, [[maybe_unused]] bool isNewSlot = false) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool PromoteToVariableAction([[maybe_unused]] const Endpoint& endpoint)
|
||||
virtual bool PromoteToVariableAction([[maybe_unused]] const Endpoint& endpoint
|
||||
, [[maybe_unused]] bool isNewSlot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+5
-5
@@ -258,7 +258,7 @@ namespace GraphCanvas
|
||||
if (DataSlotUtils::IsValueDataSlotType(dataSlotType))
|
||||
{
|
||||
setText("Convert to Reference");
|
||||
DataSlotRequestBus::EventResult(canToggleState, targetId, &DataSlotRequests::CanConvertToReference);
|
||||
DataSlotRequestBus::EventResult(canToggleState, targetId, &DataSlotRequests::CanConvertToReference, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -291,7 +291,7 @@ namespace GraphCanvas
|
||||
|
||||
if (DataSlotUtils::IsValueDataSlotType(dataSlotType))
|
||||
{
|
||||
DataSlotRequestBus::EventResult(toggledState, targetId, &DataSlotRequests::ConvertToReference);
|
||||
DataSlotRequestBus::EventResult(toggledState, targetId, &DataSlotRequests::ConvertToReference, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -345,14 +345,14 @@ namespace GraphCanvas
|
||||
|
||||
if (DataSlotUtils::IsValueDataSlotType(dataSlotType))
|
||||
{
|
||||
DataSlotRequestBus::EventResult(enableAction, targetId, &DataSlotRequests::CanConvertToReference);
|
||||
DataSlotRequestBus::EventResult(enableAction, targetId, &DataSlotRequests::CanConvertToReference, false);
|
||||
|
||||
if (enableAction)
|
||||
{
|
||||
Endpoint endpoint;
|
||||
SlotRequestBus::EventResult(endpoint, targetId, &SlotRequests::GetEndpoint);
|
||||
|
||||
GraphModelRequestBus::EventResult(enableAction, graphId, &GraphModelRequests::CanPromoteToVariable, endpoint);
|
||||
GraphModelRequestBus::EventResult(enableAction, graphId, &GraphModelRequests::CanPromoteToVariable, endpoint, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -371,7 +371,7 @@ namespace GraphCanvas
|
||||
SlotRequestBus::EventResult(endpoint, targetId, &SlotRequests::GetEndpoint);
|
||||
|
||||
bool promotedElement = false;
|
||||
GraphModelRequestBus::EventResult(promotedElement, graphId, &GraphModelRequests::PromoteToVariableAction, endpoint);
|
||||
GraphModelRequestBus::EventResult(promotedElement, graphId, &GraphModelRequests::PromoteToVariableAction, endpoint, false);
|
||||
|
||||
if (promotedElement)
|
||||
{
|
||||
|
||||
@@ -94,12 +94,12 @@ namespace MockGraphCanvasServices
|
||||
GraphCanvas::DataSlotRequestBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
bool MockDataSlotComponent::ConvertToReference()
|
||||
bool MockDataSlotComponent::ConvertToReference([[maybe_unused]] bool isNewSlot)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MockDataSlotComponent::CanConvertToReference() const
|
||||
bool MockDataSlotComponent::CanConvertToReference([[maybe_unused]] bool isNewSlot) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@ namespace MockGraphCanvasServices
|
||||
void Deactivate() override;
|
||||
|
||||
// GraphCanvas::DataSlotRequestBus overrides ...
|
||||
bool ConvertToReference() override;
|
||||
bool CanConvertToReference() const override;
|
||||
bool ConvertToReference(bool isNewSlot = false) override;
|
||||
bool CanConvertToReference(bool isNewSlot = false) const override;
|
||||
bool ConvertToValue() override;
|
||||
bool CanConvertToValue() const override;
|
||||
bool IsUserSlot() const override;
|
||||
|
||||
@@ -667,13 +667,12 @@ namespace ScriptCanvasEditor
|
||||
}
|
||||
|
||||
// Now that the slot has a valid type/name, we can actually promote it to a variable
|
||||
if (PromoteToVariableAction(endpoint) /*&& slot->IsVariableReference()*/)
|
||||
if (PromoteToVariableAction(endpoint, true))
|
||||
{
|
||||
ScriptCanvas::GraphVariable* variable = slot->GetVariable();
|
||||
|
||||
if (variable)
|
||||
{
|
||||
// functions 2.0 set variable scope to function
|
||||
if (variable->GetScope() != ScriptCanvas::VariableFlags::Scope::Function)
|
||||
{
|
||||
variable->SetScope(ScriptCanvas::VariableFlags::Scope::Function);
|
||||
@@ -1141,7 +1140,7 @@ namespace ScriptCanvasEditor
|
||||
{
|
||||
if (slot->IsVariableReference())
|
||||
{
|
||||
return true;
|
||||
return !slot->IsUserAdded();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1253,7 +1252,7 @@ namespace ScriptCanvasEditor
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (slot->IsVariableReference())
|
||||
if (slot->IsVariableReference() && !slot->IsUserAdded())
|
||||
{
|
||||
ScriptCanvasVariableReferenceDataInterface* dataInterface = aznew ScriptCanvasVariableReferenceDataInterface(&m_variableDataModel, GetScriptCanvasId(), scriptCanvasNodeId, scriptCanvasSlotId);
|
||||
GraphCanvas::NodePropertyDisplay* dataDisplay = nullptr;
|
||||
@@ -2081,20 +2080,20 @@ namespace ScriptCanvasEditor
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Graph::ConvertSlotToReference(const GraphCanvas::Endpoint& endpoint)
|
||||
bool Graph::ConvertSlotToReference(const GraphCanvas::Endpoint& endpoint, bool isNewSlot)
|
||||
{
|
||||
ScriptCanvas::Endpoint scEndpoint = ConvertToScriptCanvasEndpoint(endpoint);
|
||||
ScriptCanvas::Node* canvasNode = FindNode(scEndpoint.GetNodeId());
|
||||
|
||||
if (canvasNode)
|
||||
{
|
||||
return canvasNode->ConvertSlotToReference(scEndpoint.GetSlotId());
|
||||
return canvasNode->ConvertSlotToReference(scEndpoint.GetSlotId(), isNewSlot);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Graph::CanConvertSlotToReference(const GraphCanvas::Endpoint& endpoint)
|
||||
bool Graph::CanConvertSlotToReference(const GraphCanvas::Endpoint& endpoint, bool isNewSlot)
|
||||
{
|
||||
ScriptCanvas::Endpoint scEndpoint = ConvertToScriptCanvasEndpoint(endpoint);
|
||||
ScriptCanvas::Node* canvasNode = FindNode(scEndpoint.GetNodeId());
|
||||
@@ -2104,7 +2103,7 @@ namespace ScriptCanvasEditor
|
||||
ScriptCanvas::Slot* slot = canvasNode->GetSlot(scEndpoint.GetSlotId());
|
||||
if (slot)
|
||||
{
|
||||
return slot->CanConvertToReference();
|
||||
return slot->CanConvertToReference(isNewSlot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2170,7 +2169,7 @@ namespace ScriptCanvasEditor
|
||||
return handledEvent;
|
||||
}
|
||||
|
||||
bool Graph::CanPromoteToVariable(const GraphCanvas::Endpoint& endpoint) const
|
||||
bool Graph::CanPromoteToVariable(const GraphCanvas::Endpoint& endpoint, [[maybe_unused]] bool isNewSlot) const
|
||||
{
|
||||
ScriptCanvas::Endpoint scriptCanvasEndpoint = ConvertToScriptCanvasEndpoint(endpoint);
|
||||
auto activeSlot = FindSlot(scriptCanvasEndpoint);
|
||||
@@ -2189,7 +2188,7 @@ namespace ScriptCanvasEditor
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Graph::PromoteToVariableAction(const GraphCanvas::Endpoint& endpoint)
|
||||
bool Graph::PromoteToVariableAction(const GraphCanvas::Endpoint& endpoint, bool isNewSlot)
|
||||
{
|
||||
ScriptCanvas::Endpoint scriptCanvasEndpoint = ConvertToScriptCanvasEndpoint(endpoint);
|
||||
|
||||
@@ -2282,12 +2281,11 @@ namespace ScriptCanvasEditor
|
||||
|
||||
AZ::Outcome<ScriptCanvas::VariableId, AZStd::string> addOutcome;
|
||||
|
||||
// #functions2 slot<->variable re-use the activeDatum, send the pointer (actually, all of the source slot information, and make a special conversion)
|
||||
ScriptCanvas::GraphVariableManagerRequestBus::EventResult(addOutcome, GetScriptCanvasId(), &ScriptCanvas::GraphVariableManagerRequests::AddVariable, variableName, variableDatum, true);
|
||||
|
||||
if (addOutcome.IsSuccess())
|
||||
{
|
||||
GraphCanvas::DataSlotRequestBus::Event(endpoint.GetSlotId(), &GraphCanvas::DataSlotRequests::ConvertToReference);
|
||||
GraphCanvas::DataSlotRequestBus::Event(endpoint.GetSlotId(), &GraphCanvas::DataSlotRequests::ConvertToReference, isNewSlot);
|
||||
|
||||
activeSlot->SetVariableReference(addOutcome.GetValue());
|
||||
|
||||
@@ -2319,7 +2317,7 @@ namespace ScriptCanvasEditor
|
||||
{
|
||||
if (!targetSlot->IsVariableReference())
|
||||
{
|
||||
GraphCanvas::DataSlotRequestBus::Event(referenceTarget.GetSlotId(), &GraphCanvas::DataSlotRequests::ConvertToReference);
|
||||
GraphCanvas::DataSlotRequestBus::Event(referenceTarget.GetSlotId(), &GraphCanvas::DataSlotRequests::ConvertToReference, false);
|
||||
}
|
||||
|
||||
if (targetSlot->IsVariableReference())
|
||||
@@ -2884,7 +2882,7 @@ namespace ScriptCanvasEditor
|
||||
|
||||
for (auto graphCanvasEndpoint : referencableEndpoints)
|
||||
{
|
||||
GraphCanvas::DataSlotRequestBus::Event(graphCanvasEndpoint.GetSlotId(), &GraphCanvas::DataSlotRequests::ConvertToReference);
|
||||
GraphCanvas::DataSlotRequestBus::Event(graphCanvasEndpoint.GetSlotId(), &GraphCanvas::DataSlotRequests::ConvertToReference, false);
|
||||
|
||||
ScriptCanvas::Endpoint scriptCanvasEndpoint = ConvertToScriptCanvasEndpoint(graphCanvasEndpoint);
|
||||
|
||||
|
||||
@@ -175,12 +175,12 @@ namespace ScriptCanvasEditor
|
||||
void RemoveSlot(const GraphCanvas::Endpoint& endpoint) override;
|
||||
bool IsSlotRemovable(const GraphCanvas::Endpoint& endpoint) const override;
|
||||
|
||||
bool ConvertSlotToReference(const GraphCanvas::Endpoint& endpoint) override;
|
||||
bool CanConvertSlotToReference(const GraphCanvas::Endpoint& endpoint) override;
|
||||
bool ConvertSlotToReference(const GraphCanvas::Endpoint& endpoint, bool isNewSlot = false) override;
|
||||
bool CanConvertSlotToReference(const GraphCanvas::Endpoint& endpoint, bool isNewSlot = false) override;
|
||||
GraphCanvas::CanHandleMimeEventOutcome CanHandleReferenceMimeEvent(const GraphCanvas::Endpoint& endpoint, const QMimeData* mimeData) override;
|
||||
bool HandleReferenceMimeEvent(const GraphCanvas::Endpoint& endpoint, const QMimeData* mimeData) override;
|
||||
bool CanPromoteToVariable(const GraphCanvas::Endpoint& endpoint) const override;
|
||||
bool PromoteToVariableAction(const GraphCanvas::Endpoint& endpoint) override;
|
||||
bool CanPromoteToVariable(const GraphCanvas::Endpoint& endpoint, bool isNewSlot = false) const override;
|
||||
bool PromoteToVariableAction(const GraphCanvas::Endpoint& endpoint, bool isNewSlot = false) override;
|
||||
bool SynchronizeReferences(const GraphCanvas::Endpoint& sourceEndpoint, const GraphCanvas::Endpoint& targetEndpoint) override;
|
||||
|
||||
bool ConvertSlotToValue(const GraphCanvas::Endpoint& endpoint) override;
|
||||
|
||||
@@ -3873,7 +3873,13 @@ namespace ScriptCanvasEditor
|
||||
contextMenu.AddMenuAction(aznew ConvertReferenceToVariableNodeAction(&contextMenu));
|
||||
contextMenu.AddMenuAction(aznew ExposeSlotMenuAction(&contextMenu));
|
||||
contextMenu.AddMenuAction(aznew CreateAzEventHandlerSlotMenuAction(&contextMenu));
|
||||
contextMenu.AddMenuAction(aznew SetDataSlotTypeMenuAction(&contextMenu));
|
||||
|
||||
auto setSlotTypeAction = aznew SetDataSlotTypeMenuAction(&contextMenu);
|
||||
// Changing slot type is disabled temporarily because now that that user data slots are correctly coordinated with their reference
|
||||
// variables, their type cannot be changed. The next change will allow all variables to change their type post creation, and then
|
||||
// that will allow this action to be enabled.
|
||||
setSlotTypeAction->setEnabled(false);
|
||||
contextMenu.AddMenuAction(setSlotTypeAction);
|
||||
|
||||
return HandleContextMenu(contextMenu, slotId, screenPoint, scenePoint);
|
||||
}
|
||||
|
||||
@@ -516,7 +516,7 @@ namespace ScriptCanvasEditor
|
||||
GraphCanvas::SlotRequestBus::EventResult(endpoint, slotId2, &GraphCanvas::SlotRequests::GetEndpoint);
|
||||
|
||||
bool promotedElement = false;
|
||||
GraphCanvas::GraphModelRequestBus::EventResult(promotedElement, graphId2, &GraphCanvas::GraphModelRequests::PromoteToVariableAction, endpoint);
|
||||
GraphCanvas::GraphModelRequestBus::EventResult(promotedElement, graphId2, &GraphCanvas::GraphModelRequests::PromoteToVariableAction, endpoint, false);
|
||||
|
||||
if (promotedElement)
|
||||
{
|
||||
|
||||
@@ -100,12 +100,18 @@ namespace ScriptCanvas
|
||||
{
|
||||
RuntimeAsset* runtimeAsset = asset.GetAs<RuntimeAsset>();
|
||||
AZ_Assert(runtimeAsset, "This should be a Script Canvas runtime asset, as this is the only type we process!");
|
||||
|
||||
if (runtimeAsset && m_serializeContext)
|
||||
{
|
||||
stream->Seek(0U, AZ::IO::GenericStream::ST_SEEK_BEGIN);
|
||||
bool loadSuccess = AZ::Utils::LoadObjectFromStreamInPlace(*stream, runtimeAsset->m_runtimeData, m_serializeContext, AZ::ObjectStream::FilterDescriptor(assetLoadFilterCB));
|
||||
const bool loadSuccess = AZ::Utils::LoadObjectFromStreamInPlace(*stream, runtimeAsset->m_runtimeData
|
||||
, m_serializeContext, AZ::ObjectStream::FilterDescriptor(assetLoadFilterCB));
|
||||
AZ_Error("ScriptCanvas", loadSuccess, "ScriptCanvas failed to load runtime asset: %s - %s"
|
||||
, asset.GetHint().c_str(), asset.GetId().ToString<AZStd::string>().c_str());
|
||||
|
||||
return loadSuccess ? AZ::Data::AssetHandler::LoadResult::LoadComplete : AZ::Data::AssetHandler::LoadResult::Error;
|
||||
}
|
||||
|
||||
return AZ::Data::AssetHandler::LoadResult::Error;
|
||||
}
|
||||
|
||||
|
||||
@@ -2577,11 +2577,11 @@ namespace ScriptCanvas
|
||||
}
|
||||
}
|
||||
|
||||
bool Node::ConvertSlotToReference(const SlotId& slotId)
|
||||
bool Node::ConvertSlotToReference(const SlotId& slotId, bool isNewSlot)
|
||||
{
|
||||
Slot* slot = GetSlot(slotId);
|
||||
|
||||
if (slot && slot->ConvertToReference())
|
||||
if (slot && slot->ConvertToReference(isNewSlot))
|
||||
{
|
||||
InitializeVariableReference((*slot), {});
|
||||
return true;
|
||||
|
||||
@@ -498,7 +498,7 @@ namespace ScriptCanvas
|
||||
void SanityCheckDynamicDisplay();
|
||||
void SanityCheckDynamicDisplay(ExploredDynamicGroupCache& exploredGroupCache);
|
||||
|
||||
bool ConvertSlotToReference(const SlotId& slotId);
|
||||
bool ConvertSlotToReference(const SlotId& slotId, bool isNewSlot = false);
|
||||
bool ConvertSlotToValue(const SlotId& slotId);
|
||||
|
||||
NamedEndpoint CreateNamedEndpoint(SlotId slotId) const;
|
||||
|
||||
@@ -460,14 +460,14 @@ namespace ScriptCanvas
|
||||
&& GetDataType() != Data::Type::BehaviorContextObject(GraphScopedVariableId::TYPEINFO_Uuid());
|
||||
}
|
||||
|
||||
bool Slot::CanConvertToReference() const
|
||||
{
|
||||
return !m_isUserAdded && CanConvertTypes() && !m_isVariableReference && !m_node->HasConnectedNodes((*this));
|
||||
bool Slot::CanConvertToReference(bool isNewSlot) const
|
||||
{
|
||||
return (!m_isUserAdded || isNewSlot) && CanConvertTypes() && !m_isVariableReference && !m_node->HasConnectedNodes((*this));
|
||||
}
|
||||
|
||||
bool Slot::ConvertToReference()
|
||||
bool Slot::ConvertToReference(bool isNewSlot)
|
||||
{
|
||||
if (CanConvertToReference())
|
||||
if (CanConvertToReference(isNewSlot))
|
||||
{
|
||||
m_isVariableReference = true;
|
||||
|
||||
|
||||
@@ -147,8 +147,8 @@ namespace ScriptCanvas
|
||||
bool CanConvertToValue() const;
|
||||
bool ConvertToValue();
|
||||
|
||||
bool CanConvertToReference() const;
|
||||
bool ConvertToReference();
|
||||
bool CanConvertToReference(bool isNewSlot = false) const;
|
||||
bool ConvertToReference(bool isNewSlot = false);
|
||||
void SetVariableReference(const VariableId& variableId);
|
||||
const VariableId& GetVariableReference() const;
|
||||
GraphVariable* GetVariable() const;
|
||||
|
||||
@@ -240,7 +240,6 @@ namespace ScriptCanvas
|
||||
// #functions2 slot<->variable consider getting all variables from the UX variable manager, or from the ACM and looking them up in the variable manager for ordering
|
||||
m_sourceVariableByDatum.insert(AZStd::make_pair(datum, &variablePair.second));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (auto& sourceVariable : sortedVariables)
|
||||
@@ -1714,6 +1713,7 @@ namespace ScriptCanvas
|
||||
auto iter = m_inputVariableByNodelingInSlot.find(input);
|
||||
if (iter != m_inputVariableByNodelingInSlot.end())
|
||||
{
|
||||
// #sc_user_slot_variable_ux don't add variable name if not necessary
|
||||
VariablePtr variable = iter->second;
|
||||
const Slot* slot = iter->first;
|
||||
variable->m_name = call->ModScope()->AddVariableName(slot->GetName());
|
||||
@@ -4644,35 +4644,59 @@ namespace ScriptCanvas
|
||||
|
||||
void AbstractCodeModel::ParseNodelingVariables(const Node& node, NodelingType nodelingType)
|
||||
{
|
||||
// #functions2 slot<->variable adjust once datums are more coordinated
|
||||
auto createVariablesSlots = [&](AZStd::unordered_map<const Slot*, VariablePtr>& variablesBySlots, const AZStd::vector<const Slot*>& slots, bool slotHasDatum)
|
||||
// This function accounts for all the ways users have been able to introduce input/output data in their SC function definitions.
|
||||
// They have been able to create slots, variables, or both. This function reads the datums to create the correct ACM
|
||||
// variable per required SC user variable. It uses slots as the key, and checks datums in the SC variable list for possible
|
||||
// matches.
|
||||
auto createVariablesSlots = [&](AZStd::unordered_map<const Slot*, VariablePtr>& variablesBySlots, const AZStd::vector<const Slot*>& slots, bool errorOnMissingDatum)
|
||||
{
|
||||
for (const auto& slot : slots)
|
||||
{
|
||||
auto variable = AZStd::make_shared<Variable>();
|
||||
auto variableDatum = slot->FindDatum();
|
||||
bool initializeDatum = true;
|
||||
|
||||
if (slotHasDatum)
|
||||
if (variableDatum)
|
||||
{
|
||||
auto variableDatum = slot->FindDatum();
|
||||
if (!variableDatum)
|
||||
{
|
||||
AddError(nullptr, aznew Internal::ParseError(node.GetEntityId(), AZStd::string::format("Datum missing from Slot %s on Node %s", slot->GetName().data(), node.GetNodeName().c_str())));
|
||||
return;
|
||||
}
|
||||
initializeDatum = false;
|
||||
}
|
||||
else if (errorOnMissingDatum)
|
||||
{
|
||||
AddError(nullptr, aznew Internal::ParseError(node.GetEntityId(), AZStd::string::format("Datum missing from Slot %s on Node %s", slot->GetName().data(), node.GetNodeName().c_str())));
|
||||
return;
|
||||
}
|
||||
|
||||
// #functions2 slot<->variable consider getting all variables from the UX variable manager, or from the ACM and looking them up in the variable manager for ordering
|
||||
// auto iter = m_sourceVariableByDatum.find(variableDatum);
|
||||
// if (iter == m_sourceVariableByDatum.end())
|
||||
// {
|
||||
// AddError(nullptr, aznew Internal::ParseError(node.GetEntityId(), AZStd::string::format("Datum missing from Slot %s on Node %s", slot->GetName().data(), node.GetNodeName().c_str())));
|
||||
// return;
|
||||
// }
|
||||
// variable->m_sourceVariableId = iter->second->GetVariableId();
|
||||
// find the other variable
|
||||
auto iter = m_sourceVariableByDatum.find(variableDatum);
|
||||
if (iter != m_sourceVariableByDatum.end())
|
||||
{
|
||||
initializeDatum = false;
|
||||
}
|
||||
else if (!variableDatum && errorOnMissingDatum)
|
||||
{
|
||||
AddError(nullptr, aznew Internal::ParseError(node.GetEntityId(), AZStd::string::format("Datum missing from Slot %s on Node %s", slot->GetName().data(), node.GetNodeName().c_str())));
|
||||
return;
|
||||
}
|
||||
|
||||
VariablePtr premadeVariable = iter != m_sourceVariableByDatum.end()
|
||||
? AZStd::const_pointer_cast<Variable>(FindVariable(iter->second->GetVariableId()))
|
||||
: VariablePtr();
|
||||
|
||||
if (premadeVariable)
|
||||
{
|
||||
initializeDatum = false;
|
||||
variable = premadeVariable;
|
||||
}
|
||||
|
||||
variable->m_sourceSlotId = slot->GetId();
|
||||
|
||||
if (!premadeVariable && variableDatum)
|
||||
{
|
||||
variable->m_datum = *variableDatum;
|
||||
}
|
||||
else
|
||||
|
||||
if (initializeDatum)
|
||||
{
|
||||
// make a new datum and a source slot id and all that
|
||||
variable->m_datum.SetType(slot->GetDataType());
|
||||
}
|
||||
|
||||
@@ -4680,7 +4704,11 @@ namespace ScriptCanvas
|
||||
variable->m_sourceSlotId = slot->GetId();
|
||||
variable->m_isFromFunctionDefinitionSlot = true;
|
||||
variablesBySlots.insert({ slot, variable });
|
||||
m_variables.push_back(variable);
|
||||
|
||||
if (!premadeVariable)
|
||||
{
|
||||
m_variables.push_back(variable);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -220,7 +220,6 @@ namespace ScriptCanvas
|
||||
return AZ::Success(newId);
|
||||
}
|
||||
|
||||
// #functions2 slot<->variable add this to the graph, using the old datum
|
||||
AZ::Outcome<VariableId, AZStd::string> GraphVariableManagerComponent::AddVariable(AZStd::string_view name, const Datum& value, bool functionScope)
|
||||
{
|
||||
if (FindVariable(name))
|
||||
|
||||
+2
-2
@@ -295,11 +295,11 @@ namespace ScriptCanvasDeveloperEditor
|
||||
GraphCanvas::Endpoint endpoint = ConvertToGraphCanvasEndpoint(slot->GetEndpoint());
|
||||
|
||||
bool canConvertToReference = false;
|
||||
GraphCanvas::DataSlotRequestBus::EventResult(canConvertToReference, endpoint.GetSlotId(), &GraphCanvas::DataSlotRequests::CanConvertToReference);
|
||||
GraphCanvas::DataSlotRequestBus::EventResult(canConvertToReference, endpoint.GetSlotId(), &GraphCanvas::DataSlotRequests::CanConvertToReference, false);
|
||||
|
||||
if (canConvertToReference)
|
||||
{
|
||||
GraphCanvas::DataSlotRequestBus::Event(endpoint.GetSlotId(), &GraphCanvas::DataSlotRequests::ConvertToReference);
|
||||
GraphCanvas::DataSlotRequestBus::Event(endpoint.GetSlotId(), &GraphCanvas::DataSlotRequests::ConvertToReference, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+858
@@ -0,0 +1,858 @@
|
||||
{
|
||||
"Type": "JsonSerialization",
|
||||
"Version": 1,
|
||||
"ClassName": "ScriptCanvasData",
|
||||
"ClassData": {
|
||||
"m_scriptCanvas": {
|
||||
"Id": {
|
||||
"id": 8475300026301128284
|
||||
},
|
||||
"Name": "Script Canvas Graph",
|
||||
"Components": {
|
||||
"Component_[11907165653188402756]": {
|
||||
"$type": "EditorGraphVariableManagerComponent",
|
||||
"Id": 11907165653188402756
|
||||
},
|
||||
"Component_[3578973614457412392]": {
|
||||
"$type": "{4D755CA9-AB92-462C-B24F-0B3376F19967} Graph",
|
||||
"Id": 3578973614457412392,
|
||||
"m_graphData": {
|
||||
"m_nodes": [
|
||||
{
|
||||
"Id": {
|
||||
"id": 16019084446641
|
||||
},
|
||||
"Name": "SC-Node(Start)",
|
||||
"Components": {
|
||||
"Component_[1767232296153779726]": {
|
||||
"$type": "Start",
|
||||
"Id": 1767232296153779726,
|
||||
"Slots": [
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{635D7286-4B19-44D4-8F5E-1B4A0CF85C9E}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Out",
|
||||
"toolTip": "Signaled when the entity that owns this graph is fully activated.",
|
||||
"Descriptor": {
|
||||
"ConnectionType": 2,
|
||||
"SlotType": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": {
|
||||
"id": 7910364941488
|
||||
},
|
||||
"Name": "SC-Node(Mark Complete)",
|
||||
"Components": {
|
||||
"Component_[1885955816756801547]": {
|
||||
"$type": "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF} Method",
|
||||
"Id": 1885955816756801547,
|
||||
"Slots": [
|
||||
{
|
||||
"isVisibile": false,
|
||||
"id": {
|
||||
"m_id": "{31ABE549-E2E3-440E-884C-9F7FD4185C1D}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "EntityId: 0",
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 2
|
||||
},
|
||||
"DataType": 1
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{4FFA1776-D933-4475-BB3C-5BD7FAD47E2B}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Report",
|
||||
"toolTip": "additional notes for the test report",
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 2
|
||||
},
|
||||
"DataType": 1
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{F8687B16-9C64-4B5E-B000-035D9B3712EF}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "In",
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{0E8012D1-A36B-4BCC-86C9-7D4F93816923}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Out",
|
||||
"Descriptor": {
|
||||
"ConnectionType": 2,
|
||||
"SlotType": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"Datums": [
|
||||
{
|
||||
"isOverloadedStorage": false,
|
||||
"scriptCanvasType": {
|
||||
"m_type": 1
|
||||
},
|
||||
"isNullPointer": false,
|
||||
"$type": "EntityId",
|
||||
"value": {
|
||||
"id": 4276206253
|
||||
}
|
||||
},
|
||||
{
|
||||
"isOverloadedStorage": false,
|
||||
"scriptCanvasType": {
|
||||
"m_type": 5
|
||||
},
|
||||
"isNullPointer": false,
|
||||
"$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string",
|
||||
"value": "",
|
||||
"label": "Report"
|
||||
}
|
||||
],
|
||||
"methodType": 2,
|
||||
"methodName": "Mark Complete",
|
||||
"className": "Unit Testing",
|
||||
"inputSlots": [
|
||||
{
|
||||
"m_id": "{31ABE549-E2E3-440E-884C-9F7FD4185C1D}"
|
||||
},
|
||||
{
|
||||
"m_id": "{4FFA1776-D933-4475-BB3C-5BD7FAD47E2B}"
|
||||
}
|
||||
],
|
||||
"prettyClassName": "Unit Testing"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": {
|
||||
"id": 16611789933489
|
||||
},
|
||||
"Name": "SC-Node(Expect Equal)",
|
||||
"Components": {
|
||||
"Component_[6935885723653735789]": {
|
||||
"$type": "MethodOverloaded",
|
||||
"Id": 6935885723653735789,
|
||||
"Slots": [
|
||||
{
|
||||
"isVisibile": false,
|
||||
"id": {
|
||||
"m_id": "{E2AB1183-3D7C-479C-88D5-8C90042F9D3F}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "EntityId: 0",
|
||||
"DisplayDataType": {
|
||||
"m_type": 1
|
||||
},
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 2
|
||||
},
|
||||
"DataType": 1
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{8D954D4E-D65E-47E4-8979-BAE900582B38}"
|
||||
},
|
||||
"DynamicTypeOverride": 1,
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
},
|
||||
{
|
||||
"$type": "OverloadContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Candidate",
|
||||
"toolTip": "left of ==",
|
||||
"DisplayDataType": {
|
||||
"m_type": 3
|
||||
},
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 2
|
||||
},
|
||||
"DataType": 1
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{17DA7626-AA06-4574-8F27-9DE230F03639}"
|
||||
},
|
||||
"DynamicTypeOverride": 1,
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
},
|
||||
{
|
||||
"$type": "OverloadContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Reference",
|
||||
"toolTip": "right of ==",
|
||||
"DisplayDataType": {
|
||||
"m_type": 3
|
||||
},
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 2
|
||||
},
|
||||
"DataType": 1
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{B442C3D0-F6F5-4689-982B-67CDF723D505}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Report",
|
||||
"toolTip": "additional notes for the test report",
|
||||
"DisplayDataType": {
|
||||
"m_type": 5
|
||||
},
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 2
|
||||
},
|
||||
"DataType": 1
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{33531BA3-2152-4F66-BFDA-CEAC2EB631C7}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "In",
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{A8A9AB24-E5B2-4947-85CC-F87AD9F97FEB}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Out",
|
||||
"Descriptor": {
|
||||
"ConnectionType": 2,
|
||||
"SlotType": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"Datums": [
|
||||
{
|
||||
"scriptCanvasType": {
|
||||
"m_type": 1
|
||||
},
|
||||
"isNullPointer": false,
|
||||
"$type": "EntityId",
|
||||
"value": {
|
||||
"id": 4276206253
|
||||
}
|
||||
},
|
||||
{
|
||||
"scriptCanvasType": {
|
||||
"m_type": 3
|
||||
},
|
||||
"isNullPointer": false,
|
||||
"$type": "double",
|
||||
"value": 0.0,
|
||||
"label": "Candidate"
|
||||
},
|
||||
{
|
||||
"scriptCanvasType": {
|
||||
"m_type": 3
|
||||
},
|
||||
"isNullPointer": false,
|
||||
"$type": "double",
|
||||
"value": 7.0,
|
||||
"label": "Reference"
|
||||
},
|
||||
{
|
||||
"scriptCanvasType": {
|
||||
"m_type": 5
|
||||
},
|
||||
"isNullPointer": false,
|
||||
"$type": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9} AZStd::string",
|
||||
"value": "",
|
||||
"label": "Report"
|
||||
}
|
||||
],
|
||||
"methodType": 2,
|
||||
"methodName": "Expect Equal",
|
||||
"className": "Unit Testing",
|
||||
"inputSlots": [
|
||||
{
|
||||
"m_id": "{E2AB1183-3D7C-479C-88D5-8C90042F9D3F}"
|
||||
},
|
||||
{
|
||||
"m_id": "{8D954D4E-D65E-47E4-8979-BAE900582B38}"
|
||||
},
|
||||
{
|
||||
"m_id": "{17DA7626-AA06-4574-8F27-9DE230F03639}"
|
||||
},
|
||||
{
|
||||
"m_id": "{B442C3D0-F6F5-4689-982B-67CDF723D505}"
|
||||
}
|
||||
],
|
||||
"orderedInputSlotIds": [
|
||||
{
|
||||
"m_id": "{E2AB1183-3D7C-479C-88D5-8C90042F9D3F}"
|
||||
},
|
||||
{
|
||||
"m_id": "{8D954D4E-D65E-47E4-8979-BAE900582B38}"
|
||||
},
|
||||
{
|
||||
"m_id": "{17DA7626-AA06-4574-8F27-9DE230F03639}"
|
||||
},
|
||||
{
|
||||
"m_id": "{B442C3D0-F6F5-4689-982B-67CDF723D505}"
|
||||
}
|
||||
],
|
||||
"outputSlotIds": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": {
|
||||
"id": 15443558828977
|
||||
},
|
||||
"Name": "FunctionCallNode",
|
||||
"Components": {
|
||||
"Component_[9383725529787702808]": {
|
||||
"$type": "FunctionCallNode",
|
||||
"Id": 9383725529787702808,
|
||||
"Slots": [
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{32BD3CC0-AA44-4B1F-966D-4FF1561E4BC5}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "IncrementNumber",
|
||||
"DisplayGroup": {
|
||||
"Value": 921414446
|
||||
},
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{EBE31443-CFB9-41B1-8DBA-127DB07A405A}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "IncrementMe",
|
||||
"DisplayGroup": {
|
||||
"Value": 921414446
|
||||
},
|
||||
"Descriptor": {
|
||||
"ConnectionType": 1,
|
||||
"SlotType": 2
|
||||
},
|
||||
"DataType": 1
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{7FDF8233-D26E-4EBE-9D68-1074FD9B9999}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Out",
|
||||
"DisplayGroup": {
|
||||
"Value": 921414446
|
||||
},
|
||||
"Descriptor": {
|
||||
"ConnectionType": 2,
|
||||
"SlotType": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"m_id": "{3A29CBC7-A727-4DBD-8319-0D31D299A9F0}"
|
||||
},
|
||||
"contracts": [
|
||||
{
|
||||
"$type": "SlotTypeContract"
|
||||
}
|
||||
],
|
||||
"slotName": "Incremented",
|
||||
"DisplayDataType": {
|
||||
"m_type": 3
|
||||
},
|
||||
"DisplayGroup": {
|
||||
"Value": 2732307328
|
||||
},
|
||||
"Descriptor": {
|
||||
"ConnectionType": 2,
|
||||
"SlotType": 2
|
||||
},
|
||||
"DataType": 1
|
||||
}
|
||||
],
|
||||
"Datums": [
|
||||
{
|
||||
"scriptCanvasType": {
|
||||
"m_type": 3
|
||||
},
|
||||
"isNullPointer": false,
|
||||
"$type": "double",
|
||||
"value": 6.0,
|
||||
"label": "IncrementMe"
|
||||
}
|
||||
],
|
||||
"m_sourceId": "{5F36B80D-9546-478E-AD33-BF4AFEC8FF01}",
|
||||
"m_asset": {
|
||||
"assetId": {
|
||||
"guid": "{35A24A1D-57B7-5B0A-89C9-8BBA7657ECA5}",
|
||||
"subId": 3756448882
|
||||
},
|
||||
"assetHint": "scriptcanvas/unittests/ly_sc_unittest_promoteduservariablesfunction.scriptcanvas_fn_compiled"
|
||||
},
|
||||
"m_slotExecutionMap": {
|
||||
"ins": [
|
||||
{
|
||||
"_slotId": {
|
||||
"m_id": "{32BD3CC0-AA44-4B1F-966D-4FF1561E4BC5}"
|
||||
},
|
||||
"_inputs": [
|
||||
{
|
||||
"_slotId": {
|
||||
"m_id": "{EBE31443-CFB9-41B1-8DBA-127DB07A405A}"
|
||||
},
|
||||
"_interfaceSourceId": {
|
||||
"m_id": "{55F1434B-40C1-40AA-91C8-A65D6F2AFDC3}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"_outs": [
|
||||
{
|
||||
"_slotId": {
|
||||
"m_id": "{7FDF8233-D26E-4EBE-9D68-1074FD9B9999}"
|
||||
},
|
||||
"_name": "Out",
|
||||
"_outputs": [
|
||||
{
|
||||
"_slotId": {
|
||||
"m_id": "{3A29CBC7-A727-4DBD-8319-0D31D299A9F0}"
|
||||
},
|
||||
"_interfaceSourceId": {
|
||||
"m_id": "{81088CD0-BC45-4EB8-A823-DE442BF0541C}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"_interfaceSourceId": "{E9A0BF28-5910-4B0B-B82F-6519BCC1A33A}"
|
||||
}
|
||||
],
|
||||
"_parsedName": "IncrementNumber_scvm",
|
||||
"_interfaceSourceId": "{5F36B80D-9546-478E-AD33-BF4AFEC8FF01}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"m_slotExecutionMapSourceInterface": {
|
||||
"ins": [
|
||||
{
|
||||
"displayName": "IncrementNumber",
|
||||
"parsedName": "IncrementNumber_scvm",
|
||||
"inputs": [
|
||||
{
|
||||
"displayName": "IncrementMe",
|
||||
"parsedName": "IncrementMe_scvm_1",
|
||||
"datum": {
|
||||
"scriptCanvasType": {
|
||||
"m_type": 3
|
||||
},
|
||||
"isNullPointer": false,
|
||||
"$type": "double",
|
||||
"value": 0.0
|
||||
},
|
||||
"sourceID": {
|
||||
"m_id": "{55F1434B-40C1-40AA-91C8-A65D6F2AFDC3}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"outs": [
|
||||
{
|
||||
"displayName": "Out",
|
||||
"parsedName": "Out",
|
||||
"outputs": [
|
||||
{
|
||||
"displayName": "Incremented",
|
||||
"parsedName": "Incremented_scvm_1",
|
||||
"type": {
|
||||
"m_type": 3
|
||||
},
|
||||
"sourceID": {
|
||||
"m_id": "{81088CD0-BC45-4EB8-A823-DE442BF0541C}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"sourceID": "{E9A0BF28-5910-4B0B-B82F-6519BCC1A33A}"
|
||||
}
|
||||
],
|
||||
"isPure": true,
|
||||
"sourceID": "{5F36B80D-9546-478E-AD33-BF4AFEC8FF01}"
|
||||
}
|
||||
],
|
||||
"outKeys": [
|
||||
{
|
||||
"Value": 3119148441
|
||||
}
|
||||
],
|
||||
"namespacePath": [
|
||||
"scriptcanvas",
|
||||
"unittests",
|
||||
"ly_sc_unittest_promoteduservariablesfunction_vm"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"m_connections": [
|
||||
{
|
||||
"Id": {
|
||||
"id": 16482940914609
|
||||
},
|
||||
"Name": "srcEndpoint=(On Graph Start: Out), destEndpoint=(Function Call Node: IncrementNumber)",
|
||||
"Components": {
|
||||
"Component_[1325606044371455697]": {
|
||||
"$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection",
|
||||
"Id": 1325606044371455697,
|
||||
"sourceEndpoint": {
|
||||
"nodeId": {
|
||||
"id": 16019084446641
|
||||
},
|
||||
"slotId": {
|
||||
"m_id": "{635D7286-4B19-44D4-8F5E-1B4A0CF85C9E}"
|
||||
}
|
||||
},
|
||||
"targetEndpoint": {
|
||||
"nodeId": {
|
||||
"id": 15443558828977
|
||||
},
|
||||
"slotId": {
|
||||
"m_id": "{32BD3CC0-AA44-4B1F-966D-4FF1561E4BC5}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": {
|
||||
"id": 17672646855601
|
||||
},
|
||||
"Name": "srcEndpoint=(Function Call Node: Out), destEndpoint=(Expect Equal: In)",
|
||||
"Components": {
|
||||
"Component_[553888750995224414]": {
|
||||
"$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection",
|
||||
"Id": 553888750995224414,
|
||||
"sourceEndpoint": {
|
||||
"nodeId": {
|
||||
"id": 15443558828977
|
||||
},
|
||||
"slotId": {
|
||||
"m_id": "{7FDF8233-D26E-4EBE-9D68-1074FD9B9999}"
|
||||
}
|
||||
},
|
||||
"targetEndpoint": {
|
||||
"nodeId": {
|
||||
"id": 16611789933489
|
||||
},
|
||||
"slotId": {
|
||||
"m_id": "{33531BA3-2152-4F66-BFDA-CEAC2EB631C7}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": {
|
||||
"id": 18003359337393
|
||||
},
|
||||
"Name": "srcEndpoint=(Function Call Node: Incremented), destEndpoint=(Expect Equal: Candidate)",
|
||||
"Components": {
|
||||
"Component_[6929789752232921563]": {
|
||||
"$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection",
|
||||
"Id": 6929789752232921563,
|
||||
"sourceEndpoint": {
|
||||
"nodeId": {
|
||||
"id": 15443558828977
|
||||
},
|
||||
"slotId": {
|
||||
"m_id": "{3A29CBC7-A727-4DBD-8319-0D31D299A9F0}"
|
||||
}
|
||||
},
|
||||
"targetEndpoint": {
|
||||
"nodeId": {
|
||||
"id": 16611789933489
|
||||
},
|
||||
"slotId": {
|
||||
"m_id": "{8D954D4E-D65E-47E4-8979-BAE900582B38}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Id": {
|
||||
"id": 8902502386864
|
||||
},
|
||||
"Name": "srcEndpoint=(Expect Equal: Out), destEndpoint=(Mark Complete: In)",
|
||||
"Components": {
|
||||
"Component_[11962156650601495433]": {
|
||||
"$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection",
|
||||
"Id": 11962156650601495433,
|
||||
"sourceEndpoint": {
|
||||
"nodeId": {
|
||||
"id": 16611789933489
|
||||
},
|
||||
"slotId": {
|
||||
"m_id": "{A8A9AB24-E5B2-4947-85CC-F87AD9F97FEB}"
|
||||
}
|
||||
},
|
||||
"targetEndpoint": {
|
||||
"nodeId": {
|
||||
"id": 7910364941488
|
||||
},
|
||||
"slotId": {
|
||||
"m_id": "{F8687B16-9C64-4B5E-B000-035D9B3712EF}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"m_assetType": "{1D497BC7-F97F-0000-80C2-359B6A010000}",
|
||||
"versionData": {
|
||||
"_grammarVersion": 1,
|
||||
"_runtimeVersion": 1,
|
||||
"_fileVersion": 1
|
||||
},
|
||||
"GraphCanvasData": [
|
||||
{
|
||||
"Key": {
|
||||
"id": 7910364941488
|
||||
},
|
||||
"Value": {
|
||||
"ComponentData": {
|
||||
"{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": {
|
||||
"$type": "NodeSaveData"
|
||||
},
|
||||
"{328FF15C-C302-458F-A43D-E1794DE0904E}": {
|
||||
"$type": "GeneralNodeTitleComponentSaveData",
|
||||
"PaletteOverride": "MethodNodeTitlePalette"
|
||||
},
|
||||
"{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
|
||||
"$type": "GeometrySaveData",
|
||||
"Position": [
|
||||
620.0,
|
||||
320.0
|
||||
]
|
||||
},
|
||||
"{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
|
||||
"$type": "StylingComponentSaveData",
|
||||
"SubStyle": ".method"
|
||||
},
|
||||
"{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
|
||||
"$type": "PersistentIdComponentSaveData",
|
||||
"PersistentId": "{69405A2B-8669-41A0-9660-74C8ECCE8B84}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": {
|
||||
"id": 15443558828977
|
||||
},
|
||||
"Value": {
|
||||
"ComponentData": {
|
||||
"{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": {
|
||||
"$type": "NodeSaveData"
|
||||
},
|
||||
"{328FF15C-C302-458F-A43D-E1794DE0904E}": {
|
||||
"$type": "GeneralNodeTitleComponentSaveData",
|
||||
"PaletteOverride": "MethodNodeTitlePalette"
|
||||
},
|
||||
"{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
|
||||
"$type": "GeometrySaveData",
|
||||
"Position": [
|
||||
100.0,
|
||||
100.0
|
||||
]
|
||||
},
|
||||
"{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
|
||||
"$type": "StylingComponentSaveData",
|
||||
"SubStyle": ".method"
|
||||
},
|
||||
"{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
|
||||
"$type": "PersistentIdComponentSaveData",
|
||||
"PersistentId": "{61B5E23D-2C56-4183-9606-AC0A4B788B7E}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": {
|
||||
"id": 16019084446641
|
||||
},
|
||||
"Value": {
|
||||
"ComponentData": {
|
||||
"{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": {
|
||||
"$type": "NodeSaveData"
|
||||
},
|
||||
"{328FF15C-C302-458F-A43D-E1794DE0904E}": {
|
||||
"$type": "GeneralNodeTitleComponentSaveData",
|
||||
"PaletteOverride": "TimeNodeTitlePalette"
|
||||
},
|
||||
"{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
|
||||
"$type": "GeometrySaveData",
|
||||
"Position": [
|
||||
-80.0,
|
||||
60.0
|
||||
]
|
||||
},
|
||||
"{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
|
||||
"$type": "StylingComponentSaveData"
|
||||
},
|
||||
"{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
|
||||
"$type": "PersistentIdComponentSaveData",
|
||||
"PersistentId": "{A7B4E93B-07A1-43DC-BE07-4DC5A1D64352}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": {
|
||||
"id": 16611789933489
|
||||
},
|
||||
"Value": {
|
||||
"ComponentData": {
|
||||
"{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": {
|
||||
"$type": "NodeSaveData"
|
||||
},
|
||||
"{328FF15C-C302-458F-A43D-E1794DE0904E}": {
|
||||
"$type": "GeneralNodeTitleComponentSaveData",
|
||||
"PaletteOverride": "MethodNodeTitlePalette"
|
||||
},
|
||||
"{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
|
||||
"$type": "GeometrySaveData",
|
||||
"Position": [
|
||||
300.0,
|
||||
300.0
|
||||
]
|
||||
},
|
||||
"{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
|
||||
"$type": "StylingComponentSaveData",
|
||||
"SubStyle": ".method"
|
||||
},
|
||||
"{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
|
||||
"$type": "PersistentIdComponentSaveData",
|
||||
"PersistentId": "{5EDF60ED-BF05-4AC4-85D9-5988FFE7C2A7}"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": {
|
||||
"id": 8475300026301128284
|
||||
},
|
||||
"Value": {
|
||||
"ComponentData": {
|
||||
"{5F84B500-8C45-40D1-8EFC-A5306B241444}": {
|
||||
"$type": "SceneComponentSaveData"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"StatisticsHelper": {
|
||||
"InstanceCounter": [
|
||||
{
|
||||
"Key": 4053150093067829293,
|
||||
"Value": 1
|
||||
},
|
||||
{
|
||||
"Key": 4199610336680704683,
|
||||
"Value": 1
|
||||
},
|
||||
{
|
||||
"Key": 6740857896271713458,
|
||||
"Value": 1
|
||||
},
|
||||
{
|
||||
"Key": 10204019744198319120,
|
||||
"Value": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1100
File diff suppressed because it is too large
Load Diff
@@ -935,3 +935,8 @@ TEST_F(ScriptCanvasTestFixture, InterpretedExecutionOutPerformance)
|
||||
{
|
||||
RunUnitTestGraph("LY_SC_UnitTest_ExecutionOutPerformance", ExecutionMode::Interpreted);
|
||||
}
|
||||
|
||||
TEST_F(ScriptCanvasTestFixture, PromotedUserVariables)
|
||||
{
|
||||
RunUnitTestGraph("LY_SC_UnitTest_PromotedUserVariables", ExecutionMode::Interpreted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user