Skip to content

USMGraphNode_Base

Module: SMSystemEditor

#include <SMGraphNode_Base.h>

Inherits from UEdGraphNode, ISMEditorGraphNodeInterface

Inherited by USMGraphNode_StateNodeBase, USMGraphNode_TransitionEdge

Description

class USMGraphNode_Base;

The abstract base graph node for Logic Driver editor graph nodes. All states and transitions in the editor graph derive from this.

Public Functions

Name
virtual void Serialize(FArchive & Ar) override
virtual void PostLoad() override
virtual ~USMGraphNode_Base() override
virtual void DestroyNode() override
virtual void PostPasteNode() override
virtual void PostEditUndo() override
virtual void PostPlacedNewNode() override
virtual TSharedPtr< INameValidatorInterface > MakeNameValidator() const override
virtual void OnRenameNode(const FString & NewName) override
virtual UObject * GetJumpTargetForDoubleClick() const override
virtual bool CanJumpToDefinition() const override
virtual void JumpToDefinition() const override
virtual bool CanCreateUnderSpecifiedSchema(const UEdGraphSchema * Schema) const override
virtual void ReconstructNode() override
virtual void PostEditChangeProperty(FPropertyChangedEvent & PropertyChangedEvent) override
virtual void PinConnectionListChanged(UEdGraphPin * Pin) override
virtual void ValidateNodeDuringCompilation(FCompilerResultsLog & MessageLog) const override
virtual TScriptInterface< ISMEditorGraphPropertyNodeInterface > GetEditorGraphProperty(FName PropertyName, const USMNodeInstance * NodeInstance, int32 ArrayIndex) const override
virtual TArray< TScriptInterface< ISMEditorGraphPropertyNodeInterface > > GetEditorGraphPropertyAsArray(FName PropertyName, const USMNodeInstance * NodeInstance, int32 ArrayIndex) const override
virtual TArray< TScriptInterface< ISMEditorGraphPropertyNodeInterface > > GetAllEditorGraphProperties(const USMNodeInstance * NodeInstance) const override
virtual USMNodeInstance * AddStackNode(TSubclassOf< USMNodeInstance > NodeClass, int32 StackIndex) override
virtual void RemoveStackNode(int32 StackIndex) override
virtual void ClearStackNodes() override
virtual FString GetNodeName() const override
virtual bool SetNodeName(const FString & NewName, FText & OutErrorMessage) override
virtual void ResetNodeName() override
virtual TScriptInterface< ISMEditorGraphNode_StateBaseInterface > AsStateBaseInterface() override
virtual void SetNodeName_Direct(const FString & InNewName)
virtual void PreCompile(FSMKismetCompilerContext & CompilerContext)
virtual void PreCompileNodeInstanceValidation(FCompilerResultsLog & CompilerContext, USMCompilerLog * CompilerLog, USMGraphNode_Base * OwningNode =nullptr)
virtual void OnCompile(FSMKismetCompilerContext & CompilerContext)
virtual void OnBoundGraphRenamed(UObject * OldOuter, const FName OldName)
virtual void ResetDebugState()
virtual void OnWidgetConstruct()
virtual void UpdateTime(float DeltaTime)
virtual void CheckSetErrorMessages()
virtual void ResetLogMessages()
void UpdateErrorMessageFromLogs()
void AddNodeLogMessage(const FSMGraphNodeLog & Message)
bool TryGetNodeLogMessage(FString & OutMessage, int32 & OutSeverity) const
virtual void OnNodeMoved(const FVector2D & NewPosition)
void SetReadOnlyNodePosition()
virtual void GoToLocalGraph() const
virtual bool CanGoToLocalGraph() const
virtual TArray< TSubclassOf< USMGraphNode_Base > > GetAllowedDuplicateNodeNameTypes() const
virtual const FGuid & GetCorrectNodeGuid(bool * bIsRunTimeGuid =nullptr) const
virtual void InitTemplate()
virtual void DestroyTemplate()
void RunAllConstructionScripts()
virtual bool CanRunConstructionScripts() const
virtual bool DoesNodePossiblyHaveConstructionScripts() const
bool IsRunningConstructionScripts() const
virtual FName GetNodeClassPropertyName() const
virtual UClass * GetNodeClass() const
virtual void SetNodeClass(UClass * Class)
UClass * GetDefaultNodeClass() const
bool IsUsingDefaultNodeClass() const
bool IsNodeClassNative() const
virtual bool IsNodeFastPathEnabled() const
virtual FName GetNodeTemplatePropertyName()
virtual FName GetNodeStackPropertyName()
virtual FName GetNodeStackElementClassPropertyName() const
USMNodeInstance * GetNodeTemplate() const
USMNodeInstance * GetNodeTemplateFromGuid(const FGuid & Guid) const
virtual bool AreTemplatesFullyLoaded() const
virtual int32 GetIndexOfTemplate(const FGuid & Guid) const
virtual USMNodeInstance * GetTemplateFromIndex(int32 Index) const
virtual void GetAllNodeTemplates(TArray< USMNodeInstance * > & OutNodeInstances) const
template \<typename T >
T *
GetNodeTemplateAs(bool bCheck =false) const
USMGraph * GetOwningStateMachineGraph() const
UEdGraph * GetBoundGraph() const
void ClearBoundGraph()
void CreateGraphPropertyGraphs(bool bGenerateNewGuids =false)
bool CreateGraphPropertyGraphsForTemplate(USMNodeInstance * Template, bool bGenerateNewGuids, TSet< FGuid > & LiveGuidsInOut, bool bResetNonVariableGuids =false)
void RemoveGraphPropertyGraphsForTemplate(USMNodeInstance * Template)
UEdGraph * GetGraphPropertyGraph(const FGuid & Guid) const
USMGraphK2Node_PropertyNode_Base * GetGraphPropertyNode(const FGuid & Guid) const
USMGraphK2Node_PropertyNode_Base * GetGraphPropertyNode(const FName & VariableName, const USMNodeInstance * TemplateMatch =nullptr, int32 Index =INDEX_NONE) const
TArray< USMGraphK2Node_PropertyNode_Base * > GetGraphPropertyNodes(const FName & VariableName, const USMNodeInstance * TemplateMatch =nullptr, int32 Index =INDEX_NONE) const
const TMap< FGuid, TObjectPtr< UEdGraph > > & GetAllPropertyGraphs() const
const TMap< FGuid, TObjectPtr< USMGraphK2Node_PropertyNode_Base > > & GetAllPropertyGraphNodes() const
TArray< USMGraphK2Node_PropertyNode_Base * > GetAllPropertyGraphNodesAsArray(const USMNodeInstance * TemplateMatch =nullptr) const
void InitPropertyGraphNodes(UEdGraph * PropertyGraph, FSMGraphProperty_Base * Property)
void RefreshAllProperties(bool bModify, bool bSetFromPinFirst =true)
void RefreshPropertyByGuid(const FGuid & Guid, bool bModify, bool bSetFromPinFirst =true)
void ForceRecreateProperties()
void SetGraphPropertyDefaultsFromPins()
void SetPinsFromGraphProperties(bool bUseArchetype)
USMGraphK2Node_PropertyNode_Base * GetPropertyNodeUnderMouse() const
virtual bool SupportsPropertyGraphs() const
virtual UEdGraphPin * GetInputPin() const
virtual UEdGraphPin * GetOutputPin() const
UEdGraphNode * GetOutputNode() const
void GetAllOutputNodes(TArray< UEdGraphNode * > & OutNodes) const
template \<typename T >
void
GetAllOutputNodesAs(TArray< T * > & OutNodes) const
virtual FLinearColor GetBackgroundColor() const
virtual FLinearColor GetActiveBackgroundColor() const
virtual const FSlateBrush * GetNodeIcon() const
virtual bool CanExistAtRuntime() const
FSMNode_Base * FindRuntimeNode() const
const FSMNode_Base * GetDebugNode() const
float GetDebugTime() const
virtual float GetMaxDebugTime() const
virtual bool IsDebugNodeActive() const
virtual bool WasDebugNodeActive() const
virtual FName GetFriendlyNodeName() const
bool ConvertToCurrentVersion(bool bOnlyOnLoad =true)
bool SetToCurrentVersion()
void ForceSetVersion(int32 NewVersion)
virtual void ImportDeprecatedProperties()
bool IsBeingPasted() const
bool IsPreCompiling() const
bool IsEditUndo() const
void RequestSlateRefresh(bool bFullRefresh =false)
virtual void ResetCachedValues()
void RecordDuplicatedNodeGuid(const FGuid & InGuid)
void NotifySwapPropertyGraphArrayElements(const FName & InPropertyName, int32 IndexA, int32 IndexB, USMNodeInstance * InNodeInstance)
void RunPreCompileValidateForNodeInstance(const USMNodeInstance * InNodeInstance, USMCompilerLog * InCompilerLog)

Protected Functions

Name
void DestroyAllPropertyGraphs()
virtual void PlaceDefaultInstanceNodes()
virtual void RunAllConstructionScripts_Internal()
virtual void RestoreArchetypeValuesPriorToConstruction()
bool IsSafeToConditionallyCompile(EPropertyChangeType::Type ChangeType) const
virtual void OnConvertToCurrentVersion(bool bOnlyOnLoad)
virtual FLinearColor Internal_GetBackgroundColor() const
const FLinearColor * GetCustomBackgroundColor(const USMNodeInstance * NodeInstance =nullptr) const
void RemovePropertyGraph(USMPropertyGraph * PropertyGraph, bool RemoveFromMaps)
void HandlePropertyGraphArrayRemoval(TArray< FSMGraphProperty_Base * > & GraphProperties, TArray< TSharedPtr< FSMGraphProperty > > & TempGraphProperties, FProperty * TargetProperty, int32 RemovalIndex, int32 ArraySize, const FSMGraphProperty * OverrideGraphProperty, USMNodeInstance * Template)
void HandlePropertyGraphArrayInsertion(TArray< FSMGraphProperty_Base * > & GraphProperties, TArray< TSharedPtr< FSMGraphProperty > > & TempGraphProperties, FProperty * TargetProperty, int32 InsertionIndex, int32 ArraySize, const FSMGraphProperty * OverrideGraphProperty, USMNodeInstance * Template, bool bDuplicate =false)
void HandlePropertyGraphArraySwap(TArray< FSMGraphProperty_Base * > & GraphProperties, int32 IndexA, int32 IndexB, USMNodeInstance * Template)
void HandleOnPropertyChangedEvent(UObject * InObject, FPropertyChangedEvent & InPropertyChangedEvent)
int32 GetLoadedVersion() const

Public Attributes

Name
bool bGenerateTemplateOnNodePlacement
uint32 bRequiresGuidRegeneration
uint32 bNeedsStateStackConversion
uint32 bTEST_ForceNoTemplateGuid
TMap< FString, bool > PropertyCategoriesExpanded

Protected Attributes

Name
bool bPostEditChangeConstructionRequiresFullRefresh
TArray< FSMGraphNodeLog > CollectedLogs
TObjectPtr< UEdGraph > BoundGraph
FVector2D NodePosition
TObjectPtr< USMNodeInstance > NodeInstanceTemplate
TMap< FGuid, TObjectPtr< UEdGraph > > GraphPropertyGraphs
TMap< FGuid, TObjectPtr< USMGraphK2Node_PropertyNode_Base > > GraphPropertyNodes
TMap< FGuid, TObjectPtr< USMNodeInstance > > GraphPropertyTemplates
TSet< FGuid > DuplicatedNodeGuids
TSharedPtr< FSlateBrush > CachedBrush
FString CachedTexture
FVector2D CachedTextureSize
FLinearColor CachedNodeTintColor
float DebugTotalTime
float MaxTimeToShowDebug
uint32 bIsDebugActive
uint32 bWasDebugActive
uint32 bIsPreCompiling
uint32 bJustPasted
uint32 bIsEditUndo
uint32 bCreatePropertyGraphsOnPropertyChange
uint32 bCreatePropertyGraphsSilently
uint32 bChangeFromRedirect

Friends

Name
class SGraphNode_BaseNode

Public Functions Documentation

function Serialize

virtual void Serialize(
    FArchive & Ar
) override

function PostLoad

virtual void PostLoad() override

function ~USMGraphNode_Base

virtual ~USMGraphNode_Base() override

function DestroyNode

virtual void DestroyNode() override

Reimplemented by: USMGraphNode_LinkStateNode::DestroyNode, USMGraphNode_StateNode::DestroyNode, USMGraphNode_StateNodeBase::DestroyNode


function PostPasteNode

virtual void PostPasteNode() override

Reimplemented by: USMGraphNode_AnyStateNode::PostPasteNode, USMGraphNode_LinkStateNode::PostPasteNode, USMGraphNode_RerouteNode::PostPasteNode, USMGraphNode_StateMachineEntryNode::PostPasteNode, USMGraphNode_StateNodeBase::PostPasteNode


function PostEditUndo

virtual void PostEditUndo() override

function PostPlacedNewNode

virtual void PostPlacedNewNode() override

Reimplemented by: USMGraphNode_AnyStateNode::PostPlacedNewNode, USMGraphNode_LinkStateNode::PostPlacedNewNode, USMGraphNode_RerouteNode::PostPlacedNewNode, USMGraphNode_StateMachineEntryNode::PostPlacedNewNode, USMGraphNode_StateNodeBase::PostPlacedNewNode


function MakeNameValidator

virtual TSharedPtr< INameValidatorInterface > MakeNameValidator() const override

function OnRenameNode

virtual void OnRenameNode(
    const FString & NewName
) override

Reimplemented by: USMGraphNode_AnyStateNode::OnRenameNode, USMGraphNode_LinkStateNode::OnRenameNode, USMGraphNode_RerouteNode::OnRenameNode, USMGraphNode_StateNodeBase::OnRenameNode


function GetJumpTargetForDoubleClick

virtual UObject * GetJumpTargetForDoubleClick() const override

Reimplemented by: USMGraphNode_LinkStateNode::GetJumpTargetForDoubleClick, USMGraphNode_RerouteNode::GetJumpTargetForDoubleClick, USMGraphNode_StateNode::GetJumpTargetForDoubleClick


function CanJumpToDefinition

virtual bool CanJumpToDefinition() const override

function JumpToDefinition

virtual void JumpToDefinition() const override

function CanCreateUnderSpecifiedSchema

virtual bool CanCreateUnderSpecifiedSchema(
    const UEdGraphSchema * Schema
) const override

function ReconstructNode

virtual void ReconstructNode() override

function PostEditChangeProperty

virtual void PostEditChangeProperty(
    FPropertyChangedEvent & PropertyChangedEvent
) override

Reimplemented by: USMGraphNode_AnyStateNode::PostEditChangeProperty, USMGraphNode_LinkStateNode::PostEditChangeProperty, USMGraphNode_StateMachineEntryNode::PostEditChangeProperty, USMGraphNode_StateNode::PostEditChangeProperty


function PinConnectionListChanged

virtual void PinConnectionListChanged(
    UEdGraphPin * Pin
) override

Reimplemented by: USMGraphNode_StateNodeBase::PinConnectionListChanged


function ValidateNodeDuringCompilation

virtual void ValidateNodeDuringCompilation(
    FCompilerResultsLog & MessageLog
) const override

function GetEditorGraphProperty

virtual TScriptInterface< ISMEditorGraphPropertyNodeInterface > GetEditorGraphProperty(
    FName PropertyName,
    const USMNodeInstance * NodeInstance,
    int32 ArrayIndex
) const override

Retrieve an exposed graph property from the node.

Parameters:

PropertyName
The name of the public property on the node.
NodeInstance
The node instance template containing the property. Generally 'this' when called from a node class. Blueprint usage will default this to the self context.
ArrayIndex
The index of the element if the property is an array.

Return: A single editor graph property. If this is an array this will be a single element in the array.

Reimplements: ISMEditorGraphNodeInterface::GetEditorGraphProperty


function GetEditorGraphPropertyAsArray

virtual TArray< TScriptInterface< ISMEditorGraphPropertyNodeInterface > > GetEditorGraphPropertyAsArray(
    FName PropertyName,
    const USMNodeInstance * NodeInstance,
    int32 ArrayIndex
) const override

Retrieve an exposed graph property as an array. This can allow all elements in an array to be returned.

Parameters:

PropertyName
The name of the public property on the node.
NodeInstance
The node instance template containing the property. Generally 'this' when called from a node class. Blueprint usage will default this to the self context.
ArrayIndex
The index of the element if the property is an array. If INDEX_NONE (-1) then all elements in the array are returned.

Return: An array of editor graph properties. This is typically a single property unless the exposed property is an array and ArrayIndex is -1.

Reimplements: ISMEditorGraphNodeInterface::GetEditorGraphPropertyAsArray


function GetAllEditorGraphProperties

virtual TArray< TScriptInterface< ISMEditorGraphPropertyNodeInterface > > GetAllEditorGraphProperties(
    const USMNodeInstance * NodeInstance
) const override

Retrieve every graph property on the node for a node instance.

Parameters:

NodeInstance
The node instance template contained in this graph node to retrieve properties from. When null all node instances on the node are searched. Blueprint usage will default this to the self context. If you need to retrieve all stack instance variables in blueprints then either iterate each stack or promote this to a local empty variable.

Return: An array of all editor graph properties.

Reimplements: ISMEditorGraphNodeInterface::GetAllEditorGraphProperties


function AddStackNode

inline virtual USMNodeInstance * AddStackNode(
    TSubclassOf< USMNodeInstance > NodeClass,
    int32 StackIndex
) override

Add a stack node to the graph node if applicable. Currently only supports state stacks.

Parameters:

NodeClass
The node class to be created.
StackIndex
The index to insert the node stack. Leave at -1 to place at the end.

Return: The stack instance created.

Note:

Instead of calling directly use the USMStateInstance methods to manipulate the state stack during construction.

Reimplements: ISMEditorGraphNodeInterface::AddStackNode

Reimplemented by: USMGraphNode_StateNode::AddStackNode


function RemoveStackNode

inline virtual void RemoveStackNode(
    int32 StackIndex
) override

Remove a stack node by index. Currently only supports state stacks.

Parameters:

StackIndex
The index to remove. Leave at -1 to remove from the end.

Note:

Instead of calling directly use the USMStateInstance methods to manipulate the state stack during construction.

Reimplements: ISMEditorGraphNodeInterface::RemoveStackNode

Reimplemented by: USMGraphNode_StateNode::RemoveStackNode


function ClearStackNodes

inline virtual void ClearStackNodes() override

Remove all nodes from the stack. Currently only supports state stacks.

Note:

Instead of calling directly use the USMStateInstance methods to manipulate the state stack during construction.

Reimplements: ISMEditorGraphNodeInterface::ClearStackNodes

Reimplemented by: USMGraphNode_StateNode::ClearStackNodes


function GetNodeName

virtual FString GetNodeName() const override

Retrieve the node name assigned in the editor. This is generally the graph name contained in the node and what is assigned to the run-time variation of the node.

Return: The node name used in the editor.

Note:

This isn't guaranteed to be the same result that USMNodeInstance::GetNodeName() returns since this method can be called before the run-time node is created. Additionally some names may later be adjusted by the compiler.

Reimplements: ISMEditorGraphNodeInterface::GetNodeName

Reimplemented by: USMGraphNode_AnyStateNode::GetNodeName, USMGraphNode_RerouteNode::GetNodeName


function SetNodeName

virtual bool SetNodeName(
    const FString & NewName,
    FText & OutErrorMessage
) override

Final implementation of interface function which performs validation. Child classes should override SetNodeName_Direct() or MakeNameValidator() if needed.

Reimplements: ISMEditorGraphNodeInterface::SetNodeName


function ResetNodeName

virtual void ResetNodeName() override

Reset a node name back to its default.

Reimplements: ISMEditorGraphNodeInterface::ResetNodeName

Reimplemented by: USMGraphNode_StateNodeBase::ResetNodeName


function AsStateBaseInterface

virtual TScriptInterface< ISMEditorGraphNode_StateBaseInterface > AsStateBaseInterface() override

Attempt to cast this to the ISMEditorGraphNode_StateBaseInterface which contains functions available to all base state type (USMGraphNode_StateNodeBase) graph nodes.

Return: Return the State Base Interface. Retrieve the underlying UObject to test validity.

Reimplements: ISMEditorGraphNodeInterface::AsStateBaseInterface


function SetNodeName_Direct

virtual void SetNodeName_Direct(
    const FString & InNewName
)

Set the name of the node without performing sanitization or validation, typically renaming the graph. Instead of calling this method SetNodeName() should be used instead.

Reimplemented by: USMGraphNode_AnyStateNode::SetNodeName_Direct


function PreCompile

virtual void PreCompile(
    FSMKismetCompilerContext & CompilerContext
)

Called during kismet pre-compile before the bound graph is copied to the consolidated event graph.

Reimplemented by: USMGraphNode_LinkStateNode::PreCompile, USMGraphNode_RerouteNode::PreCompile, USMGraphNode_StateNodeBase::PreCompile


function PreCompileNodeInstanceValidation

virtual void PreCompileNodeInstanceValidation(
    FCompilerResultsLog & CompilerContext,
    USMCompilerLog * CompilerLog,
    USMGraphNode_Base * OwningNode =nullptr
)

Called during kismet pre-compile specifically for node instances to run custom validation.

Reimplemented by: USMGraphNode_StateNode::PreCompileNodeInstanceValidation


function OnCompile

virtual void OnCompile(
    FSMKismetCompilerContext & CompilerContext
)

Called during kismet compile after this node has been cloned.

Reimplemented by: USMGraphNode_StateNode::OnCompile


function OnBoundGraphRenamed

virtual void OnBoundGraphRenamed(
    UObject * OldOuter,
    const FName OldName
)

Called after the bound graph has been renamed.

Reimplemented by: USMGraphNode_StateNodeBase::OnBoundGraphRenamed


function ResetDebugState

virtual void ResetDebugState()

Resets the local and node debug state if valid.


function OnWidgetConstruct

virtual void OnWidgetConstruct()

Called from the slate node when it is constructed.


function UpdateTime

virtual void UpdateTime(
    float DeltaTime
)

So we can pass time ticks for specific node appearance behavior.

Reimplemented by: USMGraphNode_RerouteNode::UpdateTime


function CheckSetErrorMessages

inline virtual void CheckSetErrorMessages()

Helper to set error messages that may happen before compile.


function ResetLogMessages

virtual void ResetLogMessages()

Resets collected logs.


function UpdateErrorMessageFromLogs

void UpdateErrorMessageFromLogs()

Calculate any error / info display.


function AddNodeLogMessage

void AddNodeLogMessage(
    const FSMGraphNodeLog & Message
)

Adds a log message to the collected logs.


function TryGetNodeLogMessage

bool TryGetNodeLogMessage(
    FString & OutMessage,
    int32 & OutSeverity
) const

Combine all logs into a single message and retrieve the severity. Returns false if no messages exist.


function OnNodeMoved

virtual void OnNodeMoved(
    const FVector2D & NewPosition
)

Called by slate when the node is moved.

Reimplemented by: USMGraphNode_StateNodeBase::OnNodeMoved


function SetReadOnlyNodePosition

void SetReadOnlyNodePosition()

Sets the read only position to the current node position.


function GoToLocalGraph

virtual void GoToLocalGraph() const

Jump to the local graph.


function CanGoToLocalGraph

inline virtual bool CanGoToLocalGraph() const

If this node is allowed to go to it's local graph.

Reimplemented by: USMGraphNode_RerouteNode::CanGoToLocalGraph


function GetAllowedDuplicateNodeNameTypes

inline virtual TArray< TSubclassOf< USMGraphNode_Base > > GetAllowedDuplicateNodeNameTypes() const

Return any types that this node can have duplicated node names with. An empty array means duplicate names are not allowed at all.

Reimplemented by: USMGraphNode_RerouteNode::GetAllowedDuplicateNodeNameTypes


function GetCorrectNodeGuid

virtual const FGuid & GetCorrectNodeGuid(
    bool * bIsRunTimeGuid =nullptr
) const

Return the correct guid, either from a runtime node or the graph node guid.


function InitTemplate

virtual void InitTemplate()

Instantiate a template for use as an archetype.

Reimplemented by: USMGraphNode_StateNode::InitTemplate


function DestroyTemplate

virtual void DestroyTemplate()

Transfer the template to the transient package.


function RunAllConstructionScripts

void RunAllConstructionScripts()

Runs all template construction scripts.


function CanRunConstructionScripts

inline virtual bool CanRunConstructionScripts() const

If this node can ever run construction scrips.

Reimplemented by: USMGraphNode_StateMachineEntryNode::CanRunConstructionScripts


function DoesNodePossiblyHaveConstructionScripts

virtual bool DoesNodePossiblyHaveConstructionScripts() const

Check if this node might have construction scripts.

Reimplemented by: USMGraphNode_StateNode::DoesNodePossiblyHaveConstructionScripts


function IsRunningConstructionScripts

inline bool IsRunningConstructionScripts() const

True only while construction scripts are running.


function GetNodeClassPropertyName

inline virtual FName GetNodeClassPropertyName() const

Return the correct node class property name for the node type.

Reimplemented by: USMGraphNode_StateNode::GetNodeClassPropertyName


function GetNodeClass

inline virtual UClass * GetNodeClass() const

Return the correct node class. This should be a TSubClass property in child nodes.

Reimplemented by: USMGraphNode_AnyStateNode::GetNodeClass, USMGraphNode_RerouteNode::GetNodeClass, USMGraphNode_StateMachineEntryNode::GetNodeClass, USMGraphNode_StateNode::GetNodeClass


function SetNodeClass

virtual void SetNodeClass(
    UClass * Class
)

Reimplemented by: USMGraphNode_StateNode::SetNodeClass


function GetDefaultNodeClass

UClass * GetDefaultNodeClass() const

function IsUsingDefaultNodeClass

inline bool IsUsingDefaultNodeClass() const

Checks if the node template is user created or system supplied. System supplied templates don't get stored on the CDO.


function IsNodeClassNative

bool IsNodeClassNative() const

Checks if the node class is native only.


function IsNodeFastPathEnabled

virtual bool IsNodeFastPathEnabled() const

Checks if all execution points avoid blueprint graph calls.


function GetNodeTemplatePropertyName

inline virtual FName GetNodeTemplatePropertyName()

function GetNodeStackPropertyName

inline virtual FName GetNodeStackPropertyName()

Reimplemented by: USMGraphNode_StateNode::GetNodeStackPropertyName


function GetNodeStackElementClassPropertyName

inline virtual FName GetNodeStackElementClassPropertyName() const

Reimplemented by: USMGraphNode_StateNode::GetNodeStackElementClassPropertyName


function GetNodeTemplate

inline USMNodeInstance * GetNodeTemplate() const

function GetNodeTemplateFromGuid

USMNodeInstance * GetNodeTemplateFromGuid(
    const FGuid & Guid
) const

function AreTemplatesFullyLoaded

virtual bool AreTemplatesFullyLoaded() const

Reimplemented by: USMGraphNode_StateNode::AreTemplatesFullyLoaded


function GetIndexOfTemplate

inline virtual int32 GetIndexOfTemplate(
    const FGuid & Guid
) const

Reimplemented by: USMGraphNode_StateNode::GetIndexOfTemplate


function GetTemplateFromIndex

inline virtual USMNodeInstance * GetTemplateFromIndex(
    int32 Index
) const

Reimplemented by: USMGraphNode_StateNode::GetTemplateFromIndex


function GetAllNodeTemplates

virtual void GetAllNodeTemplates(
    TArray< USMNodeInstance * > & OutNodeInstances
) const

Return every node template, starting with primary node template, followed by any stack items. All possible indices are filled so some items might be nullptr.

Reimplemented by: USMGraphNode_StateNode::GetAllNodeTemplates


function GetNodeTemplateAs

template <typename T >
inline T * GetNodeTemplateAs(
    bool bCheck =false
) const

function GetOwningStateMachineGraph

USMGraph * GetOwningStateMachineGraph() const

The state machine graph this node is placed in.


function GetBoundGraph

inline UEdGraph * GetBoundGraph() const

The graph this node owns and represents.


function ClearBoundGraph

inline void ClearBoundGraph()

Sets the bound graph to nullptr.


function CreateGraphPropertyGraphs

void CreateGraphPropertyGraphs(
    bool bGenerateNewGuids =false
)

Create graph properties for valid graph property structs or exposed properties on the node template.

Parameters:

bGenerateNewGuids
will either create new guids for struct properties or re-sync exposed properties. It will always re-sync the K2 property nodes with their containers.

function CreateGraphPropertyGraphsForTemplate

bool CreateGraphPropertyGraphsForTemplate(
    USMNodeInstance * Template,
    bool bGenerateNewGuids,
    TSet< FGuid > & LiveGuidsInOut,
    bool bResetNonVariableGuids =false
)

Create graph properties for a specific template.

Parameters:

Template
the template to create properties for.
bGenerateNewGuids
will either create new guids for struct properties or re-sync exposed properties.
LiveGuidsInOut
all active guids. Will not reset set.
bResetNonVariableGuids
resets the guid of pure graph properties by setting the template guid.

Return: true if there has been a change.


function RemoveGraphPropertyGraphsForTemplate

void RemoveGraphPropertyGraphsForTemplate(
    USMNodeInstance * Template
)

Destroy all property graphs associated with a template.


function GetGraphPropertyGraph

UEdGraph * GetGraphPropertyGraph(
    const FGuid & Guid
) const

function GetGraphPropertyNode

USMGraphK2Node_PropertyNode_Base * GetGraphPropertyNode(
    const FGuid & Guid
) const

function GetGraphPropertyNode

USMGraphK2Node_PropertyNode_Base * GetGraphPropertyNode(
    const FName & VariableName,
    const USMNodeInstance * TemplateMatch =nullptr,
    int32 Index =INDEX_NONE
) const

Search for a property node by variable name.

Parameters:

VariableName
the name of the variable.
TemplateMatch
a template who's guid will be checked against property template guid.
Index
the index to look for if this is an array property.

function GetGraphPropertyNodes

TArray< USMGraphK2Node_PropertyNode_Base * > GetGraphPropertyNodes(
    const FName & VariableName,
    const USMNodeInstance * TemplateMatch =nullptr,
    int32 Index =INDEX_NONE
) const

Search for a property node by variable name. Returns all results for the name which allows all elements of an array to be obtained.

Parameters:

VariableName
the name of the variable.
TemplateMatch
a template who's guid will be checked against property template guid.
Index
the index to look for if this is an array property.

function GetAllPropertyGraphs

inline const TMap< FGuid, TObjectPtr< UEdGraph > > & GetAllPropertyGraphs() const

function GetAllPropertyGraphNodes

inline const TMap< FGuid, TObjectPtr< USMGraphK2Node_PropertyNode_Base > > & GetAllPropertyGraphNodes() const

function GetAllPropertyGraphNodesAsArray

TArray< USMGraphK2Node_PropertyNode_Base * > GetAllPropertyGraphNodesAsArray(
    const USMNodeInstance * TemplateMatch =nullptr
) const

function InitPropertyGraphNodes

void InitPropertyGraphNodes(
    UEdGraph * PropertyGraph,
    FSMGraphProperty_Base * Property
)

function RefreshAllProperties

void RefreshAllProperties(
    bool bModify,
    bool bSetFromPinFirst =true
)

function RefreshPropertyByGuid

void RefreshPropertyByGuid(
    const FGuid & Guid,
    bool bModify,
    bool bSetFromPinFirst =true
)

Refresh a property graph by its Guid.


function ForceRecreateProperties

void ForceRecreateProperties()

Creates property graphs and refreshes properties.


function SetGraphPropertyDefaultsFromPins

void SetGraphPropertyDefaultsFromPins()

Updates properties from pin inputs.


function SetPinsFromGraphProperties

void SetPinsFromGraphProperties(
    bool bUseArchetype
)

Updates pin inputs from graph properties.


function GetPropertyNodeUnderMouse

USMGraphK2Node_PropertyNode_Base * GetPropertyNodeUnderMouse() const

function SupportsPropertyGraphs

inline virtual bool SupportsPropertyGraphs() const

If property graphs can be placed within this node.

Reimplemented by: USMGraphNode_StateNode::SupportsPropertyGraphs


function GetInputPin

virtual UEdGraphPin * GetInputPin() const

function GetOutputPin

virtual UEdGraphPin * GetOutputPin() const

function GetOutputNode

UEdGraphNode * GetOutputNode() const

Returns the first output node.


function GetAllOutputNodes

void GetAllOutputNodes(
    TArray< UEdGraphNode * > & OutNodes
) const

Returns all connected output nodes.


function GetAllOutputNodesAs

template <typename T >
inline void GetAllOutputNodesAs(
    TArray< T * > & OutNodes
) const

function GetBackgroundColor

virtual FLinearColor GetBackgroundColor() const

The background color this node should be. Separate from slate so we can use one slate object to represent many different nodes.


function GetActiveBackgroundColor

virtual FLinearColor GetActiveBackgroundColor() const

The background color to use when this node is being debugged.


function GetNodeIcon

virtual const FSlateBrush * GetNodeIcon() const

The icon image to use.

Reimplemented by: USMGraphNode_LinkStateNode::GetNodeIcon, USMGraphNode_RerouteNode::GetNodeIcon, USMGraphNode_StateNode::GetNodeIcon


function CanExistAtRuntime

inline virtual bool CanExistAtRuntime() const

If this is a node that gets compiled into the runtime blueprint.

Reimplemented by: USMGraphNode_AnyStateNode::CanExistAtRuntime, USMGraphNode_LinkStateNode::CanExistAtRuntime, USMGraphNode_RerouteNode::CanExistAtRuntime, USMGraphNode_StateMachineEntryNode::CanExistAtRuntime


function FindRuntimeNode

FSMNode_Base * FindRuntimeNode() const

Helper to locate the runtime node this node represents.


function GetDebugNode

const FSMNode_Base * GetDebugNode() const

Locates the current debug node if one exists.


function GetDebugTime

inline float GetDebugTime() const

function GetMaxDebugTime

virtual float GetMaxDebugTime() const

function IsDebugNodeActive

inline virtual bool IsDebugNodeActive() const

function WasDebugNodeActive

inline virtual bool WasDebugNodeActive() const

function GetFriendlyNodeName

inline virtual FName GetFriendlyNodeName() const

Reimplemented by: USMGraphNode_AnyStateNode::GetFriendlyNodeName, USMGraphNode_LinkStateNode::GetFriendlyNodeName, USMGraphNode_RerouteNode::GetFriendlyNodeName, USMGraphNode_StateNode::GetFriendlyNodeName


function ConvertToCurrentVersion

bool ConvertToCurrentVersion(
    bool bOnlyOnLoad =true
)

Configure outdated versions. Currently called from the editor module on load and from pre-compile.


function SetToCurrentVersion

bool SetToCurrentVersion()

Sets the version field to the current version. No additional changes are made.


function ForceSetVersion

void ForceSetVersion(
    int32 NewVersion
)

FOR TESTING: Force set to a specific version.


function ImportDeprecatedProperties

inline virtual void ImportDeprecatedProperties()

Brings in old values previously defined in the node and sets them on the template.

Reimplemented by: USMGraphNode_StateNodeBase::ImportDeprecatedProperties


function IsBeingPasted

inline bool IsBeingPasted() const

If the node is being pasted in this frame.


function IsPreCompiling

inline bool IsPreCompiling() const

If the node is pre-compiling for this frame.


function IsEditUndo

inline bool IsEditUndo() const

If the node is performing an edit undo / redo.


function RequestSlateRefresh

void RequestSlateRefresh(
    bool bFullRefresh =false
)

Request the corresponding slate widget refresh itself.

Parameters:

bFullRefresh
Completely redraw the widget.

function ResetCachedValues

virtual void ResetCachedValues()

Reset any cached values saved. Note this is for UI related caching and won't run by default without the editor.

Reimplemented by: USMGraphNode_AnyStateNode::ResetCachedValues, USMGraphNode_LinkStateNode::ResetCachedValues


function RecordDuplicatedNodeGuid

void RecordDuplicatedNodeGuid(
    const FGuid & InGuid
)

Called if this node is duplicated by the compiler.


function NotifySwapPropertyGraphArrayElements

void NotifySwapPropertyGraphArrayElements(
    const FName & InPropertyName,
    int32 IndexA,
    int32 IndexB,
    USMNodeInstance * InNodeInstance
)

Signal that array indices are being swapped. Requires property graphs recreated.


function RunPreCompileValidateForNodeInstance

static void RunPreCompileValidateForNodeInstance(
    const USMNodeInstance * InNodeInstance,
    USMCompilerLog * InCompilerLog
)

Trigger the protected OnPreCompileValidate method for a node instance.


Protected Functions Documentation

function DestroyAllPropertyGraphs

void DestroyAllPropertyGraphs()

Destroys all graph property graphs and empty all containers.


function PlaceDefaultInstanceNodes

virtual void PlaceDefaultInstanceNodes()

Place default nodes when a class is selected.

Reimplemented by: USMGraphNode_StateNode::PlaceDefaultInstanceNodes


function RunAllConstructionScripts_Internal

virtual void RunAllConstructionScripts_Internal()

Runs all template construction scripts core behavior.

Reimplemented by: USMGraphNode_StateNode::RunAllConstructionScripts_Internal


function RestoreArchetypeValuesPriorToConstruction

virtual void RestoreArchetypeValuesPriorToConstruction()

Restore specific construction scripts values.

Reimplemented by: USMGraphNode_StateNode::RestoreArchetypeValuesPriorToConstruction


function IsSafeToConditionallyCompile

bool IsSafeToConditionallyCompile(
    EPropertyChangeType::Type ChangeType
) const

function OnConvertToCurrentVersion

inline virtual void OnConvertToCurrentVersion(
    bool bOnlyOnLoad
)

Called at the end of ConvertToCurrentVersion before the version is set.


function Internal_GetBackgroundColor

virtual FLinearColor Internal_GetBackgroundColor() const

Reimplemented by: USMGraphNode_AnyStateNode::Internal_GetBackgroundColor, USMGraphNode_LinkStateNode::Internal_GetBackgroundColor, USMGraphNode_RerouteNode::Internal_GetBackgroundColor, USMGraphNode_StateNodeBase::Internal_GetBackgroundColor


function GetCustomBackgroundColor

const FLinearColor * GetCustomBackgroundColor(
    const USMNodeInstance * NodeInstance =nullptr
) const

Return the custom color from a specific node instance.

Parameters:

NodeInstance
If null then the default NodeInstanceTemplate will be used.

function RemovePropertyGraph

void RemovePropertyGraph(
    USMPropertyGraph * PropertyGraph,
    bool RemoveFromMaps
)

function HandlePropertyGraphArrayRemoval

void HandlePropertyGraphArrayRemoval(
    TArray< FSMGraphProperty_Base * > & GraphProperties,
    TArray< TSharedPtr< FSMGraphProperty > > & TempGraphProperties,
    FProperty * TargetProperty,
    int32 RemovalIndex,
    int32 ArraySize,
    const FSMGraphProperty * OverrideGraphProperty,
    USMNodeInstance * Template
)

function HandlePropertyGraphArrayInsertion

void HandlePropertyGraphArrayInsertion(
    TArray< FSMGraphProperty_Base * > & GraphProperties,
    TArray< TSharedPtr< FSMGraphProperty > > & TempGraphProperties,
    FProperty * TargetProperty,
    int32 InsertionIndex,
    int32 ArraySize,
    const FSMGraphProperty * OverrideGraphProperty,
    USMNodeInstance * Template,
    bool bDuplicate =false
)

function HandlePropertyGraphArraySwap

void HandlePropertyGraphArraySwap(
    TArray< FSMGraphProperty_Base * > & GraphProperties,
    int32 IndexA,
    int32 IndexB,
    USMNodeInstance * Template
)

function HandleOnPropertyChangedEvent

void HandleOnPropertyChangedEvent(
    UObject * InObject,
    FPropertyChangedEvent & InPropertyChangedEvent
)

Called when a UObject property changes.


function GetLoadedVersion

inline int32 GetLoadedVersion() const

Public Attributes Documentation

variable bGenerateTemplateOnNodePlacement

bool bGenerateTemplateOnNodePlacement;

variable bRequiresGuidRegeneration

uint32 bRequiresGuidRegeneration;

Member flag for forcing guid regeneration.


variable bNeedsStateStackConversion

uint32 bNeedsStateStackConversion;

True iff bRequiresGuidRegeneration and loaded version wrong.


variable bTEST_ForceNoTemplateGuid

uint32 bTEST_ForceNoTemplateGuid;

Testing flag for forcing old guid generation WITHOUT template support.


variable PropertyCategoriesExpanded

TMap< FString, bool > PropertyCategoriesExpanded;

Property category expansion state for slate node.


Protected Attributes Documentation

variable bPostEditChangeConstructionRequiresFullRefresh

bool bPostEditChangeConstructionRequiresFullRefresh;

variable CollectedLogs

TArray< FSMGraphNodeLog > CollectedLogs;

variable BoundGraph

TObjectPtr< UEdGraph > BoundGraph;

variable NodePosition

FVector2D NodePosition;

The node position on the graph. This is managed completely by the editor graph.


variable NodeInstanceTemplate

TObjectPtr< USMNodeInstance > NodeInstanceTemplate;

The instanced template to use as an archetype. This node name is used in EditorCustomization directly!


variable GraphPropertyGraphs

TMap< FGuid, TObjectPtr< UEdGraph > > GraphPropertyGraphs;

variable GraphPropertyNodes

TMap< FGuid, TObjectPtr< USMGraphK2Node_PropertyNode_Base > > GraphPropertyNodes;

variable GraphPropertyTemplates

TMap< FGuid, TObjectPtr< USMNodeInstance > > GraphPropertyTemplates;

The template each graph property points to. Generally the NodeInstanceTemplate but if a state uses the state stack it will vary.


variable DuplicatedNodeGuids

TSet< FGuid > DuplicatedNodeGuids;

Node guids set by the compiler if this node is duplicated for run-time.


variable CachedBrush

TSharedPtr< FSlateBrush > CachedBrush;

variable CachedTexture

FString CachedTexture;

variable CachedTextureSize

FVector2D CachedTextureSize;

variable CachedNodeTintColor

FLinearColor CachedNodeTintColor;

variable DebugTotalTime

float DebugTotalTime;

Resets on active change.


variable MaxTimeToShowDebug

float MaxTimeToShowDebug;

variable bIsDebugActive

uint32 bIsDebugActive;

variable bWasDebugActive

uint32 bWasDebugActive;

variable bIsPreCompiling

uint32 bIsPreCompiling;

variable bJustPasted

uint32 bJustPasted;

variable bIsEditUndo

uint32 bIsEditUndo;

variable bCreatePropertyGraphsOnPropertyChange

uint32 bCreatePropertyGraphsOnPropertyChange;

Defaults to true and property graphs are reconstructed when a property changes on the node.


variable bCreatePropertyGraphsSilently

uint32 bCreatePropertyGraphsSilently;

Do not modify.


variable bChangeFromRedirect

uint32 bChangeFromRedirect;

Redirect caused a post edit change, such as a force delete. Only valid by default during PostEditChangeProperty of this class.


Private Attributes Documentation

variable bIsRunningConstructionScripts

bool bIsRunningConstructionScripts;

variable bFastPathEnabledCached

TOptional< bool > bFastPathEnabledCached;

variable OnGraphNodeRefreshRequestedEvent

FOnGraphNodeRefreshRequested OnGraphNodeRefreshRequestedEvent;

variable ArraySwapData

TMap< TWeakObjectPtr< USMNodeInstance >, FArraySwapData > ArraySwapData;

variable OnPropertyChangedHandle

FDelegateHandle OnPropertyChangedHandle;

variable bNativeGuidConversion

uint32 bNativeGuidConversion;

variable LoadedVersion

int32 LoadedVersion = 0;

The current loaded version. Once saved it should be the highest version available.


variable OnCacheClearedHandle

FDelegateHandle OnCacheClearedHandle;

Handle for when UI related cache is cleared.


Friends

friend SGraphNode_BaseNode

friend class SGraphNode_BaseNode(
    SGraphNode_BaseNode 
);