UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
DataflowEdNode.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "EdGraph/EdGraph.h"
11#include "Misc/Build.h"
12#include "Misc/Guid.h"
16
17#include "DataflowEdNode.generated.h"
18
19class FArchive;
20class UEdGraphPin;
21class UObject;
22namespace UE::Dataflow { class FGraph; class FRenderingParameters; class IDataflowConstructionViewMode; }
23namespace GeometryCollection::Facades { class FRenderingFacade; }
24
25UCLASS(MinimalAPI)
27{
29
30 FGuid DataflowNodeGuid;
32
33public:
34 virtual ~UDataflowEdNode() { UnRegisterDelegateHandle(); };
35
36 // UEdGraphNode interface
37 DATAFLOWENGINE_API virtual void AllocateDefaultPins();
38 DATAFLOWENGINE_API virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const;
39#if WITH_EDITOR && !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
41#endif // WITH_EDITOR && !UE_BUILD_SHIPPING
42#if WITH_EDITOR
44 DATAFLOWENGINE_API virtual bool ShowPaletteIconOnNode() const override;
45 DATAFLOWENGINE_API virtual FLinearColor GetNodeTitleColor() const override;
46 DATAFLOWENGINE_API virtual FLinearColor GetNodeBodyTintColor() const override;
47 DATAFLOWENGINE_API virtual FText GetTooltipText() const override;
48 DATAFLOWENGINE_API virtual void GetPinHoverText(const UEdGraphPin& Pin, FString& HoverTextOut) const override;
49 DATAFLOWENGINE_API virtual FText GetPinDisplayName(const UEdGraphPin* Pin) const override;
50 DATAFLOWENGINE_API virtual void AutowireNewNode(UEdGraphPin* FromPin) override;
51 DATAFLOWENGINE_API virtual void OnPinRemoved(UEdGraphPin* InRemovedPin) override;
53 DATAFLOWENGINE_API virtual void PostEditUndo() override;
54 DATAFLOWENGINE_API virtual void PinDefaultValueChanged(UEdGraphPin* Pin) override;
55#endif // WITH_EDITOR
56 // End of UEdGraphNode interface
57
58 // UObject interface
60 // End UObject interface
61
62 bool IsBound() const { return DataflowGraph && DataflowNodeGuid.IsValid(); }
63
67
68 DATAFLOWENGINE_API void UpdatePinsFromDataflowNode();
69 DATAFLOWENGINE_API void UpdatePinsConnectionsFromDataflowNode();
70 DATAFLOWENGINE_API void UpdatePinsDefaultValuesFromNode();
71
72 FGuid GetDataflowNodeGuid() const { return DataflowNodeGuid; }
73 DATAFLOWENGINE_API void SetDataflowNodeGuid(FGuid InGuid);
74
77
79 DATAFLOWENGINE_API void AddOptionPin();
81 DATAFLOWENGINE_API void RemoveOptionPin();
82
83 DATAFLOWENGINE_API bool PinIsCompatibleWithType(const UEdGraphPin& Pin, const FEdGraphPinType& PinType) const;
84
85#if WITH_EDITOR
86 // Pin hiding
91 DATAFLOWENGINE_API bool IsInputPinShown(FName PinName) const;
92#endif
93
94 //
95 // Node Rendering
96 //
97 DATAFLOWENGINE_API void SetShouldRenderNode(bool bInRender);
98 bool ShouldRenderNode() const { return bRenderInAssetEditor; }
99
100 DATAFLOWENGINE_API void SetShouldWireframeRenderNode(bool bInRender);
101 bool ShouldWireframeRenderNode() const { return bRenderWireframeInAssetEditor; }
102
103 DATAFLOWENGINE_API void SetCanEnableWireframeRenderNode(bool bInCanEnable);
104 DATAFLOWENGINE_API bool CanEnableWireframeRenderNode() const;
105
107
108 DATAFLOWENGINE_API void RegisterDelegateHandle();
109 DATAFLOWENGINE_API void UnRegisterDelegateHandle();
110
111 DATAFLOWENGINE_API bool HasAnyWatchedConnection() const;
112 DATAFLOWENGINE_API bool IsConnectionWatched(const FDataflowConnection& Connection) const;
113 DATAFLOWENGINE_API void WatchConnection(const FDataflowConnection& Connection, bool Value);
114
115 DATAFLOWENGINE_API bool IsPinWatched(const UEdGraphPin* Pin) const;
116 DATAFLOWENGINE_API void WatchPin(const UEdGraphPin* Pin, bool bWatch);
117
118 DATAFLOWENGINE_API static FDataflowConnection* GetConnectionFromPin(const UEdGraphPin* Pin);
119 DATAFLOWENGINE_API static TSharedPtr<FDataflowNode> GetDataflowNodeFromEdNode(UEdGraphNode* EdNode);
120 DATAFLOWENGINE_API static TSharedPtr<const FDataflowNode> GetDataflowNodeFromEdNode(const UEdGraphNode* EdNode);
121
122#if WITH_EDITOR
124#endif
125
126private:
127
128#if WITH_EDITOR && !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
130#endif
131
132 void ScheduleNodeInvalidation();
133
135 bool bEditablePinReentranceGuard = false;
136
138 bool bRenderInAssetEditor = false;
139
141 bool bRenderWireframeInAssetEditor = false;
142
144 bool bCanEnableRenderWireframe = true;
145
146 // Store Guids from connection being watched (display values of corresponding output)
147 TArray<FGuid> WatchedConnections;
148
149 void RemoveSpacesInAllPinTypes();
150
151 FDelegateHandle OnNodeInvalidatedDelegateHandle;
152};
153
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition Archive.h:1208
Definition IDelegateInstance.h:14
Definition NameTypes.h:617
Definition Text.h:385
Definition Array.h:670
Definition SharedPointer.h:692
Definition DataflowEdNode.h:27
bool ShouldWireframeRenderNode() const
Definition DataflowEdNode.h:101
bool IsBound() const
Definition DataflowEdNode.h:62
FGuid GetDataflowNodeGuid() const
Definition DataflowEdNode.h:72
void SetDataflowGraph(TSharedPtr< UE::Dataflow::FGraph > InDataflowGraph)
Definition DataflowEdNode.h:66
TSharedPtr< const UE::Dataflow::FGraph > GetDataflowGraph() const
Definition DataflowEdNode.h:65
virtual ~UDataflowEdNode()
Definition DataflowEdNode.h:34
bool ShouldRenderNode() const
Definition DataflowEdNode.h:98
TSharedPtr< UE::Dataflow::FGraph > GetDataflowGraph()
Definition DataflowEdNode.h:64
Definition EdGraphNode.h:289
Definition EdGraphPin.h:294
Definition Object.h:95
Type
Definition EdGraphNode.h:136
Definition CollectionBoundsFacade.cpp:13
Definition DataflowAnyType.cpp:10
Definition DataflowConnection.h:131
Definition EdGraphPin.h:77
Definition Guid.h:109
bool IsValid() const
Definition Guid.h:318
Definition Color.h:48
Definition SlateIcon.h:13
Definition DataflowConnection.h:28