You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
34 lines
872 B
C++
34 lines
872 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#include "MVVMConversionFunctionGraphSchema.h"
|
|
#include "Bindings/MVVMConversionFunctionHelper.h"
|
|
#include "EdGraph/EdGraphNode.h"
|
|
#include "EdGraph/EdGraphPin.h"
|
|
|
|
|
|
bool UMVVMConversionFunctionGraphSchema::TryCreateConnection(UEdGraphPin* A, UEdGraphPin* B) const
|
|
{
|
|
bool bResult = Super::TryCreateConnection(A, B);
|
|
|
|
if (bResult && !A->LinkedTo.Contains(B))
|
|
{
|
|
// ConversionNode or Promotion node was created between the 2 graph pins
|
|
if (A->LinkedTo.Num() == 1)
|
|
{
|
|
if (UEdGraphNode* AutogeneratedNode = A->LinkedTo[0]->GetOwningNode())
|
|
{
|
|
for (UEdGraphPin* AutogeneratedPin : AutogeneratedNode->Pins)
|
|
{
|
|
if (AutogeneratedPin->LinkedTo.Contains(B))
|
|
{
|
|
UE::MVVM::ConversionFunctionHelper::MarkNodeAsAutoPromote(AutogeneratedNode);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return bResult;
|
|
}
|