Skip to content

ISMEditorGraphNodeInterface

Module: SMSystem

#include <ISMEditorGraphNodeInterface.h>

Inherited by USMGraphNode_Base

Description

class ISMEditorGraphNodeInterface;

Interface for accessing editor graph nodes from non-editor modules.

Public Functions

Name
virtual TScriptInterface< ISMEditorGraphPropertyNodeInterface > GetEditorGraphProperty(FName PropertyName, const USMNodeInstance * NodeInstance, int32 ArrayIndex =0) const =0
images/classes/SMEditorGraphNodeInterface/img/nd_img_GetEditorGraphProperty.png
virtual TArray< TScriptInterface< ISMEditorGraphPropertyNodeInterface > > GetEditorGraphPropertyAsArray(FName PropertyName, const USMNodeInstance * NodeInstance, int32 ArrayIndex =-1) const =0
images/classes/SMEditorGraphNodeInterface/img/nd_img_GetEditorGraphPropertyAsArray.png
virtual TArray< TScriptInterface< ISMEditorGraphPropertyNodeInterface > > GetAllEditorGraphProperties(const USMNodeInstance * NodeInstance) const =0
images/classes/SMEditorGraphNodeInterface/img/nd_img_GetAllEditorGraphProperties.png
virtual USMNodeInstance * AddStackNode(TSubclassOf< USMNodeInstance > NodeClass, int32 StackIndex =INDEX_NONE) =0
virtual void RemoveStackNode(int32 StackIndex =INDEX_NONE) =0
virtual void ClearStackNodes() =0
virtual FString GetNodeName() const =0
images/classes/SMEditorGraphNodeInterface/img/nd_img_GetNodeName.png
virtual bool SetNodeName(const FString & NewName, FText & OutErrorMessage) =0
images/classes/SMEditorGraphNodeInterface/img/nd_img_SetNodeName.png
virtual void ResetNodeName() =0
images/classes/SMEditorGraphNodeInterface/img/nd_img_ResetNodeName.png
virtual TScriptInterface< ISMEditorGraphNode_StateBaseInterface > AsStateBaseInterface() =0
images/classes/SMEditorGraphNodeInterface/img/nd_img_AsStateBaseInterface.png

Public Functions Documentation

function GetEditorGraphProperty

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

images/classes/SMEditorGraphNodeInterface/img/nd_img_GetEditorGraphProperty.png

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.

Reimplemented by: USMGraphNode_Base::GetEditorGraphProperty


function GetEditorGraphPropertyAsArray

virtual TArray< TScriptInterface< ISMEditorGraphPropertyNodeInterface > > GetEditorGraphPropertyAsArray(
    FName PropertyName,
    const USMNodeInstance * NodeInstance,
    int32 ArrayIndex =-1
) const =0

images/classes/SMEditorGraphNodeInterface/img/nd_img_GetEditorGraphPropertyAsArray.png

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.

Reimplemented by: USMGraphNode_Base::GetEditorGraphPropertyAsArray


function GetAllEditorGraphProperties

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

images/classes/SMEditorGraphNodeInterface/img/nd_img_GetAllEditorGraphProperties.png

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.

Reimplemented by: USMGraphNode_Base::GetAllEditorGraphProperties


function AddStackNode

virtual USMNodeInstance * AddStackNode(
    TSubclassOf< USMNodeInstance > NodeClass,
    int32 StackIndex =INDEX_NONE
) =0

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.

Reimplemented by: USMGraphNode_Base::AddStackNode, USMGraphNode_StateNode::AddStackNode


function RemoveStackNode

virtual void RemoveStackNode(
    int32 StackIndex =INDEX_NONE
) =0

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.

Reimplemented by: USMGraphNode_Base::RemoveStackNode, USMGraphNode_StateNode::RemoveStackNode


function ClearStackNodes

virtual void ClearStackNodes() =0

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.

Reimplemented by: USMGraphNode_Base::ClearStackNodes, USMGraphNode_StateNode::ClearStackNodes


function GetNodeName

virtual FString GetNodeName() const =0

images/classes/SMEditorGraphNodeInterface/img/nd_img_GetNodeName.png

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.

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


function SetNodeName

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

images/classes/SMEditorGraphNodeInterface/img/nd_img_SetNodeName.png

Rename an editor graph node. This generally calls Rename() on the bound graph contained in the node.

Parameters:

NewName
The new node name to assign.
OutErrorMessage
The error message explaining why a node wasn't renamed, if any.

Return: True if the rename succeeded, false otherwise.

Note:

The rename policy is up to the node this is being called on. States enforce unique names per state machine scope and will automatically adjust duplicate names, whereas transitions allow duplicate names.

Reimplemented by: USMGraphNode_Base::SetNodeName


function ResetNodeName

virtual void ResetNodeName() =0

images/classes/SMEditorGraphNodeInterface/img/nd_img_ResetNodeName.png

Reset a node name back to its default.

Reimplemented by: USMGraphNode_Base::ResetNodeName, USMGraphNode_StateNodeBase::ResetNodeName


function AsStateBaseInterface

virtual TScriptInterface< ISMEditorGraphNode_StateBaseInterface > AsStateBaseInterface() =0

images/classes/SMEditorGraphNodeInterface/img/nd_img_AsStateBaseInterface.png

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.

Reimplemented by: USMGraphNode_Base::AsStateBaseInterface