Skip to content

USMGraphK2Node_PropertyNode_Base¶

Module: SMSystemEditor

#include <SMGraphK2Node_PropertyNode_Base.h>

Inherits from USMGraphK2Node_RuntimeNodeReference, ISMEditorGraphPropertyNodeInterface

Description¶

class USMGraphK2Node_PropertyNode_Base;

Pure root reference nodes that are placed within a property graph returning a value. USMGraphNode_Base -> K2 BoundGraph -> Property Graph -> Property Node (this) Slate Node for USMGraphNode_Base -> this->GetGraphNodeWidget Details Panel for USMGraphNode_Base -> this->GetGraphDetailWidget

Public Classes¶

Name
struct FHighlightArgs
struct FNotifyArgs

Public Functions¶

Name
virtual ~USMGraphK2Node_PropertyNode_Base() override
virtual bool IsNodePure() const override
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override
virtual FText GetTooltipText() const override
virtual FLinearColor GetNodeTitleColor() const override
virtual void PostPlacedNewNode() override
virtual void ReconstructNode() override
virtual void PinDefaultValueChanged(UEdGraphPin * Pin) override
virtual void NotifyPinConnectionListChanged(UEdGraphPin * Pin) override
virtual bool IsConnectionDisallowed(const UEdGraphPin * MyPin, const UEdGraphPin * OtherPin, FString & OutReason) const override
virtual bool HasExternalDependencies(TArray< UStruct * > * OptionalOutput) const override
virtual bool CanCollapseNode() const override
virtual void AddPinSearchMetaDataInfo(const UEdGraphPin * Pin, TArray< FSearchTagDataPair > & OutTaggedMetaData) const override
virtual FString GetPinMetaData(FName InPinName, FName InKey) override
virtual void PreConsolidatedEventGraphValidate(FCompilerResultsLog & MessageLog) override
virtual void SetHighlight(bool bEnable, FLinearColor Color, bool bClearOnCompile) override
virtual void SetNotification(bool bEnable, ESMLogType Severity, const FString & Message, bool bClearOnCompile) override
virtual void SetNotificationAndHighlight(bool bEnable, ESMLogType Severity, const FString & Message, bool bClearOnCompile) override
virtual void ResetProperty() override
virtual bool IsPinWired(ESMGraphPropertyDirection Direction) const override
virtual void RefreshPropertyPinFromValue() override
virtual void RefreshPropertyValueFromPin() override
virtual void PreCompileBeforeConstructionScripts(FSMKismetCompilerContext & CompilerContext)
virtual void PreCompile(FSMKismetCompilerContext & CompilerContext)
void LogPropertyFromTokenizedMessage(const TSharedRef< FTokenizedMessage > & InTokenizedMessage)
FProperty * GetProperty() const
USMPropertyGraph * GetPropertyGraph() const
bool IsGraphReadOnly() const
virtual void ConfigureRuntimePropertyNode()
virtual FSMGraphProperty_Base_Runtime * GetRuntimePropertyNode()
FSMGraphProperty_Base_Runtime * GetRuntimePropertyNodeChecked()
virtual FSMGraphProperty_Base * GetPropertyNode()
FSMGraphProperty_Base * GetPropertyNodeChecked()
FSMGraphProperty_Base * GetPropertyNodeConst() const
FSMGraphProperty_Base * GetPropertyNodeConstChecked() const
virtual void SetPropertyNode(FSMGraphProperty_Base * NewNode)
virtual void SetPropertyDefaultsFromPin()
virtual void SetPinValueFromPropertyDefaults(bool bUpdateTemplateDefaults, bool bUseArchetype, bool bForce =false)
UScriptStruct * GetRuntimePropertyNodeType() const
FStructProperty * GetRuntimePropertyNodeProperty() const
FStructProperty * GetPropertyNodeProperty(bool bRuntimeOnly) const
USMNodeInstance * GetOwningTemplate() const
USMNodeBlueprint * GetTemplateBlueprint() const
UEdGraph * GetOwningGraph() const
USMPropertyGraph * FindOwningPropertyGraph() const
const FGuid & GetOwningNodeGuidChecked() const
const FGuid & GetOwningTemplateGuid() const
USMGraphNode_Base * GetOwningGraphNode() const
USMGraphNode_Base * GetOwningGraphNodeChecked() const
void JumpToPropertyGraph()
void JumpToTemplateBlueprint()
virtual TSharedPtr< class SSMGraphProperty_Base > GetGraphNodeWidget() const
virtual TSharedPtr< SWidget > GetGraphDetailWidget() const
virtual TSharedPtr< SWidget > GetViewGraphDetailWidget() const
virtual TSharedPtr< SWidget > GetToggleEditGraphDetailWidget() const
void GetContextMenuActionsForOwningNode(const UEdGraph * CurrentGraph, const UEdGraphNode * InGraphNode, const UEdGraphPin * InGraphPin, class UToolMenu * ToolMenu, bool bIsDebugging) const
virtual bool IsConsideredForDefaultProperty() const
virtual void DefaultPropertyActionWhenPlaced(TSharedPtr< SWidget > Widget)
virtual UEdGraphPin * GetResultPin(const EEdGraphPinDirection Direction =EGPD_Input) const
UEdGraphPin * GetResultPinChecked(const EEdGraphPinDirection Direction =EGPD_Input) const
virtual bool DoesResultPinHaveConnections(const EEdGraphPinDirection Direction) const
virtual bool IsValueSetToDefault() const
bool HasDefaultValueExplicitlyBeenChanged() const
bool IsValueModifiedOrWired() const
const FString & GetLastAutoGeneratedDefaultValue() const
bool IsInputProperty() const
bool IsOutputProperty() const
void SetHighlightedArgs(const FHighlightArgs & InHighlightArgs)
const FHighlightArgs & GetHighlightArgs() const
void SetNotificationArgs(const FNotifyArgs & InNotifyArgs)
const FNotifyArgs & GetNotifyArgs() const
virtual void OnPropertyInteractionChanged(const ESMPropertyInteractionType InInteractionType, const TWeakPtr< SGraphPanel > & InGraphPanel, bool bForce) const
DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnPropertyInteractionChanged , const ESMPropertyInteractionType , const TWeakPtr< SGraphPanel > & , bool )
FOnPropertyInteractionChanged & GetOnPropertyInteractionChangedEvent()
FGuid RegisterWidget(const TWeakPtr< SWidget > & InWidget)
void UnregisterWidget(const FGuid & InGuid)
const TMap< FGuid, TWeakPtr< SWidget > > & GetRegisteredWidgets() const
DECLARE_MULTICAST_DELEGATE_OneParam(FForceVisualRefresh , const UEdGraphPin * )
void ForceVisualRefresh(const UEdGraphPin * Pin) const
void ConformLocalizationPackage(const FEdGraphPinType & PinType, FString & InOutTextString, const FText & DefaultTextValue, const UObject * Package)

Protected Functions¶

Name
void AddSharedPinSearchMetaDataInfo(TArray< FSearchTagDataPair > & OutTaggedMetaData) const
virtual void Internal_GetContextMenuActionsForOwningNode(const UEdGraph * CurrentGraph, const UEdGraphNode * InGraphNode, const UEdGraphPin * InGraphPin, FToolMenuSection & MenuSection, bool bIsDebugging) const

Public Attributes¶

Protected Attributes¶

Additional inherited members¶

Public Functions inherited from ISMEditorGraphPropertyNodeInterface

Name
FLinearColor GetHighlightColorFromSeverity(const ESMLogType InSeverity)

Public Functions Documentation¶

function ~USMGraphK2Node_PropertyNode_Base¶

virtual ~USMGraphK2Node_PropertyNode_Base() override

function IsNodePure¶

inline virtual bool IsNodePure() const override

function GetNodeTitle¶

virtual FText GetNodeTitle(
    ENodeTitleType::Type TitleType
) const override

function GetTooltipText¶

virtual FText GetTooltipText() const override

function GetNodeTitleColor¶

virtual FLinearColor GetNodeTitleColor() const override

function PostPlacedNewNode¶

virtual void PostPlacedNewNode() override

function ReconstructNode¶

virtual void ReconstructNode() override

function PinDefaultValueChanged¶

virtual void PinDefaultValueChanged(
    UEdGraphPin * Pin
) override

function NotifyPinConnectionListChanged¶

virtual void NotifyPinConnectionListChanged(
    UEdGraphPin * Pin
) override

function IsConnectionDisallowed¶

virtual bool IsConnectionDisallowed(
    const UEdGraphPin * MyPin,
    const UEdGraphPin * OtherPin,
    FString & OutReason
) const override

function HasExternalDependencies¶

virtual bool HasExternalDependencies(
    TArray< UStruct * > * OptionalOutput
) const override

function CanCollapseNode¶

inline virtual bool CanCollapseNode() const override

function AddPinSearchMetaDataInfo¶

virtual void AddPinSearchMetaDataInfo(
    const UEdGraphPin * Pin,
    TArray< FSearchTagDataPair > & OutTaggedMetaData
) const override

function GetPinMetaData¶

virtual FString GetPinMetaData(
    FName InPinName,
    FName InKey
) override

function PreConsolidatedEventGraphValidate¶

virtual void PreConsolidatedEventGraphValidate(
    FCompilerResultsLog & MessageLog
) override

function SetHighlight¶

virtual void SetHighlight(
    bool bEnable,
    FLinearColor Color,
    bool bClearOnCompile
) override

Highlight a property on the owning graph node.

Parameters:

bEnable
Enable or disable the highlight.
Color
The color of the highlight.
bClearOnCompile
If the highlight should clear when the owning state machine blueprint is compiled.

Reimplements: ISMEditorGraphPropertyNodeInterface::SetHighlight


function SetNotification¶

virtual void SetNotification(
    bool bEnable,
    ESMLogType Severity,
    const FString & Message,
    bool bClearOnCompile
) override

Show a notification icon on the property.

Parameters:

bEnable
Show or hide the notification.
Severity
The severity of the log type.
Message
The tooltip to display when hovering the icon.
bClearOnCompile
If the notification should clear when the owning state machine blueprint is compiled.

Reimplements: ISMEditorGraphPropertyNodeInterface::SetNotification


function SetNotificationAndHighlight¶

virtual void SetNotificationAndHighlight(
    bool bEnable,
    ESMLogType Severity,
    const FString & Message,
    bool bClearOnCompile
) override

Show a notification icon and highlight the property based on the severity.

Parameters:

bEnable
Show or hide the notification and highlight.
Severity
The severity of the log type.
Message
The tooltip to display when hovering the icon.
bClearOnCompile
If the notification and highlight should clear when the owning state machine blueprint is compiled.

Reimplements: ISMEditorGraphPropertyNodeInterface::SetNotificationAndHighlight


function ResetProperty¶

virtual void ResetProperty() override

Reset the property back to the class defaults, completely resetting the graph.

Reimplements: ISMEditorGraphPropertyNodeInterface::ResetProperty


function IsPinWired¶

virtual bool IsPinWired(
    ESMGraphPropertyDirection Direction
) const override

Check if the result pin is wired to any other node, and there isn't a default value present.

Parameters:

Direction
The result pin direction we should check is wired.

Return: True if there is any connection to this pin. False if there is no connection or the pin doesn't exist.

Reimplements: ISMEditorGraphPropertyNodeInterface::IsPinWired


function RefreshPropertyPinFromValue¶

virtual void RefreshPropertyPinFromValue() override

Refresh an exposed property's blueprint pin on the UEdGraphNode from the property's current value. This can be used if you programmatically update an exposed property outside of editor construction scripts such as through PostEditChangeProperty and want that value reflected on the node.

Warning:

This should NOT be called during editor construction scripts as they will automatically refresh property pins.

Reimplements: ISMEditorGraphPropertyNodeInterface::RefreshPropertyPinFromValue


function RefreshPropertyValueFromPin¶

virtual void RefreshPropertyValueFromPin() override

Refresh an exposed property value from the matching pin on the UEdGraphNode. This can be used if you need to make sure the current value in C++ matches what is entered into the blueprint pin.

Warning:

This should NOT be called during editor construction scripts as they will automatically refresh property values.

Reimplements: ISMEditorGraphPropertyNodeInterface::RefreshPropertyValueFromPin


function PreCompileBeforeConstructionScripts¶

virtual void PreCompileBeforeConstructionScripts(
    FSMKismetCompilerContext & CompilerContext
)

Called during pre-compile before construction scripts have run.


function PreCompile¶

virtual void PreCompile(
    FSMKismetCompilerContext & CompilerContext
)

Called during pre compile by the owning state machine graph node.


function LogPropertyFromTokenizedMessage¶

void LogPropertyFromTokenizedMessage(
    const TSharedRef< FTokenizedMessage > & InTokenizedMessage
)

Logs property information from a given MessageLog tokenized message.


function GetProperty¶

FProperty * GetProperty() const

Return the FProperty this node represents.


function GetPropertyGraph¶

USMPropertyGraph * GetPropertyGraph() const

Retrieve the property graph where this property node is located.


function IsGraphReadOnly¶

bool IsGraphReadOnly() const

Checks if the owning graph is readonly.


function ConfigureRuntimePropertyNode¶

inline virtual void ConfigureRuntimePropertyNode()

Allow runtime properties to set their values from their editor counterparts.


function GetRuntimePropertyNode¶

inline virtual FSMGraphProperty_Base_Runtime * GetRuntimePropertyNode()

Get the runtime graph property.


function GetRuntimePropertyNodeChecked¶

inline FSMGraphProperty_Base_Runtime * GetRuntimePropertyNodeChecked()

function GetPropertyNode¶

inline virtual FSMGraphProperty_Base * GetPropertyNode()

Get the editor property node.


function GetPropertyNodeChecked¶

inline FSMGraphProperty_Base * GetPropertyNodeChecked()

Get the editor graph property.


function GetPropertyNodeConst¶

inline FSMGraphProperty_Base * GetPropertyNodeConst() const

function GetPropertyNodeConstChecked¶

inline FSMGraphProperty_Base * GetPropertyNodeConstChecked() const

function SetPropertyNode¶

inline virtual void SetPropertyNode(
    FSMGraphProperty_Base * NewNode
)

Sets the new node. Useful for refreshing the node with updated values from a template.


function SetPropertyDefaultsFromPin¶

virtual void SetPropertyDefaultsFromPin()

Sets the property on the node template to match this pin.


function SetPinValueFromPropertyDefaults¶

virtual void SetPinValueFromPropertyDefaults(
    bool bUpdateTemplateDefaults,
    bool bUseArchetype,
    bool bForce =false
)

Sets the pin default value from the property value.

This method was originally written to reset the pin to the node instance CDO value but has since grown to handle the current node instance value that could be changed programatically.

Parameters:

bUpdateTemplateDefaults
Potentially calls SetPropertyDefaultsFromPin instead, should not be used.
bUseArchetype
Use the node instance CDO to read values instead of the current instance.
bForce
Forces a change through even if the current value matches defaults.

function GetRuntimePropertyNodeType¶

UScriptStruct * GetRuntimePropertyNodeType() const

Get the runtime graph property type.


function GetRuntimePropertyNodeProperty¶

FStructProperty * GetRuntimePropertyNodeProperty() const

Get the runtime graph property as a FStructProperty.


function GetPropertyNodeProperty¶

FStructProperty * GetPropertyNodeProperty(
    bool bRuntimeOnly
) const

Return either a runtime property node only or an editor property node.


function GetOwningTemplate¶

USMNodeInstance * GetOwningTemplate() const

The template which owns this property.


function GetTemplateBlueprint¶

USMNodeBlueprint * GetTemplateBlueprint() const

The blueprint of the template owning this property.


function GetOwningGraph¶

UEdGraph * GetOwningGraph() const

Deprecated:

This function is deprecated. Use GetPropertyGraph() or GetGraph() instead, or use FindOwningPropertyGraph() for the same behavior.


function FindOwningPropertyGraph¶

USMPropertyGraph * FindOwningPropertyGraph() const

Locate the owning property graph in the owning state node.


function GetOwningNodeGuidChecked¶

const FGuid & GetOwningNodeGuidChecked() const

Return owning runtime node guid.


function GetOwningTemplateGuid¶

const FGuid & GetOwningTemplateGuid() const

Return the owning template guid if set.


function GetOwningGraphNode¶

USMGraphNode_Base * GetOwningGraphNode() const

The state machine graph node which owns this property.


function GetOwningGraphNodeChecked¶

USMGraphNode_Base * GetOwningGraphNodeChecked() const

function JumpToPropertyGraph¶

void JumpToPropertyGraph()

Open the property graph for this node. Should be the containing graph.


function JumpToTemplateBlueprint¶

void JumpToTemplateBlueprint()

function GetGraphNodeWidget¶

virtual TSharedPtr< class SSMGraphProperty_Base > GetGraphNodeWidget() const

Get the widget to represent this property node within a state machine graph node.


function GetGraphDetailWidget¶

virtual TSharedPtr< SWidget > GetGraphDetailWidget() const

Get the widget to represent the graph node in the details panel.


function GetViewGraphDetailWidget¶

virtual TSharedPtr< SWidget > GetViewGraphDetailWidget() const

Widget used to go to the graph.


function GetToggleEditGraphDetailWidget¶

virtual TSharedPtr< SWidget > GetToggleEditGraphDetailWidget() const

Widget used to toggled edit mode of the graph.


function GetContextMenuActionsForOwningNode¶

void GetContextMenuActionsForOwningNode(
    const UEdGraph * CurrentGraph,
    const UEdGraphNode * InGraphNode,
    const UEdGraphPin * InGraphPin,
    class UToolMenu * ToolMenu,
    bool bIsDebugging
) const

This forwards up context menu actions when the owning state machine graph node is right clicked on over this property.


function IsConsideredForDefaultProperty¶

inline virtual bool IsConsideredForDefaultProperty() const

If the sgraphnode doesn't have a default name field then this property may be used as the default property to edit.


function DefaultPropertyActionWhenPlaced¶

inline virtual void DefaultPropertyActionWhenPlaced(
    TSharedPtr< SWidget > Widget
)

If the sgraphnode chooses this property as the default it will pass the already constructed widget in (should be the same type as GetGraphDetailWidget()) so it can be used for a default action – such as automatically editing text.


function GetResultPin¶

virtual UEdGraphPin * GetResultPin(
    const EEdGraphPinDirection Direction =EGPD_Input
) const

Locates the result pin if one exists.


function GetResultPinChecked¶

inline UEdGraphPin * GetResultPinChecked(
    const EEdGraphPinDirection Direction =EGPD_Input
) const

function DoesResultPinHaveConnections¶

virtual bool DoesResultPinHaveConnections(
    const EEdGraphPinDirection Direction
) const

Checks if the result pin has a connection going to it, making this a variable connection rather than a defaults setter.


function IsValueSetToDefault¶

virtual bool IsValueSetToDefault() const

Checks if this instance matches the CDO default value.


function HasDefaultValueExplicitlyBeenChanged¶

inline bool HasDefaultValueExplicitlyBeenChanged() const

Return bDefaultValueChanged which is true once any change has occurred.


function IsValueModifiedOrWired¶

bool IsValueModifiedOrWired() const

Checks if the value has changed from the default or if a variable is wired to it.


function GetLastAutoGeneratedDefaultValue¶

inline const FString & GetLastAutoGeneratedDefaultValue() const

The last exported property text value.


function IsInputProperty¶

bool IsInputProperty() const

This node is configured for input.


function IsOutputProperty¶

bool IsOutputProperty() const

This node is configured for output.


function SetHighlightedArgs¶

void SetHighlightedArgs(
    const FHighlightArgs & InHighlightArgs
)

Set if the node should be highlighted.


function GetHighlightArgs¶

inline const FHighlightArgs & GetHighlightArgs() const

Return the current args used for highlighting.


function SetNotificationArgs¶

void SetNotificationArgs(
    const FNotifyArgs & InNotifyArgs
)

Set if the node should display a notification.


function GetNotifyArgs¶

inline const FNotifyArgs & GetNotifyArgs() const

Return the current args used for notification info.


function OnPropertyInteractionChanged¶

virtual void OnPropertyInteractionChanged(
    const ESMPropertyInteractionType InInteractionType,
    const TWeakPtr< SGraphPanel > & InGraphPanel,
    bool bForce
) const

When property access has changed.


function DECLARE_MULTICAST_DELEGATE_ThreeParams¶

DECLARE_MULTICAST_DELEGATE_ThreeParams(
    FOnPropertyInteractionChanged ,
    const ESMPropertyInteractionType ,
    const TWeakPtr< SGraphPanel > & ,
    bool 
)

Event when property interaction has changed.


function GetOnPropertyInteractionChangedEvent¶

inline FOnPropertyInteractionChanged & GetOnPropertyInteractionChangedEvent()

function RegisterWidget¶

FGuid RegisterWidget(
    const TWeakPtr< SWidget > & InWidget
)

Register a slate widget belonging to this property.

Return: A new Guid used to identify the widget.


function UnregisterWidget¶

void UnregisterWidget(
    const FGuid & InGuid
)

Remove a registered slate widget.

Parameters:

InGuid
The Guid used to initially register the widget.

function GetRegisteredWidgets¶

const TMap< FGuid, TWeakPtr< SWidget > > & GetRegisteredWidgets() const

Retrieve all registered widgets.


function DECLARE_MULTICAST_DELEGATE_OneParam¶

DECLARE_MULTICAST_DELEGATE_OneParam(
    FForceVisualRefresh ,
    const UEdGraphPin * 
)

function ForceVisualRefresh¶

inline void ForceVisualRefresh(
    const UEdGraphPin * Pin
) const

function ConformLocalizationPackage¶

static void ConformLocalizationPackage(
    const FEdGraphPinType & PinType,
    FString & InOutTextString,
    const FText & DefaultTextValue,
    const UObject * Package
)

For correcting the package and namespace on newly placed text properties. Based on EdGraphSchema_K2.cpp.


Protected Functions Documentation¶

function AddSharedPinSearchMetaDataInfo¶

void AddSharedPinSearchMetaDataInfo(
    TArray< FSearchTagDataPair > & OutTaggedMetaData
) const

Add shared pin search meta between properties. Children should call this if they overload AddPinSearchMetaDataInfo.


function Internal_GetContextMenuActionsForOwningNode¶

virtual void Internal_GetContextMenuActionsForOwningNode(
    const UEdGraph * CurrentGraph,
    const UEdGraphNode * InGraphNode,
    const UEdGraphPin * InGraphPin,
    FToolMenuSection & MenuSection,
    bool bIsDebugging
) const

Public Attributes Documentation¶

variable OwningGraphNode¶

TObjectPtr< USMGraphNode_Base > OwningGraphNode;

variable bMouseOverNodeProperty¶

bool bMouseOverNodeProperty = false;

Deprecated:

This property is deprecated. Use RegisterWidget(), UnregisterWidget(), and GetRegisteredWidgets() for slate information.


variable ForceVisualRefreshEvent¶

FForceVisualRefresh ForceVisualRefreshEvent;

Protected Attributes Documentation¶

variable HighlightArgs¶

FHighlightArgs HighlightArgs;

Used to determine if the property should be highlighted in slate.


variable NotifyArgs¶

FNotifyArgs NotifyArgs;

Used to determine if a property should have a notification icon and message.


variable LastAutoGeneratedDefaultValue¶

FString LastAutoGeneratedDefaultValue;

The last default autogenerated value. The pin value resets to this if the default value hasn't changed.


variable bDefaultValueChanged¶

uint8 bDefaultValueChanged;

True once the user has changed the default value. It cannot become false again unless through Undo or Property Reset.


variable bGeneratedDefaultValueBeingSet¶

uint8 bGeneratedDefaultValueBeingSet;

True only while setting default pin value from the property.


variable bSettingPropertyDefaultsFromPin¶

uint8 bSettingPropertyDefaultsFromPin;

True only while setting default property values from the pin.


variable bResettingProperty¶

uint8 bResettingProperty;

True only during a property reset.


Private Attributes Documentation¶

variable bWaitingForWindowClose¶

uint8 bWaitingForWindowClose;

If this property is expecting a window to close before updating.


variable OnPropertyInteractionChangedEvent¶

FOnPropertyInteractionChanged OnPropertyInteractionChangedEvent;

When interaction with a property occurs.


variable RegisteredWidgets¶

TMap< FGuid, TWeakPtr< SWidget > > RegisteredWidgets;

Widgets representing this property, likely <= 1. However, if multiple graph panels are open to this node, multiple widgets may be registered.