Skip to content

LD::Editor::PropertyUtils::IO

Module: SMSystemEditor

Description

Utilities specifically related to data and operation of input/output properties. E.g., IO writer and reader nodes.

Classes

Name
struct LD::Editor::PropertyUtils::IO::FNodePropertyData
struct LD::Editor::PropertyUtils::IO::FOwningBlueprintPropertyData
struct LD::Editor::PropertyUtils::IO::FPropertyData_Base
struct LD::Editor::PropertyUtils::IO::FPropertyFilter

Types

Name
enum uint8 EPropertyOwnerType

Functions

Name
int32 GetPropertySerializerVersion()
FString SerializePropertyDataToString(const TSharedPtr< FPropertyData_Base > & InPropertyData, const TOptional< FName > & InVarName =TOptional< FName >())
TSharedPtr< FPropertyData_Base > DeserializeStringToPropertyData(const FString & InPropertyString)
SMSYSTEMEDITOR_API TSharedPtr< FPropertyData_Base > GetPropertyDataFromPin(const UEdGraphPin * Pin)
UEdGraph * GetPropertyOwnerStateGraph(const TSharedPtr< FPropertyData_Base > & InPropertyData, USMBlueprint * InBlueprint =nullptr)
USMGraphK2Node_PropertyNode_Base * GetPropertyNode(const TSharedPtr< FPropertyData_Base > & InPropertyData, USMBlueprint * InBlueprint =nullptr)
FText GetPropertyOwnerDisplayName(const TSharedPtr< FPropertyData_Base > & InPropertyData)
FText GetFormattedPropertyDisplayName(const TSharedPtr< FPropertyData_Base > & InPropertyData, bool bIncludeOwnerName =false)
SMSYSTEMEDITOR_API USMGraphK2Node_PropertyIOReaderNode * GetConnectedPropertyReaderNode(USMGraphK2Node_PropertyNode_Base * InPropertyNode)
USMGraphK2Node_PropertyIOReaderNode * GetOrPlacePropertyReaderNode(USMGraphK2Node_PropertyNode_Base * InPropertyNode, bool * bJustCreated =nullptr)
SMSYSTEMEDITOR_API USMGraphK2Node_PropertyIOWriterNode * GetConnectedPropertyWriterNode(USMGraphK2Node_PropertyNode_Base * InPropertyNode)
SMSYSTEMEDITOR_API USMGraphK2Node_PropertyIOWriterNode * GetOrPlacePropertyWriterNode(USMGraphK2Node_PropertyNode_Base * InPropertyNode, bool * bJustCreated =nullptr)
USMGraphK2Node_PropertyIOBase * FindPropertyIONodeThatShouldLinkToPropertyOutput(USMGraphK2Node_PropertyNode_Base * InPropertyNode, const USMGraphK2Node_PropertyIOBase * InToOutputProperty)
SMSYSTEMEDITOR_API void MakeWriterConnectionToOwningBlueprintProperty(USMGraphK2Node_PropertyIOWriterNode * InWriterNode, const FProperty * InProperty)
SMSYSTEMEDITOR_API bool TryMakePropertyConnection(USMGraphK2Node_PropertyNode_Base * InPropertyWithOutput, USMGraphK2Node_PropertyNode_Base * InPropertyWithInput)
SMSYSTEMEDITOR_API bool TryMakePropertyConnection(UEdGraphPin * InFromIONodePropertyPin, USMGraphK2Node_PropertyNode_Base * InToPropertyNode)
SMSYSTEMEDITOR_API bool TryMakePropertyConnection(UEdGraphPin * InFromIONodePropertyPin, const TSharedPtr< FPropertyData_Base > & InToPropertyData, USMBlueprint * InBlueprint =nullptr)
SMSYSTEMEDITOR_API void BreakPropertyConnection(UEdGraphPin * InFromIONodePropertyPin)
SMSYSTEMEDITOR_API void BreakAllPropertyConnections(const USMGraphK2Node_PropertyIOBase * InPropertyNode)
SMSYSTEMEDITOR_API void BreakAllPropertyConnections(USMGraphK2Node_PropertyNode_Base * InPropertyNode)
TArray< USMGraphK2Node_PropertyNode_Base * > GetAllConnectedPropertyNodes(USMGraphK2Node_PropertyNode_Base * InPropertyNode)
TSharedPtr< SWidget > MakeLinearExpressionNodeWidget(const TSharedPtr< FPropertyData_Base > & InPropertyData, const UEdGraphSchema * InSchema)
void RemapPropertyIOPinsAfterArrayMove(USMBlueprint * InBlueprint, const FGuid & InOwningNodeGuid, const FGuid & InOwningTemplateGuid, FName InPropertyName, int32 InFromIndex, int32 InToIndex)

Types Documentation

enum EPropertyOwnerType

Enumerator Value Description
Invalid
NodeInstance
OwningBlueprint

Functions Documentation

function GetPropertySerializerVersion

int32 GetPropertySerializerVersion()

Return the current property serializer version.


function SerializePropertyDataToString

FString SerializePropertyDataToString(
    const TSharedPtr< FPropertyData_Base > & InPropertyData,
    const TOptional< FName > & InVarName =TOptional< FName >()
)

Serializes the path to a property to a string.

Parameters:

InPropertyData
The property data to serialize.
InVarName
[Optional] The name of the variable to serialize. Normally looked up from property data, but could be different in case of a rename.

function DeserializeStringToPropertyData

TSharedPtr< FPropertyData_Base > DeserializeStringToPropertyData(
    const FString & InPropertyString
)

Extract property data from a string.


function GetPropertyDataFromPin

SMSYSTEMEDITOR_API TSharedPtr< FPropertyData_Base > GetPropertyDataFromPin(
    const UEdGraphPin * Pin
)

Extract property data from a pin.


function GetPropertyOwnerStateGraph

UEdGraph * GetPropertyOwnerStateGraph(
    const TSharedPtr< FPropertyData_Base > & InPropertyData,
    USMBlueprint * InBlueprint =nullptr
)

Retrieve the owning state graph, only valid for node property data.

Parameters:

InPropertyData
The property data, which should be NodePropertyData.
InBlueprint
[Optional] If not provided it will be found from the property data.

function GetPropertyNode

USMGraphK2Node_PropertyNode_Base * GetPropertyNode(
    const TSharedPtr< FPropertyData_Base > & InPropertyData,
    USMBlueprint * InBlueprint =nullptr
)

Retrieve the owning property node, only valid for node property data.

Parameters:

InPropertyData
The property data, which should be NodePropertyData.
InBlueprint
[Optional] If not provided it will be found from the property data.

function GetPropertyOwnerDisplayName

FText GetPropertyOwnerDisplayName(
    const TSharedPtr< FPropertyData_Base > & InPropertyData
)

Get the display name of the property owner (such as a state or blueprint).


function GetFormattedPropertyDisplayName

FText GetFormattedPropertyDisplayName(
    const TSharedPtr< FPropertyData_Base > & InPropertyData,
    bool bIncludeOwnerName =false
)

Get the best display name for a property.

Parameters:

InPropertyData
The property data.
bIncludeOwnerName
If the owner of the property should be prefixed, such as the owning state name.

Return: The fully formatted display name.


function GetConnectedPropertyReaderNode

SMSYSTEMEDITOR_API USMGraphK2Node_PropertyIOReaderNode * GetConnectedPropertyReaderNode(
    USMGraphK2Node_PropertyNode_Base * InPropertyNode
)

Return a connected reader node.


function GetOrPlacePropertyReaderNode

USMGraphK2Node_PropertyIOReaderNode * GetOrPlacePropertyReaderNode(
    USMGraphK2Node_PropertyNode_Base * InPropertyNode,
    bool * bJustCreated =nullptr
)

Find an existing connected IO reader node or place and connect a new one.


function GetConnectedPropertyWriterNode

SMSYSTEMEDITOR_API USMGraphK2Node_PropertyIOWriterNode * GetConnectedPropertyWriterNode(
    USMGraphK2Node_PropertyNode_Base * InPropertyNode
)

Return a connected writer node.


function GetOrPlacePropertyWriterNode

SMSYSTEMEDITOR_API USMGraphK2Node_PropertyIOWriterNode * GetOrPlacePropertyWriterNode(
    USMGraphK2Node_PropertyNode_Base * InPropertyNode,
    bool * bJustCreated =nullptr
)

Find an existing connected IO writer node or place and connect a new one. This will wire a connection if needed.


function FindPropertyIONodeThatShouldLinkToPropertyOutput

USMGraphK2Node_PropertyIOBase * FindPropertyIONodeThatShouldLinkToPropertyOutput(
    USMGraphK2Node_PropertyNode_Base * InPropertyNode,
    const USMGraphK2Node_PropertyIOBase * InToOutputProperty
)

Locate the correct IO property node to connect to another IO property node from a standard property node. If we pass in a writer node then this function should find the correct reader node. If we pass in a reader node then we should find the writer node.

Parameters:

InPropertyNode
The standard property node which could point to a reader or writer node.
InToOutputProperty
The IO node which we want the InPropertyNode to potentially reference. Most likely this belongs to another property node than InPropertyNode.

Return: The IO node, if it exists, which could be used to reference the InToOutputProperty.


function MakeWriterConnectionToOwningBlueprintProperty

SMSYSTEMEDITOR_API void MakeWriterConnectionToOwningBlueprintProperty(
    USMGraphK2Node_PropertyIOWriterNode * InWriterNode,
    const FProperty * InProperty
)

Makes a connection to a property belonging to the owning blueprint.


function TryMakePropertyConnection

SMSYSTEMEDITOR_API bool TryMakePropertyConnection(
    USMGraphK2Node_PropertyNode_Base * InPropertyWithOutput,
    USMGraphK2Node_PropertyNode_Base * InPropertyWithInput
)

Try to establish a connection between two property nodes. Will automatically look for correct pins.


function TryMakePropertyConnection

SMSYSTEMEDITOR_API bool TryMakePropertyConnection(
    UEdGraphPin * InFromIONodePropertyPin,
    USMGraphK2Node_PropertyNode_Base * InToPropertyNode
)

Try to establish a connection between an IONode and a property node. This will find or create IO nodes in relation to the property node.


function TryMakePropertyConnection

SMSYSTEMEDITOR_API bool TryMakePropertyConnection(
    UEdGraphPin * InFromIONodePropertyPin,
    const TSharedPtr< FPropertyData_Base > & InToPropertyData,
    USMBlueprint * InBlueprint =nullptr
)

Try to establish a connection between an IONode and corresponding property data. This will find or create IO nodes in relation to the property node.


function BreakPropertyConnection

SMSYSTEMEDITOR_API void BreakPropertyConnection(
    UEdGraphPin * InFromIONodePropertyPin
)

Break a connection given an IO node property pin.


function BreakAllPropertyConnections

SMSYSTEMEDITOR_API void BreakAllPropertyConnections(
    const USMGraphK2Node_PropertyIOBase * InPropertyNode
)

Break all IO connections for a given property output node.


function BreakAllPropertyConnections

SMSYSTEMEDITOR_API void BreakAllPropertyConnections(
    USMGraphK2Node_PropertyNode_Base * InPropertyNode
)

Break all IO connections for a given property node.


function GetAllConnectedPropertyNodes

TArray< USMGraphK2Node_PropertyNode_Base * > GetAllConnectedPropertyNodes(
    USMGraphK2Node_PropertyNode_Base * InPropertyNode
)

Find all connected property nodes, both input and output that are connected to the InPropertyNode.


function MakeLinearExpressionNodeWidget

TSharedPtr< SWidget > MakeLinearExpressionNodeWidget(
    const TSharedPtr< FPropertyData_Base > & InPropertyData,
    const UEdGraphSchema * InSchema
)

Make a node widget for use in a linear expression.


function RemapPropertyIOPinsAfterArrayMove

void RemapPropertyIOPinsAfterArrayMove(
    USMBlueprint * InBlueprint,
    const FGuid & InOwningNodeGuid,
    const FGuid & InOwningTemplateGuid,
    FName InPropertyName,
    int32 InFromIndex,
    int32 InToIndex
)

Remap IO pin selections that reference an array element on a node after that element moves.

Pin selections are serialized with an absolute (NodeGuid, PropertyName, ArrayIndex) tuple, so a move of element From -> To leaves the source pin still pointing at the original slot. This walks every property selection pin in the blueprint and rewrites matching ArrayIndex values to follow the moved data.