FBlueprintDragDropMenuItem

At certain times we want a single menu entry that represents a set of UBlueprintNodeSpawners (generally when all those UBlueprintNodeSpawners wrap the same [UField](API\Runtime\CoreUObject\UObject\UField)).

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FEdGraphSchemaAction

FBlueprintDragDropMenuItem

References

Module

Kismet

Header

/Engine/Source/Editor/Kismet/Public/BlueprintDragDropMenuItem.h

Include

#include "BlueprintDragDropMenuItem.h"

Syntax

struct FBlueprintDragDropMenuItem : public FEdGraphSchemaAction

Remarks

At certain times we want a single menu entry that represents a set of UBlueprintNodeSpawners (generally when all those UBlueprintNodeSpawners wrap the same UField). We do this to keep the menu less jumbled, and instead use the drag/drop action to present a sub-menu to the user (so they can pick the the node type that they want). We do this with both delegates and variable nodes (where the user can pick a getter vs. a setter, etc.).

This class represents those "consolidated" actions, and essentially serves as a FDragDropOperation spawner. It wraps a single UBlueprintNodeSpawner (any one of the set that it is supposed to represent), that it uses to determine the proper FDragDropOperation.

Constructors

Name Description

Public function

FBlueprintDragDropMenuItem()

Default constructor for USTRUCT() purposes.

Public function

FBlueprintDragDropMenuItem

(
    FBlueprintActionContext const& Con...,
    UBlueprintNodeSpawner const* S...,
    int32 MenuGrouping,
    FText InNodeCategory,
    FText InMenuDesc,
    FText InToolTip
)

Sole constructor, which ensures that the RepresentativeAction member is set (and valid).

Functions

Name Description

Public function

void

 

AppendAction

(
    UBlueprintNodeSpawner const* A...
)

Public function Const

TSet< UBluep...

 

GetActionSet()

Public function

FSlateBrush ...

 

GetMenuIcon

(
    FSlateColor& ColorOut
)

Retrieves the icon brush for this menu entry (to be displayed alongside in the menu).

Public function Const

UBlueprintNo...

 

GetSampleAction()

Public function Const

TSharedPtr< ...

 

OnDragged

(
    FNodeCreationAnalytic AnalyticsDele...
)

Attempts to create a certain drag/drop action with respect to the set UBlueprintNodeSpawner.

Public function Static

FName

 

StaticGetTypeId()

Overridden from FEdGraphSchemaAction

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

GC.

Public function Virtual Const

FName

 

GetTypeId()

Public function Virtual

UEdGraphNode...

 

PerformAction

(
    UEdGraph* ParentGraph,
    UEdGraphPin* FromPin,
    FVector2D const Location,
    bool bSelectNewNode
)

Execute this action, given the graph and schema, and possibly a pin that we were dragged from.

Public function Virtual

UEdGraphNode...

 

PerformAction

(
    UEdGraph* ParentGraph,
    TArray< UEdGraphPin* >& FromP...,
    FVector2D const Location,
    bool bSelectNewNode
)

Execute this action, given the graph and schema, and possibly a pin that we were dragged from.