Skip to content

USMGraphK2Node_PropertyIOWriterNode

Module: SMSystemEditor

#include <SMGraphK2Node_PropertyIOWriterNode.h>

Inherits from USMGraphK2Node_PropertyIOBase, IK2Node_AddPinInterface, ISMGraphK2Node_LinearExpressionInterface

Description

class USMGraphK2Node_PropertyIOWriterNode;

Write output data to variables.

Blueprint Variables - Variables in the owning blueprint will be written to immediately. State Variables - When connecting to a state input variable, the output value is written to a proxy variable first. When the state input reads this output, it will query the value of the proxy at that time.

Public Functions

Name
virtual void AllocateDefaultPins() override
virtual void ReallocatePinsDuringReconstruction(TArray< UEdGraphPin * > & OldPins) override
virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar & ActionRegistrar) const override
virtual bool IsActionFilteredOut(FBlueprintActionFilter const & Filter) override
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override
virtual bool CanUserDeleteNode() const override
virtual bool CanDuplicateNode() const override
virtual void PinDefaultValueChanged(UEdGraphPin * Pin) override
virtual void PinConnectionListChanged(UEdGraphPin * Pin) override
virtual void OnPinRemoved(UEdGraphPin * InRemovedPin) override
virtual void GetNodeContextMenuActions(UToolMenu * Menu, UGraphNodeContextMenuContext * Context) const override
virtual void AddInputPin() override
virtual bool CanAddPin() const override
virtual void RemoveInputPin(UEdGraphPin * Pin) override
virtual bool CanRemovePin(const UEdGraphPin * Pin) const override
virtual void PreCompileValidate(FCompilerResultsLog & MessageLog) override
virtual bool HandlesOwnExpansion() const override
virtual void CustomExpandNode(FSMKismetCompilerContext & CompilerContext, USMGraphK2Node_RuntimeNodeContainer * RuntimeNodeContainer, FProperty * NodeProperty) override
virtual UEdGraphPin * TryGetOwningPropertyNodeRelatedPin() const override
virtual bool IsConnectedToOwningPropertyNode() const override
virtual bool IsPropertySelectionPin(const UEdGraphPin * Pin) const override
virtual bool IsPropertyConnectorPin(const UEdGraphPin * Pin) const override
virtual bool CanDisplayConnectorPin(const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyData, const UEdGraphPin * InPin) const override
virtual bool CanAcceptConnection(const USMGraphK2Node_PropertyIOBase * OtherPropertyIONode) const override
virtual bool CanAcceptConnection(const USMGraphK2Node_PropertyNode_Base * OtherPropertyNode) const override
virtual TSharedPtr< SWidget > MakeLinearExpressionNodeWidget() const override
virtual TSharedPtr< SWidget > MakeLinearExpressionPinWidget(const UEdGraphPin * InPin) const override
virtual bool DisplayParenthesis() const override
bool CanRemoveAllPins() const
void RemoveAllPins()
void RemovePropertyPin(UEdGraphPin * Pin, bool bModify)
void UpdatePrimaryInputPin(UEdGraphPin * PrimaryInputPin)
UEdGraphPin * FindOrAddAndSetPropertyPinForPropertyData(const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyData)
void ClearOrRemovePropertyPinForPropertyData(const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyData)
UEdGraphPin * GetPrimaryInputPin() const
bool IsWritingToProxyOutput() const
SMSYSTEMEDITOR_API TArray< TTuple< UEdGraphPin *, TSharedPtr< LD::Editor::PropertyUtils::IO::FOwningBlueprintPropertyData > > > GetOwningBlueprintOutputPins() const
int32 GetNumOutputs() const
SMSYSTEMEDITOR_API TArray< UEdGraphPin * > GetAllPropertyOutputs() const
bool IsPrimaryInputPin(const UEdGraphPin * Pin)

Protected Functions

Name
virtual int32 GetMaxReferencedIONodes() const override
virtual void VerifyCorrectPinData(const UEdGraphPin * InPin, FCompilerResultsLog & InMessageLog) const override
UEdGraphPin * CreateConnectorPin()
UEdGraphPin * AddConnectorAndSelectionPinsImpl(int32 InIndex)
void TryCreateAvailablePin()
FName CreateInputPinName(int32 InNameIndex) const
FName CreateOutputPinName(int32 InNameIndex) const
FName CreatePrimaryInputPinName()

Additional inherited members

Public Functions inherited from USMGraphK2Node_PropertyIOBase

Name
virtual bool IsCompatibleWithGraph(UEdGraph const * Graph) const override
virtual void DestroyNode() override
virtual void ReconstructNode() override
virtual bool CanCollapseNode() const 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 bool ShouldBreakResultPinLinksOnTypeChange() 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
FName GetPropertySelectionPinIdentifierType()
FString GetInputPinPrefix()
FString GetOutputPinPrefix()

Protected Functions inherited from USMGraphK2Node_PropertyIOBase

Name
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 inherited from USMGraphK2Node_PropertyIOBase

Name
bool bProgramaticallySettingPropertyPinValue
bool bCallUpdatePropertySelectionOnValueChange

Public Functions Documentation

function AllocateDefaultPins

virtual void AllocateDefaultPins() override

function ReallocatePinsDuringReconstruction

virtual void ReallocatePinsDuringReconstruction(
    TArray< UEdGraphPin * > & OldPins
) override

function GetMenuActions

virtual void GetMenuActions(
    FBlueprintActionDatabaseRegistrar & ActionRegistrar
) const override

function IsActionFilteredOut

virtual bool IsActionFilteredOut(
    FBlueprintActionFilter const & Filter
) override

function GetNodeTitle

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

function CanUserDeleteNode

virtual bool CanUserDeleteNode() const override

function CanDuplicateNode

inline virtual bool CanDuplicateNode() const override

function PinDefaultValueChanged

virtual void PinDefaultValueChanged(
    UEdGraphPin * Pin
) override

Reimplements: USMGraphK2Node_PropertyIOBase::PinDefaultValueChanged


function PinConnectionListChanged

virtual void PinConnectionListChanged(
    UEdGraphPin * Pin
) override

Reimplements: USMGraphK2Node_PropertyIOBase::PinConnectionListChanged


function OnPinRemoved

virtual void OnPinRemoved(
    UEdGraphPin * InRemovedPin
) override

function GetNodeContextMenuActions

virtual void GetNodeContextMenuActions(
    UToolMenu * Menu,
    UGraphNodeContextMenuContext * Context
) const override

function AddInputPin

virtual void AddInputPin() override

function CanAddPin

virtual bool CanAddPin() const override

function RemoveInputPin

virtual void RemoveInputPin(
    UEdGraphPin * Pin
) override

Provide either an input or output pin.


function CanRemovePin

virtual bool CanRemovePin(
    const UEdGraphPin * Pin
) const override

function PreCompileValidate

virtual void PreCompileValidate(
    FCompilerResultsLog & MessageLog
) override

Reimplements: USMGraphK2Node_PropertyIOBase::PreCompileValidate


function HandlesOwnExpansion

inline virtual bool HandlesOwnExpansion() const override

function CustomExpandNode

virtual void CustomExpandNode(
    FSMKismetCompilerContext & CompilerContext,
    USMGraphK2Node_RuntimeNodeContainer * RuntimeNodeContainer,
    FProperty * NodeProperty
) override

function TryGetOwningPropertyNodeRelatedPin

virtual UEdGraphPin * TryGetOwningPropertyNodeRelatedPin() const override

Try to locate the related pin to our property node.

Reimplements: USMGraphK2Node_PropertyIOBase::TryGetOwningPropertyNodeRelatedPin


function IsConnectedToOwningPropertyNode

virtual bool IsConnectedToOwningPropertyNode() const override

Check for a direct connection to the owning property node.

Reimplements: USMGraphK2Node_PropertyIOBase::IsConnectedToOwningPropertyNode


function IsPropertySelectionPin

virtual bool IsPropertySelectionPin(
    const UEdGraphPin * Pin
) const override

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

Reimplements: USMGraphK2Node_PropertyIOBase::IsPropertySelectionPin


function IsPropertyConnectorPin

virtual bool IsPropertyConnectorPin(
    const UEdGraphPin * Pin
) const override

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

Reimplements: USMGraphK2Node_PropertyIOBase::IsPropertyConnectorPin


function CanDisplayConnectorPin

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

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

Reimplements: USMGraphK2Node_PropertyIOBase::CanDisplayConnectorPin


function CanAcceptConnection

virtual bool CanAcceptConnection(
    const USMGraphK2Node_PropertyIOBase * OtherPropertyIONode
) const override

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

Reimplements: USMGraphK2Node_PropertyIOBase::CanAcceptConnection


function CanAcceptConnection

virtual bool CanAcceptConnection(
    const USMGraphK2Node_PropertyNode_Base * OtherPropertyNode
) const override

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

Reimplements: USMGraphK2Node_PropertyIOBase::CanAcceptConnection


function MakeLinearExpressionNodeWidget

virtual TSharedPtr< SWidget > MakeLinearExpressionNodeWidget() const override

Generate a widget for displaying a node in a linear expression.

Return: A widget to display in an expression, or nullptr to use the default widget.

Reimplements: ISMGraphK2Node_LinearExpressionInterface::MakeLinearExpressionNodeWidget


function MakeLinearExpressionPinWidget

virtual TSharedPtr< SWidget > MakeLinearExpressionPinWidget(
    const UEdGraphPin * InPin
) const override

Generate a widget for displaying a pin owned by this node in a linear expression.

Return: A widget to display in an expression, or nullptr to use the default widget.

Reimplements: ISMGraphK2Node_LinearExpressionInterface::MakeLinearExpressionPinWidget


function DisplayParenthesis

inline virtual bool DisplayParenthesis() const override

Whether to display the evaluation "( )" around the pin.

Reimplements: ISMGraphK2Node_LinearExpressionInterface::DisplayParenthesis


function CanRemoveAllPins

bool CanRemoveAllPins() const

Checks if we can remove all input and output pins.


function RemoveAllPins

void RemoveAllPins()

Remove all input and output pins.


function RemovePropertyPin

void RemovePropertyPin(
    UEdGraphPin * Pin,
    bool bModify
)

Remove a specific property pin. Different from RemoveInputPin so we can pass our own arguments.


function UpdatePrimaryInputPin

void UpdatePrimaryInputPin(
    UEdGraphPin * PrimaryInputPin
)

Make sure primary input pin is the correct type.


function FindOrAddAndSetPropertyPinForPropertyData

UEdGraphPin * FindOrAddAndSetPropertyPinForPropertyData(
    const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyData
)

Find or create a new pin and set the property data if not already set.


function ClearOrRemovePropertyPinForPropertyData

void ClearOrRemovePropertyPinForPropertyData(
    const TSharedPtr< LD::Editor::PropertyUtils::IO::FPropertyData_Base > & InPropertyData
)

Remove a pin matching the property data, or clear it if it's the only entry.


function GetPrimaryInputPin

UEdGraphPin * GetPrimaryInputPin() const

Retrieve the primary input pin.


function IsWritingToProxyOutput

bool IsWritingToProxyOutput() const

Checks if this node has any proxy outputs (other state variables).


function GetOwningBlueprintOutputPins

SMSYSTEMEDITOR_API TArray< TTuple< UEdGraphPin *, TSharedPtr< LD::Editor::PropertyUtils::IO::FOwningBlueprintPropertyData > > > GetOwningBlueprintOutputPins() const

Find pins where this node is writing to the owning blueprint variables.


function GetNumOutputs

inline int32 GetNumOutputs() const

Total number of user outputs.


function GetAllPropertyOutputs

SMSYSTEMEDITOR_API TArray< UEdGraphPin * > GetAllPropertyOutputs() const

Return array of property output pins.


function IsPrimaryInputPin

static bool IsPrimaryInputPin(
    const UEdGraphPin * Pin
)

Checks if a pin is the primary input pin.


Protected Functions Documentation

function GetMaxReferencedIONodes

inline virtual int32 GetMaxReferencedIONodes() const override

Retrieve the maximum allowed referenced IO nodes.

Reimplements: USMGraphK2Node_PropertyIOBase::GetMaxReferencedIONodes

Can't pure virtual


function VerifyCorrectPinData

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

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

Reimplements: USMGraphK2Node_PropertyIOBase::VerifyCorrectPinData


function CreateConnectorPin

UEdGraphPin * CreateConnectorPin()

Create a new connector pin and return the result and increment total count.


function AddConnectorAndSelectionPinsImpl

UEdGraphPin * AddConnectorAndSelectionPinsImpl(
    int32 InIndex
)

Add an output pin and a matching input pin.


function TryCreateAvailablePin

void TryCreateAvailablePin()

Check if we need an available pin and create one.


function CreateInputPinName

FName CreateInputPinName(
    int32 InNameIndex
) const

function CreateOutputPinName

FName CreateOutputPinName(
    int32 InNameIndex
) const

function CreatePrimaryInputPinName

static FName CreatePrimaryInputPinName()

Private Attributes Documentation

variable NumOutputs

int32 NumOutputs = 1;

Number of outputs this node will write to. The IK2Node_AddPinInterface interface refers to this as inputs, but we actually add outputs, which will then create inputs depending on their type.