diff --git a/Source/Flow/Private/Nodes/FlowNodeBase.cpp b/Source/Flow/Private/Nodes/FlowNodeBase.cpp index 56360b9a..eee26960 100644 --- a/Source/Flow/Private/Nodes/FlowNodeBase.cpp +++ b/Source/Flow/Private/Nodes/FlowNodeBase.cpp @@ -730,6 +730,20 @@ FString UFlowNodeBase::GetNodeDescription() const return K2_GetNodeDescription(); } +FString UFlowNodeBase::GetNodeDescriptionWithAddons() const +{ + FString Description = GetNodeDescription(); + FString AddonDescriptions = FString::JoinBy(AddOns, + LINE_TERMINATOR, + [](const UFlowNodeBase* Addon) { return Addon->GetNodeDescriptionWithAddons(); }); + if (!AddonDescriptions.IsEmpty()) + { + return Description.Append(LINE_TERMINATOR).Append(AddonDescriptions); + } + + return Description; +} + bool UFlowNodeBase::CanModifyFlowDataPinType() const { return !IsPlacedInFlowAsset() || IsFlowNamedPropertiesSupplier(); diff --git a/Source/Flow/Public/Nodes/FlowNodeBase.h b/Source/Flow/Public/Nodes/FlowNodeBase.h index ef8fb500..ae52d645 100644 --- a/Source/Flow/Public/Nodes/FlowNodeBase.h +++ b/Source/Flow/Public/Nodes/FlowNodeBase.h @@ -456,6 +456,9 @@ class FLOW_API UFlowNodeBase public: // Short summary of node's content - displayed over node as NodeInfoPopup virtual FString GetNodeDescription() const; + + // Complex summary of node's content including its addons + FString GetNodeDescriptionWithAddons() const; #endif protected: diff --git a/Source/FlowEditor/Private/Graph/Nodes/FlowGraphNode.cpp b/Source/FlowEditor/Private/Graph/Nodes/FlowGraphNode.cpp index 9864a54e..362335d2 100644 --- a/Source/FlowEditor/Private/Graph/Nodes/FlowGraphNode.cpp +++ b/Source/FlowEditor/Private/Graph/Nodes/FlowGraphNode.cpp @@ -735,6 +735,10 @@ FString UFlowGraphNode::GetNodeDescription() const { if (NodeInstance && (GEditor->PlayWorld == nullptr || UFlowGraphEditorSettings::Get()->bShowNodeDescriptionWhilePlaying)) { + if (UFlowGraphEditorSettings::Get()->bShowAddonNodeDescriptions) + { + return NodeInstance->GetNodeDescriptionWithAddons(); + } return NodeInstance->GetNodeDescription(); } diff --git a/Source/FlowEditor/Public/Graph/FlowGraphEditorSettings.h b/Source/FlowEditor/Public/Graph/FlowGraphEditorSettings.h index 8695702c..8e558d12 100644 --- a/Source/FlowEditor/Public/Graph/FlowGraphEditorSettings.h +++ b/Source/FlowEditor/Public/Graph/FlowGraphEditorSettings.h @@ -57,6 +57,10 @@ class FLOWEDITOR_API UFlowGraphEditorSettings : public UDeveloperSettings UPROPERTY(config, EditAnywhere, Category = "Nodes", meta = (EditCondition = "bShowSubGraphPreview")) FVector2D SubGraphPreviewSize; + + // Display descriptions from attached addons in node descriptions + UPROPERTY(EditAnywhere, config, Category = "Nodes") + bool bShowAddonNodeDescriptions = true; /** Enable hot reload for native flow nodes? * WARNING: hot reload can easily crash the editor and you can lose progress */