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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user