Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Public/GraphEditorActions.h
Phillip Kavan 3c858b79aa [UE-12263] Add ability to mark BlueprintCallable functions as "DevelopmentOnly" - by default, these nodes will be compiled out of Blueprint class function graphs at cook/package time.
change summary:
- deprecated the 'UEdGraphNode::bIsNodeEnabled' flag & added fixup code for serialization (load)
- added support for pruning "disabled" nodes at compile time w/o breaking existing flow in the source graph.
- modified function call nodes to look for new "DevelopmentOnly" UFUNCTION metadata and disable when found.
- added UEdGraphNode::IsNodeEnabled(), Enable() and Disable() APIs. also added a new 'bUserSetEnabledState' flag.
- added the UEdGraphNode::IsDevelopmentMode() API; subclasses can override to provide additional functionality if necessary.
- added a new 'UCookerSettings::bCompileBlueprintsInDevelopmentMode' flag to control whether or not Blueprints are compiled in development mode at cook time (accessible in Project Settings->Cooker); defaults to OFF.
- (experimental) added a "Compile Options" section to the Blueprint graph node context menu to allow users to explicitly enable or disable nodes.
- (experimental) added a BPGC setting to allow users to optionally override the cooker default setting for the development/release compile switch (UE-12270, WiP).
- the experimental features above are gated by a new 'UBlueprintEditorSettings::bAllowExplicitImpureNodeDisabling flag' (accessible in Editor Settings->Blueprint Editor); defaults to OFF for now.

[CL 2661302 by Phillip Kavan in Main branch]
2015-08-19 14:13:40 -04:00

143 lines
4.4 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "SlateBasics.h"
#include "EditorStyleSet.h"
class FGraphEditorCommandsImpl : public TCommands<FGraphEditorCommandsImpl>
{
public:
FGraphEditorCommandsImpl()
: TCommands<FGraphEditorCommandsImpl>( TEXT("GraphEditor"), NSLOCTEXT("Contexts", "GraphEditor", "Graph Editor"), NAME_None, FEditorStyle::GetStyleSetName() )
{
}
virtual ~FGraphEditorCommandsImpl()
{
}
GRAPHEDITOR_API virtual void RegisterCommands() override;
TSharedPtr< FUICommandInfo > ReconstructNodes;
TSharedPtr< FUICommandInfo > BreakNodeLinks;
// Execution sequence specific commands
TSharedPtr< FUICommandInfo > AddExecutionPin;
TSharedPtr< FUICommandInfo > RemoveExecutionPin;
// SetFieldsInStruct specific commands
TSharedPtr< FUICommandInfo > RemoveThisStructVarPin;
TSharedPtr< FUICommandInfo > RemoveOtherStructVarPins;
TSharedPtr< FUICommandInfo > RestoreAllStructVarPins;
// Select node specific commands
TSharedPtr< FUICommandInfo > AddOptionPin;
TSharedPtr< FUICommandInfo > RemoveOptionPin;
TSharedPtr< FUICommandInfo > ChangePinType;
// Pin visibility modes
TSharedPtr< FUICommandInfo > ShowAllPins;
TSharedPtr< FUICommandInfo > HideNoConnectionPins;
TSharedPtr< FUICommandInfo > HideNoConnectionNoDefaultPins;
// Event / Function Entry commands
TSharedPtr< FUICommandInfo > AddParentNode;
// Debugging commands
TSharedPtr< FUICommandInfo > RemoveBreakpoint;
TSharedPtr< FUICommandInfo > AddBreakpoint;
TSharedPtr< FUICommandInfo > EnableBreakpoint;
TSharedPtr< FUICommandInfo > DisableBreakpoint;
TSharedPtr< FUICommandInfo > ToggleBreakpoint;
// Encapsulation commands
TSharedPtr< FUICommandInfo > CollapseNodes;
TSharedPtr< FUICommandInfo > PromoteSelectionToFunction;
TSharedPtr< FUICommandInfo > PromoteSelectionToMacro;
TSharedPtr< FUICommandInfo > ExpandNodes;
TSharedPtr< FUICommandInfo > CollapseSelectionToFunction;
TSharedPtr< FUICommandInfo > CollapseSelectionToMacro;
// Alignment commands
TSharedPtr< FUICommandInfo > AlignNodesTop;
TSharedPtr< FUICommandInfo > AlignNodesMiddle;
TSharedPtr< FUICommandInfo > AlignNodesBottom;
TSharedPtr< FUICommandInfo > AlignNodesLeft;
TSharedPtr< FUICommandInfo > AlignNodesCenter;
TSharedPtr< FUICommandInfo > AlignNodesRight;
TSharedPtr< FUICommandInfo > DistributeNodesHorizontally;
TSharedPtr< FUICommandInfo > DistributeNodesVertically;
// Enable/disable commands
TSharedPtr< FUICommandInfo > EnableNodes;
TSharedPtr< FUICommandInfo > DisableNodes;
TSharedPtr< FUICommandInfo > EnableNodes_Always;
TSharedPtr< FUICommandInfo > EnableNodes_DevelopmentOnly;
//
TSharedPtr< FUICommandInfo > SelectReferenceInLevel;
TSharedPtr< FUICommandInfo > AssignReferencedActor;
// Find references
TSharedPtr< FUICommandInfo > FindReferences;
// Goto native code actions
TSharedPtr< FUICommandInfo > GotoNativeFunctionDefinition;
TSharedPtr< FUICommandInfo > GotoNativeVariableDefinition;
// Jumps to a call function node's graph
TSharedPtr< FUICommandInfo > GoToDefinition;
// Pin-specific actions
TSharedPtr< FUICommandInfo > BreakPinLinks;
TSharedPtr< FUICommandInfo > PromoteToVariable;
TSharedPtr< FUICommandInfo > PromoteToLocalVariable;
TSharedPtr< FUICommandInfo > SplitStructPin;
TSharedPtr< FUICommandInfo > RecombineStructPin;
TSharedPtr< FUICommandInfo > StartWatchingPin;
TSharedPtr< FUICommandInfo > StopWatchingPin;
// SkeletalControl specific commands
TSharedPtr< FUICommandInfo > SelectBone;
// Blend list options
TSharedPtr< FUICommandInfo > AddBlendListPin;
TSharedPtr< FUICommandInfo > RemoveBlendListPin;
// options for sequence/evaluator converter
TSharedPtr< FUICommandInfo > ConvertToSeqEvaluator;
TSharedPtr< FUICommandInfo > ConvertToSeqPlayer;
// options for blendspace sequence/evaluator converter
TSharedPtr< FUICommandInfo > ConvertToBSEvaluator;
TSharedPtr< FUICommandInfo > ConvertToBSPlayer;
// option for opening the asset related to the graph node
TSharedPtr< FUICommandInfo > OpenRelatedAsset;
//create a comment node
TSharedPtr< FUICommandInfo > CreateComment;
// Zoom in and out on the graph editor
TSharedPtr< FUICommandInfo > ZoomIn;
TSharedPtr< FUICommandInfo > ZoomOut;
// Go to node documentation
TSharedPtr< FUICommandInfo > GoToDocumentation;
};
class GRAPHEDITOR_API FGraphEditorCommands
{
public:
static void Register();
static const FGraphEditorCommandsImpl& Get();
static void Unregister();
};