Integrating latest 47acbe8
This commit is contained in:
@@ -20,6 +20,42 @@ namespace ScriptCanvas
|
||||
{
|
||||
namespace String
|
||||
{
|
||||
void Replace::OnInit()
|
||||
{
|
||||
// Version Conversion Code for a slot renaming.
|
||||
Slot* slot = GetSlotByName("Ignore Case");
|
||||
|
||||
if (slot)
|
||||
{
|
||||
RenameSlot((*slot), "Case Sensitive");
|
||||
|
||||
ModifiableDatumView datumView;
|
||||
ModifyUnderlyingSlotDatum(slot->GetId(), datumView);
|
||||
|
||||
if (datumView.IsValid() && datumView.IsType(ScriptCanvas::Data::Type::Boolean()))
|
||||
{
|
||||
const bool* datumValue = datumView.GetAs<ScriptCanvas::Data::BooleanType>();
|
||||
|
||||
Datum newDatum = Datum(!(*datumValue));
|
||||
datumView.AssignToDatum(newDatum);
|
||||
}
|
||||
}
|
||||
////
|
||||
}
|
||||
|
||||
void Replace::CustomizeReplacementNode(Node* replacementNode, AZStd::unordered_map<SlotId, AZStd::vector<SlotId>>& outSlotIdMap) const
|
||||
{
|
||||
auto newDataOutSlots = replacementNode->GetSlotsByType(ScriptCanvas::CombinedSlotType::DataOut);
|
||||
auto oldDataOutSlots = this->GetSlotsByType(ScriptCanvas::CombinedSlotType::DataOut);
|
||||
if (newDataOutSlots.size() == oldDataOutSlots.size())
|
||||
{
|
||||
for (size_t index = 0; index < newDataOutSlots.size(); index++)
|
||||
{
|
||||
outSlotIdMap.emplace(oldDataOutSlots[index]->GetId(), AZStd::vector<SlotId>{ newDataOutSlots[index]->GetId() });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Replace::OnInputSignal(const SlotId&)
|
||||
{
|
||||
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvas::Replace::OnInputSignal");
|
||||
|
||||
Reference in New Issue
Block a user