From 9481a87028053590030998271a40ad5ac4ace6c8 Mon Sep 17 00:00:00 2001 From: Vasilii Bulgakov Date: Sun, 26 Apr 2026 13:55:23 +0700 Subject: [PATCH 1/5] editor only pin tooltip and name --- .../Route/FlowNode_ExecutionMultiGate.cpp | 12 ++++---- Source/Flow/Public/Nodes/FlowPin.h | 30 ++++++++++++++----- .../Types/FlowDataPinBlueprintLibrary.h | 6 ++++ 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp b/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp index fb265c9ff..0d73c8c11 100644 --- a/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp +++ b/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp @@ -12,11 +12,13 @@ UFlowNode_ExecutionMultiGate::UFlowNode_ExecutionMultiGate() NodeDisplayStyle = FlowNodeStyle::Logic; #endif - FString ResetPinTooltip = TEXT("Finish work of this node."); - ResetPinTooltip += LINE_TERMINATOR; - ResetPinTooltip += TEXT("Calling In input will start triggering output pins once again."); - - InputPins.Add(FFlowPin(TEXT("Reset"), ResetPinTooltip)); + FFlowPin ResetPin(TEXT("Reset")); +#if WITH_EDITORONLY_DATA + ResetPin.PinToolTip = TEXT("Finish work of this node."); + ResetPin.PinToolTip += LINE_TERMINATOR; + ResetPin.PinToolTip += TEXT("Calling In input will start triggering output pins once again."); +#endif + InputPins.Add(ResetPin); SetNumberedOutputPins(0, 1); AllowedSignalModes = {EFlowSignalMode::Enabled, EFlowSignalMode::Disabled}; } diff --git a/Source/Flow/Public/Nodes/FlowPin.h b/Source/Flow/Public/Nodes/FlowPin.h index 3d5f91edb..03ab793e4 100644 --- a/Source/Flow/Public/Nodes/FlowPin.h +++ b/Source/Flow/Public/Nodes/FlowPin.h @@ -26,12 +26,20 @@ struct FLOW_API FFlowPin UPROPERTY(EditDefaultsOnly, Category = FlowPin) FName PinName; - /* An optional Display Name, you can use it to override PinName without the need to update graph connections. */ +#if WITH_EDITORONLY_DATA + /* + * Editor Only + * An optional Display Name, you can use it to override PinName without the need to update graph connections. + */ UPROPERTY(EditDefaultsOnly, Category = FlowPin) FText PinFriendlyName; + /* + * Editor Only + */ UPROPERTY(EditDefaultsOnly, Category = FlowPin) FString PinToolTip; +#endif /* Deprecated PinType, use PinTypeName instead (all standard names are defined in FFlowPinTypeNamesStandard). */ UPROPERTY(Meta = (DeprecatedProperty, DeprecationMessage = "Use PinTypeName instead")) @@ -90,16 +98,19 @@ struct FLOW_API FFlowPin : PinName(FName(*FString::FromInt(InPinName))) { } - - explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName) + + explicit FFlowPin(const FStringView InPinName, const FString& InPinTooltip) : PinName(InPinName) - , PinFriendlyName(InPinFriendlyName) +#if WITH_EDITORONLY_DATA + , PinToolTip(InPinTooltip) +#endif { } - - explicit FFlowPin(const FStringView InPinName, const FString& InPinTooltip) + +#if WITH_EDITORONLY_DATA + explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName) : PinName(InPinName) - , PinToolTip(InPinTooltip) + , PinFriendlyName(InPinFriendlyName) { } @@ -130,6 +141,7 @@ struct FLOW_API FFlowPin SetPinTypeName(InTypeName); SetPinSubCategoryObject(OptionalSubCategoryObject); } +#endif explicit FFlowPin(const FName& InPinName, const FFlowPinTypeName& InTypeName, UObject* OptionalSubCategoryObject = nullptr) : PinName(InPinName) @@ -168,8 +180,10 @@ struct FLOW_API FFlowPin // Do a deep pin match (not a simple name-only match), to check if the pins are exactly equal return PinName == Other.PinName && - PinFriendlyName.EqualTo(Other.PinFriendlyName) && +#if WITH_EDITORONLY_DATA + PinFriendlyName.EqualTo(Other.PinFriendlyName) && PinToolTip == Other.PinToolTip && +#endif ContainerType == Other.ContainerType && PinTypeName == Other.PinTypeName && PinSubCategoryObject == Other.PinSubCategoryObject; diff --git a/Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h b/Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h index a95921452..a8a30e2f4 100644 --- a/Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h +++ b/Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h @@ -34,15 +34,21 @@ class UFlowDataPinBlueprintLibrary : public UBlueprintFunctionLibrary UFUNCTION(BlueprintPure, Category = FlowPin, Meta = (BlueprintThreadSafe, DisplayName = "Make Flow Pin")) static UPARAM(DisplayName = "Flow Pin") FFlowPin MakeStruct(FName PinName, FText PinFriendlyName, FString PinToolTip) { +#if WITH_EDITOR return FFlowPin(PinName, PinFriendlyName, PinToolTip); +#else + return FFlowPin(PinName); +#endif } UFUNCTION(BlueprintPure, Category = FlowPin, Meta = (BlueprintThreadSafe, DisplayName = "Break Flow Pin")) static void BreakStruct(UPARAM(DisplayName = "Flow Pin") FFlowPin Ref, FName& OutPinName, FText& OutPinFriendlyName, FString& OutPinToolTip) { OutPinName = Ref.PinName; +#if WITH_EDITOR OutPinFriendlyName = Ref.PinFriendlyName; OutPinToolTip = Ref.PinToolTip; +#endif } /** From 718df49a21eb3b7c27dd0fcd29bf0576662b8495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Justy=C5=84ski?= Date: Tue, 14 Jul 2026 17:10:54 +0200 Subject: [PATCH 2/5] change integrated with recent addition of constructors --- Source/Flow/Public/Nodes/FlowPin.h | 122 +++++++++++++++++++++-------- 1 file changed, 89 insertions(+), 33 deletions(-) diff --git a/Source/Flow/Public/Nodes/FlowPin.h b/Source/Flow/Public/Nodes/FlowPin.h index 03ab793e4..ff5dc3b56 100644 --- a/Source/Flow/Public/Nodes/FlowPin.h +++ b/Source/Flow/Public/Nodes/FlowPin.h @@ -74,80 +74,138 @@ struct FLOW_API FFlowPin { } - explicit FFlowPin(const FString& InPinName) - : PinName(*InPinName) + explicit FFlowPin(const FName& InPinName, const FText& InPinFriendlyName) + : PinName(InPinName) +#if WITH_EDITORONLY_DATA + , PinFriendlyName(InPinFriendlyName) +#endif { } - explicit FFlowPin(const FText& InPinName) - : PinName(*InPinName.ToString()) + explicit FFlowPin(const FName& InPinName, const FText& InPinFriendlyName, const FString& InPinTooltip) + : PinName(InPinName) +#if WITH_EDITORONLY_DATA + , PinFriendlyName(InPinFriendlyName) + , PinToolTip(InPinTooltip) +#endif { } - explicit FFlowPin(const TCHAR* InPinName) - : PinName(FName(InPinName)) + explicit FFlowPin(const FName& InPinName, const FText& InPinFriendlyName, const FFlowPinTypeName& InTypeName, UObject* OptionalSubCategoryObject = nullptr) + : PinName(InPinName) +#if WITH_EDITORONLY_DATA + , PinFriendlyName(InPinFriendlyName) +#endif { + SetPinTypeName(InTypeName); + SetPinSubCategoryObject(OptionalSubCategoryObject); } - explicit FFlowPin(const uint8& InPinName) - : PinName(FName(*FString::FromInt(InPinName))) + explicit FFlowPin(const FName& InPinName, const FFlowPinTypeName& InTypeName, UObject* OptionalSubCategoryObject = nullptr) + : PinName(InPinName) { + SetPinTypeName(InTypeName); + SetPinSubCategoryObject(OptionalSubCategoryObject); } - explicit FFlowPin(const int32& InPinName) - : PinName(FName(*FString::FromInt(InPinName))) + explicit FFlowPin(const FStringView InPinName) + : PinName(InPinName) { } - - explicit FFlowPin(const FStringView InPinName, const FString& InPinTooltip) + + explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName) : PinName(InPinName) #if WITH_EDITORONLY_DATA - , PinToolTip(InPinTooltip) + , PinFriendlyName(InPinFriendlyName) #endif { } - -#if WITH_EDITORONLY_DATA - explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName) + + explicit FFlowPin(const FStringView InPinName, const FString& InPinTooltip) : PinName(InPinName) - , PinFriendlyName(InPinFriendlyName) +#if WITH_EDITORONLY_DATA + , PinToolTip(InPinTooltip) +#endif { } explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName, const FString& InPinTooltip) : PinName(InPinName) +#if WITH_EDITORONLY_DATA , PinFriendlyName(InPinFriendlyName) , PinToolTip(InPinTooltip) +#endif { } - explicit FFlowPin(const FName& InPinName, const FText& InPinFriendlyName) - : PinName(InPinName) + explicit FFlowPin(const FText& InPinName) + : PinName(InPinName.ToString()) + { + } + + explicit FFlowPin(const FText& InPinName, const FText& InPinFriendlyName) + : PinName(InPinName.ToString()) +#if WITH_EDITORONLY_DATA , PinFriendlyName(InPinFriendlyName) +#endif { } - explicit FFlowPin(const FName& InPinName, const FText& InPinFriendlyName, const FString& InPinTooltip) - : PinName(InPinName) + explicit FFlowPin(const FText& InPinName, const FString& InPinTooltip) + : PinName(InPinName.ToString()) +#if WITH_EDITORONLY_DATA + , PinToolTip(InPinTooltip) +#endif + { + } + + explicit FFlowPin(const FText& InPinName, const FText& InPinFriendlyName, const FString& InPinTooltip) + : PinName(InPinName.ToString()) +#if WITH_EDITORONLY_DATA , PinFriendlyName(InPinFriendlyName) , PinToolTip(InPinTooltip) +#endif { } - explicit FFlowPin(const FName& InPinName, const FText& InPinFriendlyName, const FFlowPinTypeName& InTypeName, UObject* OptionalSubCategoryObject = nullptr) + explicit FFlowPin(const TCHAR* InPinName) + : PinName(InPinName) + { + } + + explicit FFlowPin(const TCHAR* InPinName, const FText& InPinFriendlyName) : PinName(InPinName) +#if WITH_EDITORONLY_DATA , PinFriendlyName(InPinFriendlyName) +#endif { - SetPinTypeName(InTypeName); - SetPinSubCategoryObject(OptionalSubCategoryObject); } + + explicit FFlowPin(const TCHAR* InPinName, const FString& InPinTooltip) + : PinName(InPinName) +#if WITH_EDITORONLY_DATA + , PinToolTip(InPinTooltip) #endif + { + } - explicit FFlowPin(const FName& InPinName, const FFlowPinTypeName& InTypeName, UObject* OptionalSubCategoryObject = nullptr) + explicit FFlowPin(const TCHAR* InPinName, const FText& InPinFriendlyName, const FString& InPinTooltip) : PinName(InPinName) +#if WITH_EDITORONLY_DATA + , PinFriendlyName(InPinFriendlyName) + , PinToolTip(InPinTooltip) +#endif + { + } + + explicit FFlowPin(const uint8& InPinName) + : PinName(FName(*FString::FromInt(InPinName))) + { + } + + explicit FFlowPin(const int32& InPinName) + : PinName(FName(*FString::FromInt(InPinName))) { - SetPinTypeName(InTypeName); - SetPinSubCategoryObject(OptionalSubCategoryObject); } FORCEINLINE bool IsValid() const @@ -178,10 +236,10 @@ struct FLOW_API FFlowPin bool DeepIsEqual(const FFlowPin& Other) const { // Do a deep pin match (not a simple name-only match), to check if the pins are exactly equal - return + return PinName == Other.PinName && #if WITH_EDITORONLY_DATA - PinFriendlyName.EqualTo(Other.PinFriendlyName) && + PinFriendlyName.EqualTo(Other.PinFriendlyName) && PinToolTip == Other.PinToolTip && #endif ContainerType == Other.ContainerType && @@ -195,12 +253,11 @@ struct FLOW_API FFlowPin } public: - #if WITH_EDITOR FText BuildHeaderText() const; static bool ValidateEnum(const UEnum& EnumType); - + FEdGraphPinType BuildEdGraphPinType() const; void ConfigureFromEdGraphPin(const FEdGraphPinType& EdGraphPinType); #endif @@ -220,7 +277,7 @@ struct FLOW_API FFlowPin // -- // - + /** * Metadata keys for properties that bind and auto-generate Data Pins. */ @@ -265,7 +322,6 @@ struct FLOW_API FFlowPin // -- protected: - void TrySetStructSubCategoryObjectFromPinType(); }; From e8ee1409c6f4fb964e84d9dff7ce73a5c14969f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Justy=C5=84ski?= Date: Tue, 14 Jul 2026 17:12:33 +0200 Subject: [PATCH 3/5] Update FlowNode_ExecutionMultiGate.cpp --- Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp b/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp index 0d73c8c11..f0c0382a6 100644 --- a/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp +++ b/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp @@ -19,6 +19,7 @@ UFlowNode_ExecutionMultiGate::UFlowNode_ExecutionMultiGate() ResetPin.PinToolTip += TEXT("Calling In input will start triggering output pins once again."); #endif InputPins.Add(ResetPin); + SetNumberedOutputPins(0, 1); AllowedSignalModes = {EFlowSignalMode::Enabled, EFlowSignalMode::Disabled}; } From 45ab073c697ae89187296649366491b85287ea1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Justy=C5=84ski?= Date: Tue, 14 Jul 2026 17:14:41 +0200 Subject: [PATCH 4/5] merge fix --- Source/Flow/Public/Nodes/FlowPin.h | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Source/Flow/Public/Nodes/FlowPin.h b/Source/Flow/Public/Nodes/FlowPin.h index ff5dc3b56..8d5a32261 100644 --- a/Source/Flow/Public/Nodes/FlowPin.h +++ b/Source/Flow/Public/Nodes/FlowPin.h @@ -1,20 +1,15 @@ // Copyright https://github.com/MothCocoon/FlowGraph/graphs/contributors #pragma once -#include "Types/FlowPinEnums.h" -#include "Types/FlowPinTypeName.h" - +#include "EdGraph/EdGraphPin.h" #include "Templates/SubclassOf.h" #include "UObject/ObjectMacros.h" -#include "Types/FlowPinTypeNamesStandard.h" -#include "EdGraph/EdGraphPin.h" +#include "Types/FlowPinEnums.h" +#include "Types/FlowPinTypeName.h" +#include "Types/FlowPinTypeNamesStandard.h" #include "FlowPin.generated.h" -class UEnum; -class UClass; -class UObject; -class IPropertyHandle; struct FFlowPinType; USTRUCT(BlueprintType, meta = (HasNativeMake = "/Script/Flow.FlowDataPinBlueprintLibrary.MakeStruct", HasNativeBreak = "/Script/Flow.FlowDataPinBlueprintLibrary.BreakStruct")) @@ -28,15 +23,11 @@ struct FLOW_API FFlowPin #if WITH_EDITORONLY_DATA /* - * Editor Only - * An optional Display Name, you can use it to override PinName without the need to update graph connections. + * Optional Display Name, you can use it to override PinName without the need to update graph connections. */ UPROPERTY(EditDefaultsOnly, Category = FlowPin) FText PinFriendlyName; - /* - * Editor Only - */ UPROPERTY(EditDefaultsOnly, Category = FlowPin) FString PinToolTip; #endif @@ -276,8 +267,6 @@ struct FLOW_API FFlowPin FORCEINLINE bool IsDataPin() const { return !IsExecPin(); } // -- - // - /** * Metadata keys for properties that bind and auto-generate Data Pins. */ From a0b1937dbdbd08b042fbb098dd3ddfebeabcadfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Justy=C5=84ski?= Date: Tue, 14 Jul 2026 17:15:27 +0200 Subject: [PATCH 5/5] shorten comment --- Source/Flow/Public/Nodes/FlowPin.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Flow/Public/Nodes/FlowPin.h b/Source/Flow/Public/Nodes/FlowPin.h index 8d5a32261..c9bd1b5b4 100644 --- a/Source/Flow/Public/Nodes/FlowPin.h +++ b/Source/Flow/Public/Nodes/FlowPin.h @@ -22,9 +22,7 @@ struct FLOW_API FFlowPin FName PinName; #if WITH_EDITORONLY_DATA - /* - * Optional Display Name, you can use it to override PinName without the need to update graph connections. - */ + /* Optional Display Name, you can use it to override PinName without the need to update graph connections. */ UPROPERTY(EditDefaultsOnly, Category = FlowPin) FText PinFriendlyName;