Skip to content

USMGraphK2Node_PropertyIOBase

Module: SMSystemEditor

#include <SMGraphK2Node_PropertyIOBase.h>

Inherits from USMGraphK2Node_FunctionNode

Inherited by USMGraphK2Node_PropertyIOReaderNode, USMGraphK2Node_PropertyIOWriterNode

Description

class USMGraphK2Node_PropertyIOBase;

Base node for output variables (reading and writing).

Public Functions

Name
virtual bool IsCompatibleWithGraph(UEdGraph const * Graph) const override
virtual void PinDefaultValueChanged(UEdGraphPin * Pin) override
virtual void PinConnectionListChanged(UEdGraphPin * Pin) override
virtual void DestroyNode() override
virtual void ReconstructNode() override
virtual bool CanCollapseNode() const override
virtual void PreCompileValidate(FCompilerResultsLog & MessageLog) override
virtual void PreCompile()
void UpdatePropertySelectionPin(UEdGraphPin * InPropertyPin, const bool bIsUserAction)
void SetPropertySelectionPinValue(UEdGraphPin * InPropertyPin, const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyValue, const TOptional< FName > & InPropertyNameOverride =TOptional< FName >())
TSharedPtr< LD::Editor::PropertyUtils::IO::FNodePropertyData > GetOwningPropertyNodePropertyData() const
USMGraphK2Node_PropertyNode_Base * GetOwningPropertyNode() const
USMGraphNode_Base * GetOwningGraphNode() const
virtual UEdGraphPin * TryGetOwningPropertyNodeRelatedPin() const
virtual bool ShouldBreakResultPinLinksOnTypeChange() const
virtual bool IsConnectedToOwningPropertyNode() const
virtual bool IsPropertySelectionPin(const UEdGraphPin * Pin) const
virtual bool IsPropertyConnectorPin(const UEdGraphPin * Pin) const
virtual bool CanDisplayConnectorPin(const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyData, const UEdGraphPin * InPin) const
virtual bool CanAcceptConnection(const USMGraphK2Node_PropertyIOBase * OtherPropertyIONode) const
virtual bool CanAcceptConnection(const USMGraphK2Node_PropertyNode_Base * OtherPropertyNode) const
TArray< UEdGraphPin * > GetAllPropertySelectionPins() const
void AddReferencedIONode(const FGuid & InPinGuid, USMGraphK2Node_PropertyNode_Base * InNode)
void RemoveReferencedIONode(const FGuid & InPinGuid)
int32 GetIOReferenceCount(const USMGraphK2Node_PropertyNode_Base * InPropertyNode) const
USMGraphK2Node_PropertyNode_Base * GetReferencedIONode(const FGuid & InPinGuid) const
SMSYSTEMEDITOR_API TArray< USMGraphK2Node_PropertyNode_Base * > GetAllReferencedIONodes() const
void ReapplyConnections()
void CleanInvalidReferencedIONodes()
SMSYSTEMEDITOR_API UEdGraphPin * FindOppositePin(const UEdGraphPin * InPin) const
UEdGraphPin * FindOppositePin(const FName & InPinName) const
virtual int32 GetMaxReferencedIONodes() const
FName GetPropertySelectionPinIdentifierType()
FString GetInputPinPrefix()
FString GetOutputPinPrefix()

Protected Functions

Name
virtual void VerifyCorrectPinData(const UEdGraphPin * InPin, FCompilerResultsLog & InMessageLog) const
UK2Node_MakeStruct * MakeAndWirePropertyPathStruct(FSMKismetCompilerContext & CompilerContext, const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & PropertyData, UEdGraphPin * OutputToPin)
void SetPropertySelectionPinDefaults(UEdGraphPin * Pin)
void SetPropertyConnectorPinDefaults(UEdGraphPin * Pin)

Protected Attributes

Name
bool bProgramaticallySettingPropertyPinValue
bool bCallUpdatePropertySelectionOnValueChange

Public Functions Documentation

function IsCompatibleWithGraph

virtual bool IsCompatibleWithGraph(
    UEdGraph const * Graph
) const override

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::IsCompatibleWithGraph


function PinDefaultValueChanged

virtual void PinDefaultValueChanged(
    UEdGraphPin * Pin
) override

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::PinDefaultValueChanged, USMGraphK2Node_PropertyIOWriterNode::PinDefaultValueChanged


function PinConnectionListChanged

virtual void PinConnectionListChanged(
    UEdGraphPin * Pin
) override

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::PinConnectionListChanged, USMGraphK2Node_PropertyIOWriterNode::PinConnectionListChanged


function DestroyNode

virtual void DestroyNode() override

function ReconstructNode

virtual void ReconstructNode() override

function CanCollapseNode

inline virtual bool CanCollapseNode() const override

function PreCompileValidate

virtual void PreCompileValidate(
    FCompilerResultsLog & MessageLog
) override

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::PreCompileValidate, USMGraphK2Node_PropertyIOWriterNode::PreCompileValidate


function PreCompile

virtual void PreCompile()

Called from the property node responsible for this IO Node.


function UpdatePropertySelectionPin

void UpdatePropertySelectionPin(
    UEdGraphPin * InPropertyPin,
    const bool bIsUserAction
)

Perform processing when a property pin has changed. This will update a corresponding connector pin matching the property pin.

Parameters:

InPropertyPin
The property pin we are updating.
bIsUserAction
Whether the user initiated the action directly or not.

function SetPropertySelectionPinValue

void SetPropertySelectionPinValue(
    UEdGraphPin * InPropertyPin,
    const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyValue,
    const TOptional< FName > & InPropertyNameOverride =TOptional< FName >()
)

Set the pin's value.

Parameters:

InPropertyPin
The graph pin to set.
InPropertyValue
The value to set the graph pin.
InPropertyNameOverride
The property name, if it should be different from the InPropertyValue data.

function GetOwningPropertyNodePropertyData

TSharedPtr< LD::Editor::PropertyUtils::IO::FNodePropertyData > GetOwningPropertyNodePropertyData() const

Build node property data of this node owner.


function GetOwningPropertyNode

USMGraphK2Node_PropertyNode_Base * GetOwningPropertyNode() const

Return the property node connected to this execution.


function GetOwningGraphNode

USMGraphNode_Base * GetOwningGraphNode() const

Find the owning graph node containing this property output node.


function TryGetOwningPropertyNodeRelatedPin

inline virtual UEdGraphPin * TryGetOwningPropertyNodeRelatedPin() const

Try to locate the related pin to our property node.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::TryGetOwningPropertyNodeRelatedPin, USMGraphK2Node_PropertyIOWriterNode::TryGetOwningPropertyNodeRelatedPin


function ShouldBreakResultPinLinksOnTypeChange

inline virtual bool ShouldBreakResultPinLinksOnTypeChange() const

If we should also break the result pin links on a type change.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::ShouldBreakResultPinLinksOnTypeChange


function IsConnectedToOwningPropertyNode

inline virtual bool IsConnectedToOwningPropertyNode() const

Check for a direct connection to the owning property node.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::IsConnectedToOwningPropertyNode, USMGraphK2Node_PropertyIOWriterNode::IsConnectedToOwningPropertyNode


function IsPropertySelectionPin

virtual bool IsPropertySelectionPin(
    const UEdGraphPin * Pin
) const

Checks if a pin should allow selecting a property. This needs to return true for our custom pin widget to display.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::IsPropertySelectionPin, USMGraphK2Node_PropertyIOWriterNode::IsPropertySelectionPin


function IsPropertyConnectorPin

virtual bool IsPropertyConnectorPin(
    const UEdGraphPin * Pin
) const

Checks if a pin is input or output to another pin. This needs to return true for our custom pin widget to display.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::IsPropertyConnectorPin, USMGraphK2Node_PropertyIOWriterNode::IsPropertyConnectorPin


function CanDisplayConnectorPin

inline virtual bool CanDisplayConnectorPin(
    const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyData,
    const UEdGraphPin * InPin
) const

If the connector pin should be displayed on the same line as the property selector.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::CanDisplayConnectorPin, USMGraphK2Node_PropertyIOWriterNode::CanDisplayConnectorPin


function CanAcceptConnection

virtual bool CanAcceptConnection(
    const USMGraphK2Node_PropertyIOBase * OtherPropertyIONode
) const

If we're allowed to create a connection to another node.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::CanAcceptConnection, USMGraphK2Node_PropertyIOWriterNode::CanAcceptConnection


function CanAcceptConnection

virtual bool CanAcceptConnection(
    const USMGraphK2Node_PropertyNode_Base * OtherPropertyNode
) const

If we're allowed to accept a connection given just a property node.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::CanAcceptConnection, USMGraphK2Node_PropertyIOWriterNode::CanAcceptConnection


function GetAllPropertySelectionPins

TArray< UEdGraphPin * > GetAllPropertySelectionPins() const

Retrieve all pins that are property selections.


function AddReferencedIONode

void AddReferencedIONode(
    const FGuid & InPinGuid,
    USMGraphK2Node_PropertyNode_Base * InNode
)

Add a property node we are referencing through IO.


function RemoveReferencedIONode

void RemoveReferencedIONode(
    const FGuid & InPinGuid
)

Remove a referenced property from IO.


function GetIOReferenceCount

int32 GetIOReferenceCount(
    const USMGraphK2Node_PropertyNode_Base * InPropertyNode
) const

Return how many times another property is referenced.


function GetReferencedIONode

USMGraphK2Node_PropertyNode_Base * GetReferencedIONode(
    const FGuid & InPinGuid
) const

Find another property node we are referencing from a pin.


function GetAllReferencedIONodes

SMSYSTEMEDITOR_API TArray< USMGraphK2Node_PropertyNode_Base * > GetAllReferencedIONodes() const

Return all referenced IO nodes.


function ReapplyConnections

void ReapplyConnections()

Attempt to remake any connections. Can be useful if the node was cloned.


function CleanInvalidReferencedIONodes

void CleanInvalidReferencedIONodes()

Remove any IO nodes references that are no longer valid.


function FindOppositePin

SMSYSTEMEDITOR_API UEdGraphPin * FindOppositePin(
    const UEdGraphPin * InPin
) const

Look for a pin matching the name of the pin in the opposite direction.


function FindOppositePin

UEdGraphPin * FindOppositePin(
    const FName & InPinName
) const

function GetMaxReferencedIONodes

inline virtual int32 GetMaxReferencedIONodes() const

Retrieve the maximum allowed referenced IO nodes.

Reimplemented by: USMGraphK2Node_PropertyIOReaderNode::GetMaxReferencedIONodes, USMGraphK2Node_PropertyIOWriterNode::GetMaxReferencedIONodes

Can't pure virtual


function GetPropertySelectionPinIdentifierType

static FName GetPropertySelectionPinIdentifierType()

The generic identifier used to determine if this pin is for a property.


function GetInputPinPrefix

static inline FString GetInputPinPrefix()

function GetOutputPinPrefix

static inline FString GetOutputPinPrefix()

Protected Functions Documentation

function VerifyCorrectPinData

virtual void VerifyCorrectPinData(
    const UEdGraphPin * InPin,
    FCompilerResultsLog & InMessageLog
) const

Compile validation the pin data is correct and the corresponding property referenced.

Reimplemented by: USMGraphK2Node_PropertyIOWriterNode::VerifyCorrectPinData


function MakeAndWirePropertyPathStruct

UK2Node_MakeStruct * MakeAndWirePropertyPathStruct(
    FSMKismetCompilerContext & CompilerContext,
    const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & PropertyData,
    UEdGraphPin * OutputToPin
)

Create a struct with property path args consisting of property data, and wire to the output pin.


function SetPropertySelectionPinDefaults

void SetPropertySelectionPinDefaults(
    UEdGraphPin * Pin
)

Set the defaults of the selection pin.


function SetPropertyConnectorPinDefaults

void SetPropertyConnectorPinDefaults(
    UEdGraphPin * Pin
)

Set the defaults of the connector pin.


Protected Attributes Documentation

variable bProgramaticallySettingPropertyPinValue

bool bProgramaticallySettingPropertyPinValue = false;

If we are setting the default value of a pin not through user interaction.


variable bCallUpdatePropertySelectionOnValueChange

bool bCallUpdatePropertySelectionOnValueChange = true;

If UpdatePropertySelectionPin() should be called on a default value change.


Private Attributes Documentation

variable ReferencedIONodes

TMap< FGuid, TWeakObjectPtr< USMGraphK2Node_PropertyNode_Base > > ReferencedIONodes;

Other nodes we are referencing. Pin Guid to Reference