Integrating up through commit 90f050496
This commit is contained in:
@@ -165,7 +165,7 @@ namespace GraphCanvas
|
||||
m_saveData.SignalDirty();
|
||||
}
|
||||
|
||||
void GeometryComponent::OnItemChange(const AZ::EntityId& entityId, QGraphicsItem::GraphicsItemChange change, const QVariant& value)
|
||||
void GeometryComponent::OnItemChange([[maybe_unused]] const AZ::EntityId& entityId, QGraphicsItem::GraphicsItemChange change, const QVariant& value)
|
||||
{
|
||||
AZ_Assert(entityId == GetEntityId(), "EIDs should match");
|
||||
|
||||
|
||||
@@ -682,6 +682,11 @@ namespace GraphCanvas
|
||||
{
|
||||
AZ_Error("GraphCanvas", !m_trackingTarget.IsValid(), "Trying to track a second target for gestures while still tracking the first.");
|
||||
|
||||
if (GeometryNotificationBus::Handler::BusIsConnected())
|
||||
{
|
||||
GeometryNotificationBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
GeometryNotificationBus::Handler::BusConnect(elementId);
|
||||
|
||||
m_trackingTarget = elementId;
|
||||
|
||||
@@ -36,12 +36,13 @@ namespace GraphCanvas
|
||||
if (serializeContext)
|
||||
{
|
||||
serializeContext->Class<DataSlotComponent, SlotComponent>()
|
||||
->Version(5)
|
||||
->Version(6)
|
||||
->Field("TypeId", &DataSlotComponent::m_dataTypeId)
|
||||
->Field("DataSlotType", &DataSlotComponent::m_dataSlotType)
|
||||
->Field("CanConvertSlotTypes", &DataSlotComponent::m_canConvertSlotTypes)
|
||||
->Field("ContainedTypeIds", &DataSlotComponent::m_containedTypeIds)
|
||||
->Field("DataValueType", &DataSlotComponent::m_valueType)
|
||||
->Field("IsUserSlot", &DataSlotComponent::m_isUserSlot)
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -97,6 +98,7 @@ namespace GraphCanvas
|
||||
, m_valueType(DataValueType::Primitive)
|
||||
, m_dataTypeId(AZ::Uuid::CreateNull())
|
||||
, m_previousDataSlotType(DataSlotType::Unknown)
|
||||
, m_isUserSlot(false)
|
||||
{
|
||||
if (m_slotConfiguration.m_slotGroup == SlotGroups::Invalid)
|
||||
{
|
||||
@@ -112,6 +114,7 @@ namespace GraphCanvas
|
||||
, m_dataTypeId(dataSlotConfiguration.m_typeId)
|
||||
, m_containedTypeIds(dataSlotConfiguration.m_containerTypeIds)
|
||||
, m_previousDataSlotType(DataSlotType::Unknown)
|
||||
, m_isUserSlot(dataSlotConfiguration.m_isUserAdded)
|
||||
{
|
||||
if (m_slotConfiguration.m_slotGroup == SlotGroups::Invalid)
|
||||
{
|
||||
@@ -230,6 +233,8 @@ namespace GraphCanvas
|
||||
|
||||
slotConfiguration->m_containerTypeIds = m_containedTypeIds;
|
||||
|
||||
slotConfiguration->m_isUserAdded = m_isUserSlot;
|
||||
|
||||
PopulateSlotConfiguration((*slotConfiguration));
|
||||
|
||||
return slotConfiguration;
|
||||
@@ -416,6 +421,11 @@ namespace GraphCanvas
|
||||
}
|
||||
}
|
||||
|
||||
bool DataSlotComponent::IsUserSlot() const
|
||||
{
|
||||
return m_isUserSlot;
|
||||
}
|
||||
|
||||
const Styling::StyleHelper* DataSlotComponent::GetDataColorPalette() const
|
||||
{
|
||||
AZ::EntityId sceneId;
|
||||
|
||||
@@ -57,6 +57,8 @@ namespace GraphCanvas
|
||||
bool ConvertToValue() override;
|
||||
bool CanConvertToValue() const override;
|
||||
|
||||
bool IsUserSlot() const override;
|
||||
|
||||
DataSlotType GetDataSlotType() const override;
|
||||
DataValueType GetDataValueType() const override;
|
||||
|
||||
@@ -91,6 +93,8 @@ namespace GraphCanvas
|
||||
DataSlotType m_dataSlotType;
|
||||
DataValueType m_valueType;
|
||||
|
||||
bool m_isUserSlot;
|
||||
|
||||
AZ::Uuid m_dataTypeId;
|
||||
AZStd::vector<AZ::Uuid> m_containedTypeIds;
|
||||
|
||||
|
||||
@@ -878,13 +878,16 @@ namespace GraphCanvas
|
||||
|
||||
if (dataRequests)
|
||||
{
|
||||
if (dataRequests->GetDataSlotType() == DataSlotType::Value && dataRequests->CanConvertToReference())
|
||||
if (!dataRequests->IsUserSlot())
|
||||
{
|
||||
dataRequests->ConvertToReference();
|
||||
}
|
||||
else if (dataRequests->GetDataSlotType() == DataSlotType::Reference && dataRequests->CanConvertToValue())
|
||||
{
|
||||
dataRequests->ConvertToValue();
|
||||
if (dataRequests->GetDataSlotType() == DataSlotType::Value && dataRequests->CanConvertToReference())
|
||||
{
|
||||
dataRequests->ConvertToReference();
|
||||
}
|
||||
else if (dataRequests->GetDataSlotType() == DataSlotType::Reference && dataRequests->CanConvertToValue())
|
||||
{
|
||||
dataRequests->ConvertToValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ namespace GraphCanvas
|
||||
void ExtenderSlotComponent::TriggerExtension()
|
||||
{
|
||||
// Don't need to track anything. Just create the slot then ignore whatever the return is.
|
||||
ConstructSlot();
|
||||
ConstructSlot(GraphModelRequests::ExtensionRequestReason::UserRequest);
|
||||
|
||||
if (m_createdSlot.IsValid())
|
||||
{
|
||||
@@ -236,7 +236,7 @@ namespace GraphCanvas
|
||||
return Endpoint();
|
||||
}
|
||||
|
||||
ConstructSlot();
|
||||
ConstructSlot(GraphModelRequests::ExtensionRequestReason::ConnectionProposal);
|
||||
|
||||
if (!m_createdSlot.IsValid())
|
||||
{
|
||||
@@ -264,7 +264,7 @@ namespace GraphCanvas
|
||||
{
|
||||
}
|
||||
|
||||
void ExtenderSlotComponent::ConstructSlot()
|
||||
void ExtenderSlotComponent::ConstructSlot(GraphModelRequests::ExtensionRequestReason reason)
|
||||
{
|
||||
if (!m_createdSlot.IsValid())
|
||||
{
|
||||
@@ -275,7 +275,7 @@ namespace GraphCanvas
|
||||
|
||||
{
|
||||
ScopedGraphUndoBlocker undoBlocker(graphId);
|
||||
GraphModelRequestBus::EventResult(m_createdSlot, graphId, &GraphModelRequests::RequestExtension, nodeId, m_extenderId);
|
||||
GraphModelRequestBus::EventResult(m_createdSlot, graphId, &GraphModelRequests::RequestExtension, nodeId, m_extenderId, reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -311,7 +311,7 @@ namespace GraphCanvas
|
||||
|
||||
AZ::Entity* ExtenderSlotComponent::ConstructConnectionEntity(const Endpoint& sourceEndpoint, const Endpoint& targetEndpoint, bool createModelConnection)
|
||||
{
|
||||
ConstructSlot();
|
||||
ConstructSlot(GraphModelRequests::ExtensionRequestReason::Internal);
|
||||
|
||||
if (m_createdSlot.IsValid())
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace GraphCanvas
|
||||
ExtenderSlotComponent(const ExtenderSlotComponent&) = delete;
|
||||
ExtenderSlotComponent& operator=(const ExtenderSlotComponent&) = delete;
|
||||
|
||||
void ConstructSlot();
|
||||
void ConstructSlot(GraphModelRequests::ExtensionRequestReason reason);
|
||||
void EraseSlot();
|
||||
void CleanupProposedSlot();
|
||||
|
||||
@@ -99,4 +99,4 @@ namespace GraphCanvas
|
||||
|
||||
ExtenderId m_extenderId;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +137,13 @@ namespace GraphCanvas
|
||||
|
||||
int GetLayoutPriority() const override;
|
||||
void SetLayoutPriority(int priority) override;
|
||||
|
||||
void Show() { m_visible = true; }
|
||||
void Hide() { m_visible = false; }
|
||||
////
|
||||
|
||||
bool IsVisible() const { return m_visible; }
|
||||
|
||||
protected:
|
||||
|
||||
void PopulateSlotConfiguration(SlotConfiguration& slotConfiguration) const;
|
||||
@@ -173,5 +178,7 @@ namespace GraphCanvas
|
||||
|
||||
//! Stores custom user data for this slot
|
||||
AZStd::any m_userData;
|
||||
|
||||
bool m_visible;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user