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

Method TryResolveDataPin

Source/Flow/Private/Nodes/FlowNodeBase.cpp:1017–1048  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1015}
1016
1017FFlowDataPinResult UFlowNodeBase::TryResolveDataPin(FName PinName) const
1018{
1019 FFlowDataPinResult DataPinResult(EFlowDataPinResolveResult::Success);
1020
1021 const UFlowNode* FlowNode = GetFlowNodeSelfOrOwner();
1022 UFlowNode::TFlowPinValueSupplierDataArray PinValueSupplierDatas;
1023 if (!FlowNode->TryGetFlowDataPinSupplierDatasForPinName(PinName, PinValueSupplierDatas))
1024 {
1025 // If we could not build the PinValueDataSuppliers array,
1026 // then the pin must be disconnected and have no default value available.
1027 DataPinResult.Result = EFlowDataPinResolveResult::FailedWithError;
1028
1029 LogError(FString::Printf(TEXT("DataPin named '%s' could not be supplied with a value."), *PinName.ToString()), EFlowOnScreenMessageType::Temporary);
1030
1031 return DataPinResult;
1032 }
1033
1034 // Iterate over the suppliers in inverse order
1035 for (int32 Index = PinValueSupplierDatas.Num() - 1; Index >= 0; --Index)
1036 {
1037 const FFlowPinValueSupplierData& SupplierData = PinValueSupplierDatas[Index];
1038
1039 DataPinResult = SupplierData.PinValueSupplier->TrySupplyDataPin(SupplierData.SupplierPinName);
1040
1041 if (FlowPinType::IsSuccess(DataPinResult.Result))
1042 {
1043 return DataPinResult;
1044 }
1045 }
1046
1047 return DataPinResult;
1048}
1049
1050// #FlowDataPinLegacy
1051FFlowDataPinResult_Bool UFlowNodeBase::TryResolveDataPinAsBool(const FName& PinName) const

Callers 1

GetPinHoverTextMethod · 0.80

Calls 4

ToStringMethod · 0.80
IsSuccessFunction · 0.50
TrySupplyDataPinMethod · 0.45

Tested by

no test coverage detected