Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions Source/Flow/Private/Nodes/FlowNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,17 +1042,6 @@ FString UFlowNode::GetProgressAsString(const float Value)
return FString::Printf(TEXT("%.*f"), 2, Value);
}

#if WITH_EDITOR
UFlowNode* UFlowNode::GetInspectedInstance() const
{
if (const UFlowAsset* FlowInstance = GetFlowAsset()->GetInspectedInstance())
{
return FlowInstance->GetNode(GetGuid());
}

return nullptr;
}

FString UFlowNode::GetStatusStringForNodeAndAddOns() const
{
FString CombinedStatusString = GetStatusString();
Expand All @@ -1079,6 +1068,17 @@ FString UFlowNode::GetStatusStringForNodeAndAddOns() const
return CombinedStatusString;
}

#if WITH_EDITOR
UFlowNode* UFlowNode::GetInspectedInstance() const
{
if (const UFlowAsset* FlowInstance = GetFlowAsset()->GetInspectedInstance())
{
return FlowInstance->GetNode(GetGuid());
}

return nullptr;
}

bool UFlowNode::GetStatusBackgroundColor(FLinearColor& OutColor) const
{
return K2_GetStatusBackgroundColor(OutColor);
Expand Down
2 changes: 1 addition & 1 deletion Source/Flow/Private/Nodes/FlowNodeBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ TArray<FFlowPin> UFlowNodeBase::GetContextOutputs() const

return ContextOutputs;
}
#endif // WITH_EDITOR

FString UFlowNodeBase::GetStatusString() const
{
return K2_GetStatusString();
}
#endif // WITH_EDITOR

UFlowAsset* UFlowNodeBase::GetFlowAsset() const
{
Expand Down
5 changes: 3 additions & 2 deletions Source/Flow/Public/Nodes/FlowNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@ class FLOW_API UFlowNode
TMap<uint8, FPinRecord> GetWireRecords() const;
TArray<FPinRecord> GetPinRecords(const FName& PinName, const EEdGraphPinDirection PinDirection) const;

// Information displayed while node is working - displayed over node as NodeInfoPopup
FString GetStatusStringForNodeAndAddOns() const;
virtual bool GetStatusBackgroundColor(FLinearColor& OutColor) const;

virtual FString GetAssetPath();
Expand Down Expand Up @@ -416,6 +414,9 @@ class FLOW_API UFlowNode

UFUNCTION(BlueprintPure, Category = "FlowNode")
static FString GetProgressAsString(float Value);

// Information displayed while node is working - displayed over node as NodeInfoPopup
FString GetStatusStringForNodeAndAddOns() const;
};

// Templates & inline implementations:
Expand Down
7 changes: 3 additions & 4 deletions Source/Flow/Public/Nodes/FlowNodeBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,13 @@ class FLOW_API UFlowNodeBase
// used when import graph from another asset
virtual void PostImport() {}

void RequestReconstruction() const { (void) OnReconstructionRequested.ExecuteIfBound(); }
#endif

// Called by owning FlowNode to add to its Status String.
// (may be multi-line)
virtual FString GetStatusString() const;

void RequestReconstruction() const { (void) OnReconstructionRequested.ExecuteIfBound(); };

#endif

protected:
// Information displayed while node is working - displayed over node as NodeInfoPopup
UFUNCTION(BlueprintImplementableEvent, Category = "FlowNode", meta = (DisplayName = "Get Status String"))
Expand Down