UBlueprintNodeSpawner

Intended to be wrapped and used by [FBlueprintActionMenuItem](API\Editor\Kismet\FBlueprintActionMenuItem).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

BlueprintGraph

Header

/Engine/Source/Editor/BlueprintGraph/Public/BlueprintNodeSpawner.h

Include

#include "BlueprintNodeSpawner.h"

Syntax

class UBlueprintNodeSpawner :
    public UObject,
    public IBlueprintNodeBinder

Remarks

Intended to be wrapped and used by FBlueprintActionMenuItem. Rather than sub-classing the menu item, we choose to subclass this instead (for different node types). That way, we get the type inference that comes with UObjects (and we don't have to continuously compare identification strings).

Variables

Name Description

Public variable

FCustomizeNodeD...

 

CustomizeNodeDelegate

A delegate to perform specialized node setup post-spawn (so you don't have to sub-class this for every node type).

Public variable

FBlueprintActio...

 

DefaultMenuSignature

Defines how this spawner is presented in the ui

Public variable

FUiSpecOverride...

 

DynamicUiSignatureGetter

Provides a way to override DefaultMenuSignature based off blueprint/graph/menu context

Public variable

TSubclassOf< UE...

 

NodeClass

Holds the node type that this spawner will instantiate.

Constructors

Name Description

Public function

UBlueprintNodeSpawner

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

void

 

ClearCachedTemplateNode()

Removes the spawner's cached template node (if it has one), meaning that the next GetTemplateNode() call will spawn a new one (and that calls to GetCachedTemplateNode() will return null).

Public function Static

UBlueprintNo...

 

Create

(
    TSubclassOf< UEdGraphNode > const N...,
    UObject* Outer,
    FCustomizeNodeDelegate PostSpawnDel...
)

Creates a new UBlueprintNodeSpawner for the specified node class.

Public function Static

UBlueprintNo...

 

Create

(
    UObject* Outer,
    FCustomizeNodeDelegate PostSpawnDel...
)

Templatized version of the above Create() method (where we specify the spawner's node class through the template argument).

Public function Const

UEdGraphNode...

 

GetCachedTemplateNode()

Retrieves a cached template for the node that this is set to spawn.

Public function Virtual Const

FBlueprintNo...

 

GetSpawnerSignature()

We want to be able to compare spawners, and have a signature that is rebuildable on subsequent runs.

Public function Const

UEdGraphNode...

 

GetTemplateNode

(
    UEdGraph* TargetGraph,
    FBindingSet const& Bindings
)

Retrieves a cached template for the node that this is set to spawn.

Public function Virtual Const

FBlueprintAc...

 

GetUiSpec

(
    FBlueprintActionContext const& Con...,
    FBindingSet const& Bindings
)

Takes the default FBlueprintActionUiSpec and modifies it dynamically to accommodate the current context.

Public function Virtual Const

UEdGraphNode...

 

Invoke

(
    UEdGraph* ParentGraph,
    FBindingSet const& Bindings,
    FVector2D const Location
)

Takes care of spawning a node for the specified graph.

Public function Virtual Const

bool

 

IsTemplateNodeFilteredOut

(
    FBlueprintActionFilter const& Filt...
)

Determine if the node of this spawner's template's type should be filtered in the actions menu

Public function Virtual

void

 

Prime()

Not required, but intended to passively help speed up menu building operations.

Public function Const

FBlueprintAc...

 

PrimeDefaultUiSpec

(
    UEdGraph* TargetGraph
)

Takes the FBlueprintActionUiSpec that this was spawned with and attempts to fill in any missing fields (by polling a template node).

Protected function Const

NodeType ...

 

SpawnNode

(
    UEdGraph* ParentGraph,
    FBindingSet const& Bindings,
    FVector2D const Location,
    FCustomizeNodeDelegate PostSpawnDel...
)

Simplified version of the other SpawnNode(), that just let's sub-classes specify their own post-spawn delegate (the node class is comes directly from the template parameter).

Protected function Const

NodeType ...

 

SpawnNode

(
    TSubclassOf< UEdGraphNode > NodeCla...,
    UEdGraph* ParentGraph,
    FBindingSet const& Bindings,
    FVector2D const Location,
    FCustomizeNodeDelegate PostSpawnDel...
)

Protected SpawnNode() that let's sub-classes specify their own post-spawn delegate and node class.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Overridden from IBlueprintNodeBinder

Name Description

Protected function Virtual Const

bool

 

BindToNode

(
    UEdGraphNode* Node,
    FBindingObject Binding
)

Attempts to apply the specified binding to the supplied node.

Public function Virtual Const

bool

 

CanBindMultipleObjects()

Determines if this will accept more than one binding (used to block multiple bindings from being applied to nodes that can only have one).

Public function Virtual Const

bool

 

IsBindingCompatible

(
    FBindingObject BindingCandidate
)

Checks to see if the specified object can be bound by this.

Typedefs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss