MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / TrySupplyDataPin

Method TrySupplyDataPin

Source/Flow/Private/Nodes/Route/FlowNode_Reroute.cpp:41–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39#endif
40
41FFlowDataPinResult UFlowNode_Reroute::TrySupplyDataPin(FName PinName) const
42{
43 const FFlowPin* InputPin = FindInputPinByName(UFlowNode::DefaultInputPin.PinName);
44 if (!InputPin)
45 {
46 return FFlowDataPinResult(EFlowDataPinResolveResult::FailedUnknownPin);
47 }
48
49 FGuid FoundGuid;
50 FName ConnectedPinName;
51 if (!IsInputConnected(*InputPin, &FoundGuid, &ConnectedPinName))
52 {
53 return FFlowDataPinResult(EFlowDataPinResolveResult::FailedNotConnected);
54 }
55
56 const UFlowNode* ConnectedFlowNodeSupplier = GetFlowAsset()->GetNode(FoundGuid);
57 if (!IsValid(ConnectedFlowNodeSupplier))
58 {
59 checkf(IsValid(ConnectedFlowNodeSupplier), TEXT("This node should be valid if IsInputConnected returned true"));
60
61 return FFlowDataPinResult(EFlowDataPinResolveResult::FailedNotConnected);
62 }
63
64 // Hand-off to the connected flow node to supply the value
65 return ConnectedFlowNodeSupplier->TrySupplyDataPin(ConnectedPinName);
66}

Callers

nothing calls this directly

Calls 4

FindInputPinByNameFunction · 0.85
GetFlowAssetFunction · 0.85
IsValidFunction · 0.85
FFlowDataPinResultClass · 0.50

Tested by

no test coverage detected