UK2Node

Abstract base class of all blueprint graph nodes.

Unreal Engine C++ API Reference > Editor > BlueprintGraph

Inheritance Hierarchy

References

   
Module BlueprintGraph
Header /Engine/Source/Editor/BlueprintGraph/Classes/K2Node.h
Include #include "K2Node.h"

Syntax

class UK2Node : public [UEdGraphNode](API\Runtime\Engine\EdGraph\UEdGraphNode)  

Remarks

Abstract base class of all blueprint graph nodes.

Constructors

Type Name Description
  UK2Node ( const FObjectInitializer& ObjectIn... )  

Functions

Type Name Description
bool AllowMultipleSelfs ( bool bInputAsArray )  
void BroadcastUserDefinedPinRenamed ( FName OldName, FName NewName ) Attempt to broadcast an event for a user-defined pin being renamed on this node
bool CanEverInsertExecutionPin () Return whether the node's execution pins should support the insert execution pin action
bool CanEverRemoveExecutionPin () Return whether the node's execution pins should support the remove execution pin action
bool CanPlaceBreakpoints () Returns whether this node can have breakpoints placed on it in the debugger
void ClearCachedBlueprintData ( UBlueprint* Blueprint ) Clears out any cached data that needs to be regenerated after a structural blueprint change
void ConvertDeprecatedNode ( UEdGraph* Graph, bool bOnlySafeChanges ) Performs a node-specific deprecation fixup, which may delete this node and replace it with another one
FNodeHandlin... CreateNodeHandler ( FKismetCompilerContext& CompilerCo... )  
bool CreatePinsForFunctionEntryExit ( const UFunction* Function, bool bForFunctionEntry ) Creates the pins required for a function entry or exit node (only inputs as outputs or outputs as inputs respectively)
void DestroyPinList ( TArray< UEdGraphPin* >& InPin... ) Helper function to properly destroy a set of pins.
bool DoesInputWildcardPinAcceptArray ( const UEdGraphPin* Pin )  
bool DoesOutputWildcardPinAcceptContainer ( const UEdGraphPin* Pin )  
bool DoesWildcardPinAcceptContainer ( const UEdGraphPin* Pin )  
ERedirectTyp... DoPinsMatchForReconstruction ( const UEdGraphPin* NewPin, int32 NewPinIndex, const UEdGraphPin* OldPin, int32 OldPinIndex ) Whether or not two pins match for purposes of reconnection after reconstruction.
bool DrawNodeAsEntry () Return whether to draw this node as an entry
bool DrawNodeAsExit () Return whether to draw this node as an entry
bool DrawNodeAsVariable () Return whether to draw this node as a small variable node
void EarlyValidation ( FCompilerResultsLog& MessageLog ) This function if used for nodes that needs CDO for validation (Called before expansion)
void ExpandNode ( FKismetCompilerContext& CompilerCo..., UEdGraph* SourceGraph ) Expands a node while compiling, which may add additional nodes or delete this node
UK2Node *... ExpandSplitPin ( FKismetCompilerContext* Compil..., UEdGraph* SourceGraph, UEdGraphPin* Pin )  
void ExpandSplitPins ( FKismetCompilerContext& CompilerCo..., UEdGraph* SourceGraph ) Helper function for ExpandNode(), allowing other contexts to call pin expansion alone
void FixupPinDefaultValues () Handle backwards compatible fixes on load
void FixupPinStringDataReferences ( FArchive* SavingArchive ) Fixes up structure/soft object ref pins, on both save and load
UBlueprint &... GetBlueprint () Get the Blueprint object to which this node belongs
UClass * GetBlueprintClassFromNode () Util to get the generated class from a node.
FText GetCompactNodeTitle () Return title if drawing this node in 'compact' mode
FName GetCornerIcon ()  
UClass * GetDynamicBindingClass () Returns which dynamic binding class (if any) to use for this node.
UEdGraphPin ... GetExecPin () Get the input execution pin of this node (if one exists)
void GetMenuActions ( FBlueprintActionDatabaseRegistrar&... ) Replacement for GetMenuEntries().
FText GetMenuCategory () Override to provide a default category for specific node types to be listed under.
void GetNodeAttributes ( TArray< TKeyValuePair< FString, FSt... ) This function returns an arbitrary number of attributes that describe this node for analytics events
int32 GetNodeRefreshPriority ()  
void GetRedirectPinNames ( const UEdGraphPin& Pin, TArray< FString >& RedirectPinName... ) Determines what the possible redirect pin names are
AActor * GetReferencedLevelActor () If this node references an actor in the level that should be selectable by "Find Actors In Level," this will return a reference to that actor
FBlueprintNo... GetSignature () Retrieves a unique identifier for this node type.
UEdGraphPin ... GetThenPin () Get the output then pin of this node (if one exists)
FText GetToolTipHeading ()  
void HandleVariableRenamed ( UBlueprint* InBlueprint, UClass* InVariableClass, UEdGraph* InGraph, const FName& InOldVarName, const FName& InNewVarName ) Handle when a variable is renamed in the Blueprint Palette
bool HasValidBlueprint () Return true if this node has a valid blueprint outer, or false otherwise.
void InsertNewNode ( UEdGraphPin* FromPin, UEdGraphPin* NewLinkPin, TSet< UEdGraphNode* >& OutNod... ) Handles inserting the node between the FromPin and what the FromPin was original connected to
bool IsActionFilteredOut ( FBlueprintActionFilter const& Filt... ) Determine if the node of this type should be filtered in the actions menu
bool IsConnectionDisallowed ( const UEdGraphPin* MyPin, const UEdGraphPin* OtherPin, FString& OutReason )  
bool IsNodePure () Returns whether this node is considered 'pure' by the compiler
bool IsNodeRootSet () Query if this node should be kept as part of the root set during the pruning stage of compilation.
bool IsNodeSafeToIgnore () Query if this is a node that is safe to ignore (e.g., a comment node or other non-structural annotation that can be pruned with no warnings).
void Message_Error ( const FString& Message, ArgTypes... Args )  
void Message_Note ( const FString& Message, ArgTypes... Args ) Sends a message to the owning blueprint's CurrentMessageLog, if there is one available.
void Message_Warn ( const FString& Message, ArgTypes... Args )  
bool NodeCausesStructuralBlueprintChange () Return true if adding/removing this node requires calling MarkBlueprintAsStructurallyModified on the Blueprint
void NotifyPinConnectionListChanged ( UEdGraphPin* Pin ) Called when the connection list of one of the pins of this node is changed in the editor, after the pin has had it's literal cleared
FOnUserDefin... OnUserDefinedPinRenamed () Retrieves a delegate that is called when a user-defined pin on this node is renamed
void PostReconstructNode () Called at the end of ReconstructNode, allows node specific work to be performed
void PreloadObject ( UObject* ReferencedObject ) Ensures the specified object is preloaded. ReferencedObject can be NULL.
void PreloadRequiredAssets () Called before compilation begins, giving a blueprint time to force the linker to load data
void ReallocatePinsDuringReconstruction ( TArray< UEdGraphPin* >& OldPi... ) Reallocate pins during reconstruction; by default ignores the old pins and calls AllocateDefaultPins() If you override this to create additional pins you likely need to call RestoreSplitPins to restore any pins that have been split (e.g. a vector pin split into its components)
void ReconstructSinglePin ( UEdGraphPin* NewPin, UEdGraphPin* OldPin, ERedirectType RedirectType ) Handles the actual reconstruction (copying data, links, name, etc...) from two pins that have already been matched together.
bool ReferencesFunction ( const FName& InFunctionName, const UStruct* InScope ) Return whether this node references the specified function, identified by a name and guid pair
bool ReferencesVariable ( const FName& InVarName, const UStruct* InScope ) Return whether this node references the specified variable, give the supplied scope.
void RegisterDynamicBinding ( UDynamicBlueprintBinding* Bind... ) Puts information about this node into the dynamic binding object.
ERenamePinRe... RenameUserDefinedPin ( const FName OldName, const FName NewName, bool bTest ) Renames a user defined pin and broadcasts the result to any OnUserDefinedPinRenamed listeners on success (if bTest is false)
ERenamePinRe... RenameUserDefinedPinImpl ( const FName OldName, const FName NewName, bool bTest ) Implementation function that renames an existing pin on the node. Does not broadcast notifications.
void ReplaceReferences ( UBlueprint* InBlueprint, UBlueprint* InReplacementBluep..., const FMemberReference& InSource, const FMemberReference& InReplacem... ) Replace any member references of source with replacement
void RestoreSplitPins ( TArray< UEdGraphPin* >& OldPi... ) Helper function to restore Split Pins after ReallocatePinsDuringReconstruction, call after recreating all pins to restore split pin state.
void RewireOldPinsToNewPins ( TArray< UEdGraphPin* >& InOld..., TArray< UEdGraphPin* >& InNew..., TMap< UEdGraphPin*, UEdGraphPi... ) Helper function to rewire old pins to new pins during node reconstruction (or other regeneration of pins)
bool ShouldDrawAsBead () Should draw as a bead with no location of it's own
bool ShouldDrawCompact () Should draw compact
ERedirectTyp... ShouldRedirectParam ( const TArray< FString >& OldPinNam..., FName& NewPinName, const UK2Node* NewPinNode ) Searches ParamRedirect Map and find if there is matching new paramreturns the redirect type
bool ShouldShowNodeProperties () Return whether the node's properties display in the blueprint details panel

Overridden from UEdGraphNode

Type Name Description
void AutowireNewNode ( UEdGraphPin* FromPin ) Autowire a newly created node.
bool CanCreateUnderSpecifiedSchema ( const UEdGraphSchema* DesiredS... ) Can this node be created under the specified schema.
bool CanJumpToDefinition () Returns true if it is possible to jump to the definition of this node (e.g., if it's a variable get or a function call)
bool CanSplitPin ( const UEdGraphPin* Pin ) Whether or not struct pins belonging to this node should be allowed to be split or not.
FString GetDocumentationLink () Returns the link used for external documentation for the graph node
UObject *... GetJumpTargetForDoubleClick () Returns the object that should be focused when double-clicking on this node (the object can be an actor, which selects it in the world, or a node/graph/pin)
FLinearColor GetNodeTitleColor () Gets the draw color of a node's title bar
UEdGraphPin ... GetPassThroughPin ( const UEdGraphPin* FromPin ) Return the matching "pass-through" pin for the given pin (if supported by this node)
void GetPinHoverText ( const UEdGraphPin& Pin, FString& HoverTextOut ) Fetch the hover text for a pin when the graph is being edited.
FString GetPinMetaData ( FName InPinName, FName InKey ) Return the requested metadata for the pin if there is any
bool IsInDevelopmentMode () Determines whether or not the node will compile in development mode.
void JumpToDefinition () Jump to the definition of this node (should only be called if CanJumpToDefinition() return true)
void PinConnectionListChanged ( UEdGraphPin* Pin ) Called when the connection list of one of the pins of this node is changed in the editor
void ReconstructNode () Refresh the connectors on a node, preserving as many connections as it can.
bool ShowPaletteIconOnNode () Should we show the Palette Icon for this node on the node title
void ValidateNodeDuringCompilation ( FCompilerResultsLog& MessageLog ) Gives each visual node a chance to do final validation before it's node is harvested for use at runtime.

Overridden from UObject

Type Name Description
bool HasNonEditorOnlyReferences () Called during saving to determine if the object's references are used in game even when the object itself is never loaded outside the editor (because e.g. its references are followed during cooking)
void PostLoad () Do any object-specific cleanup required immediately after loading an object.
void PreEditChange ( FProperty* PropertyAboutToChan... ) This is called when a property is about to be modified externally
void Serialize ( FArchive& Ar ) Handles reading, writing, and reference collecting using FArchive.

Enums

Type Name Description
Public enum EBaseNodeRefreshPriority  
Protected enum ERedirectType  

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library