Merge branch 'development' into redcode/driller_removal
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
+4
-3
@@ -188,7 +188,7 @@ namespace ScriptCanvasEditor
|
||||
|
||||
if (scriptCanvasSlot && scriptCanvasSlot->IsVisible())
|
||||
{
|
||||
auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot));
|
||||
auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0);
|
||||
|
||||
GraphCanvas::TranslationKey key;
|
||||
key << "EBusHandler" << eventHandler->GetEBusName() << "methods" << m_eventName;
|
||||
@@ -219,9 +219,10 @@ namespace ScriptCanvasEditor
|
||||
|
||||
if (scriptCanvasSlot && scriptCanvasSlot->IsVisible())
|
||||
{
|
||||
auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot));
|
||||
int& index = (scriptCanvasSlot->IsData() && scriptCanvasSlot->IsOutput()) ? paramIndex : outputIndex;
|
||||
|
||||
auto graphCanvasSlotId = Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), index);
|
||||
|
||||
GraphCanvas::TranslationRequests::Details details;
|
||||
|
||||
if (scriptCanvasSlot->IsData())
|
||||
@@ -254,7 +255,7 @@ namespace ScriptCanvasEditor
|
||||
|
||||
if (scriptCanvasSlot && scriptCanvasSlot->IsVisible())
|
||||
{
|
||||
Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot));
|
||||
Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-3
@@ -177,9 +177,11 @@ namespace ScriptCanvasEditor
|
||||
|
||||
if (scriptCanvasSlot && scriptCanvasSlot->IsVisible())
|
||||
{
|
||||
Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot));
|
||||
Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0);
|
||||
}
|
||||
|
||||
int paramIndex = 0;
|
||||
int outputIndex = 0;
|
||||
//
|
||||
// inputCount and outputCount work because the order of the slots is maintained from the BehaviorContext, if this changes
|
||||
// in the future then we should consider storing the actual offset or key name at that time.
|
||||
@@ -188,10 +190,14 @@ namespace ScriptCanvasEditor
|
||||
{
|
||||
scriptCanvasSlot = eventHandler->GetSlot(slotId);
|
||||
|
||||
int& index = (scriptCanvasSlot->IsData() && scriptCanvasSlot->IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
if (scriptCanvasSlot && scriptCanvasSlot->IsVisible())
|
||||
{
|
||||
Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot));
|
||||
Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), index);
|
||||
}
|
||||
|
||||
++index;
|
||||
}
|
||||
|
||||
if (myEvent.m_resultSlotId.IsValid())
|
||||
@@ -200,7 +206,7 @@ namespace ScriptCanvasEditor
|
||||
|
||||
if (scriptCanvasSlot && scriptCanvasSlot->IsVisible())
|
||||
{
|
||||
Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot));
|
||||
Nodes::DisplayScriptCanvasSlot(GetEntityId(), (*scriptCanvasSlot), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -110,12 +110,17 @@ namespace ScriptCanvasEditor::Nodes
|
||||
GraphCanvas::TranslationRequests::Details details;
|
||||
GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details);
|
||||
|
||||
int paramIndex = 0;
|
||||
int outputIndex = 0;
|
||||
|
||||
// Create the GraphCanvas slots
|
||||
for (const auto& slot : node->GetSlots())
|
||||
{
|
||||
GraphCanvas::TranslationKey slotKey;
|
||||
slotKey << "ScriptCanvas::Node" << azrtti_typeid(node).ToString<AZStd::string>() << "slots";
|
||||
|
||||
int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
if (slot.IsVisible())
|
||||
{
|
||||
AZStd::string slotKeyStr;
|
||||
@@ -150,11 +155,13 @@ namespace ScriptCanvasEditor::Nodes
|
||||
slotDetails.m_tooltip = slot.GetToolTip();
|
||||
}
|
||||
|
||||
AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasEntity->GetId(), slot);
|
||||
AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasEntity->GetId(), slot, index);
|
||||
|
||||
GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slotDetails.m_name);
|
||||
GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slotDetails.m_tooltip);
|
||||
}
|
||||
|
||||
++index;
|
||||
}
|
||||
|
||||
const auto& visualExtensions = node->GetVisualExtensions();
|
||||
@@ -328,6 +335,7 @@ namespace ScriptCanvasEditor::Nodes
|
||||
// Set the class' name as the subtitle fallback
|
||||
details.m_subtitle = details.m_name;
|
||||
|
||||
AZStd::string methodContext;
|
||||
// Get the method's text data
|
||||
GraphCanvas::TranslationRequests::Details methodDetails;
|
||||
methodDetails.m_name = details.m_name; // fallback
|
||||
@@ -338,14 +346,16 @@ namespace ScriptCanvasEditor::Nodes
|
||||
if (methodNode->GetMethodType() == ScriptCanvas::MethodType::Getter || methodNode->GetMethodType() == ScriptCanvas::MethodType::Free)
|
||||
{
|
||||
updatedMethodName = "Get";
|
||||
methodContext = "Getter";
|
||||
}
|
||||
else
|
||||
{
|
||||
updatedMethodName = "Set";
|
||||
methodContext = "Setter";
|
||||
}
|
||||
updatedMethodName.append(methodName);
|
||||
}
|
||||
key << updatedMethodName;
|
||||
key << methodContext << updatedMethodName;
|
||||
GraphCanvas::TranslationRequestBus::BroadcastResult(methodDetails, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", methodDetails);
|
||||
|
||||
|
||||
@@ -372,9 +382,11 @@ namespace ScriptCanvasEditor::Nodes
|
||||
{
|
||||
GraphCanvas::TranslationKey slotKey = key;
|
||||
|
||||
int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
if (slot.IsVisible())
|
||||
{
|
||||
AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot);
|
||||
AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index);
|
||||
|
||||
details.m_name = slot.GetName();
|
||||
details.m_tooltip = slot.GetToolTip();
|
||||
@@ -386,7 +398,7 @@ namespace ScriptCanvasEditor::Nodes
|
||||
}
|
||||
else
|
||||
{
|
||||
int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
|
||||
if (slot.IsData())
|
||||
{
|
||||
@@ -416,6 +428,8 @@ namespace ScriptCanvasEditor::Nodes
|
||||
UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), details.m_name);
|
||||
|
||||
}
|
||||
|
||||
++index;
|
||||
}
|
||||
|
||||
// Set the name
|
||||
@@ -471,6 +485,9 @@ namespace ScriptCanvasEditor::Nodes
|
||||
|
||||
AZStd::vector< ScriptCanvas::SlotId > scriptCanvasSlots = busNode->GetNonEventSlotIds();
|
||||
|
||||
int paramIndex = 0;
|
||||
int outputIndex = 0;
|
||||
|
||||
for (const auto& slotId : scriptCanvasSlots)
|
||||
{
|
||||
ScriptCanvas::Slot* slot = busNode->GetSlot(slotId);
|
||||
@@ -484,6 +501,8 @@ namespace ScriptCanvasEditor::Nodes
|
||||
|
||||
if (slot->IsVisible())
|
||||
{
|
||||
int& index = (slot->IsData() && slot->IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, (*slot), group);
|
||||
|
||||
if (busNode->IsIDRequired() && slot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn())
|
||||
@@ -497,6 +516,8 @@ namespace ScriptCanvasEditor::Nodes
|
||||
|
||||
GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip);
|
||||
}
|
||||
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -594,12 +615,17 @@ namespace ScriptCanvasEditor::Nodes
|
||||
*graphCanvasUserData = azEventNode->GetEntityId();
|
||||
}
|
||||
|
||||
int paramIndex = 0;
|
||||
int outputIndex = 0;
|
||||
|
||||
for (const ScriptCanvas::Slot& slot: azEventNode->GetSlots())
|
||||
{
|
||||
GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid;
|
||||
|
||||
if (slot.IsVisible())
|
||||
{
|
||||
int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, group);
|
||||
|
||||
GraphCanvas::TranslationKey key;
|
||||
@@ -610,6 +636,8 @@ namespace ScriptCanvasEditor::Nodes
|
||||
|
||||
GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetName, details.m_name);
|
||||
GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetTooltip, details.m_tooltip);;
|
||||
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -675,6 +703,9 @@ namespace ScriptCanvasEditor::Nodes
|
||||
|
||||
AZStd::vector< ScriptCanvas::SlotId > scriptCanvasSlots = busNode->GetNonEventSlotIds();
|
||||
|
||||
int paramIndex = 0;
|
||||
int outputIndex = 0;
|
||||
|
||||
for (const auto& slotId : scriptCanvasSlots)
|
||||
{
|
||||
ScriptCanvas::Slot* slot = busNode->GetSlot(slotId);
|
||||
@@ -688,6 +719,8 @@ namespace ScriptCanvasEditor::Nodes
|
||||
|
||||
if (slot->IsVisible())
|
||||
{
|
||||
int& index = (slot->IsData() && slot->IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
AZ::EntityId gcSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, (*slot), group);
|
||||
|
||||
if (busNode->IsIDRequired() && slot->GetDescriptor() == ScriptCanvas::SlotDescriptors::DataIn())
|
||||
@@ -698,6 +731,8 @@ namespace ScriptCanvasEditor::Nodes
|
||||
GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details);
|
||||
GraphCanvas::SlotRequestBus::Event(gcSlotId, &GraphCanvas::SlotRequests::SetDetails, details.m_name, details.m_tooltip);
|
||||
}
|
||||
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -783,17 +818,24 @@ namespace ScriptCanvasEditor::Nodes
|
||||
return graphCanvasNodeId;
|
||||
}
|
||||
|
||||
int paramIndex = 0;
|
||||
int outputIndex = 0;
|
||||
|
||||
for (const auto& slot : senderNode->GetSlots())
|
||||
{
|
||||
int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
if (slot.IsVisible())
|
||||
{
|
||||
AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot);
|
||||
AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index);
|
||||
|
||||
GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slot.GetName());
|
||||
GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slot.GetToolTip());
|
||||
|
||||
UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName());
|
||||
}
|
||||
|
||||
++index;
|
||||
}
|
||||
|
||||
// Set the name
|
||||
@@ -871,14 +913,21 @@ namespace ScriptCanvasEditor::Nodes
|
||||
return graphCanvasNodeId;
|
||||
}
|
||||
|
||||
int paramIndex = 0;
|
||||
int outputIndex = 0;
|
||||
|
||||
for (const auto& slot : functionNode->GetSlots())
|
||||
{
|
||||
AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot);
|
||||
int& index = (slot.IsData() && slot.IsInput()) ? paramIndex : outputIndex;
|
||||
|
||||
AZ::EntityId graphCanvasSlotId = DisplayScriptCanvasSlot(graphCanvasNodeId, slot, index);
|
||||
|
||||
GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetName, slot.GetName());
|
||||
GraphCanvas::SlotRequestBus::Event(graphCanvasSlotId, &GraphCanvas::SlotRequests::SetTooltip, slot.GetToolTip());
|
||||
|
||||
UpdateSlotDatumLabel(graphCanvasNodeId, slot.GetId(), slot.GetName());
|
||||
|
||||
++index;
|
||||
}
|
||||
|
||||
if (asset)
|
||||
@@ -1141,7 +1190,7 @@ namespace ScriptCanvasEditor::Nodes
|
||||
return graphCanvasConnectionType;
|
||||
}
|
||||
|
||||
AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, GraphCanvas::SlotGroup slotGroup)
|
||||
AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, int slotIndex, GraphCanvas::SlotGroup slotGroup)
|
||||
{
|
||||
if (!slot.IsVisible())
|
||||
{
|
||||
@@ -1244,6 +1293,7 @@ namespace ScriptCanvasEditor::Nodes
|
||||
}
|
||||
|
||||
slotKeyStr.append(slot.GetName());
|
||||
slotKeyStr.append(AZStd::string::format("_%d", slotIndex));
|
||||
slotKey << slotKeyStr << "details";
|
||||
|
||||
GraphCanvas::TranslationRequests::Details slotDetails;
|
||||
|
||||
@@ -63,5 +63,5 @@ namespace ScriptCanvasEditor::Nodes
|
||||
|
||||
// SlotGroup will control how elements are grouped.
|
||||
// Invalid will cause the slots to put themselves into whatever category they belong to by default.
|
||||
AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid);
|
||||
AZ::EntityId DisplayScriptCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::Slot& slot, int slotIndex, GraphCanvas::SlotGroup group = GraphCanvas::SlotGroups::Invalid);
|
||||
}
|
||||
|
||||
@@ -1023,13 +1023,15 @@ namespace ScriptCanvasEditor
|
||||
|
||||
GraphCanvas::TranslationKey key;
|
||||
|
||||
AZStd::string context;
|
||||
AZStd::string updatedMethodName;
|
||||
if (propertyStatus != ScriptCanvas::PropertyStatus::None)
|
||||
{
|
||||
updatedMethodName = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Get" : "Set";
|
||||
context = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Getter" : "Setter";
|
||||
}
|
||||
updatedMethodName += methodName;
|
||||
key << "BehaviorClass" << methodClass.c_str() << "methods" << updatedMethodName << "details";
|
||||
key << "BehaviorClass" << context << methodClass << "methods" << updatedMethodName << "details";
|
||||
|
||||
GraphCanvas::TranslationRequests::Details details;
|
||||
GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details);
|
||||
|
||||
Reference in New Issue
Block a user