UEdMode

Base class for all editor modes.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/Tools/UEdMode.h

Include

#include "Tools/UEdMode.h"

Syntax

class UEdMode : public UObject

Remarks

Base class for all editor modes.

Variables

Name Description

Protected variable

bool

 

bHaveSavedEditorState

Protected variable

bool

 

bSavedAntiAliasingState

Protected variable

FEditorModeInfo

 

Info

Information pertaining to this mode. Should be assigned in the constructor.

Protected variable

FEditorModeTool...

 

Owner

Pointer back to the mode tools that we are registered with

Protected variable

TSoftClassPtr< ...

 

SettingsClass

Protected variable

TObjectPtr< UOb...

 

SettingsObject

Protected variable

TSharedPtr< FUI...

 

ToolCommandList

Command list lives here so that the key bindings on the commands can be processed in the viewport.

Protected variable

TSharedPtr< FMo...

 

Toolkit

Editor Mode Toolkit that is associated with this toolkit mode

Constructors

Name Description

Public function

UEdMode()

Functions

Name Description

Protected function Virtual

void

 

ActivateDefaultTool()

Public function Virtual

void

 

ActorMoveNotify()

Public function Virtual

void

 

ActorPropChangeNotify()

Public function Virtual

void

 

ActorsDuplicatedNotify

(
    TArray< AActor* >& PreDuplica...,
    TArray< AActor* >& PostDuplic...,
    bool bOffsetLocations
)

Public function Virtual

void

 

ActorSelectionChangeNotify()

Public function Virtual

FEdMode *...

 

AsLegacyMode()

For use by the EditorModeTools class to get the legacy FEdMode type from a legacy FEdMode wrapper You should not need to override this function in your UEdMode implementation.

Protected function Virtual

void

 

BindCommands()

Public function Virtual Const

bool

 

CanAutoSave()

Check to see if this UEdMode wants to disallow AutoSave

Public function Virtual Const

bool

 

ComputeBoundingBoxForViewportFocus

(
    AActor* Actor,
    UPrimitiveComponent* Primitive...,
    FBox& InOutBox
)

Allows an editor mode to override the bounding box used to focus the viewport on a selection

Protected function Virtual

void

 

CreateToolkit()

Public function Virtual

void

 

Enter()

Public function Virtual

void

 

Exit()

Public function Virtual

EEditAction:...

 

GetActionEditCopy()

Public function Virtual

EEditAction:...

 

GetActionEditCut()

Public function Virtual

EEditAction:...

 

GetActionEditDelete()

Public function Virtual

EEditAction:...

 

GetActionEditDuplicate()

Added for handling EDIT Command...

Public function Virtual

EEditAction:...

 

GetActionEditPaste()

Public function Virtual Const

bool

 

GetCursor

(
    EMouseCursor::Type& OutCursor
)

Get a cursor to override the default with, if any.

Public function Const

EToolsContex...

 

GetDefaultToolScope()

Default Scope for InteractiveToolsContext API functions, eg RegisterTool(), GetToolManager(), GetInteractiveToolsContext().

Protected function Const

AActor *

 

GetFirstSelectedActorInstance()

Returns the first selected Actor, or NULL if there is no selection.

Public function Const

FEditorModeI...

 

GetID()

Returns the editor mode identifier.

Public function Const

UEditorInter...

 

GetInteractiveToolsContext

(
    EToolsContextScope ToolScope
)

Public function Virtual Const

TMap< FName,...

 

GetModeCommands()

Public function Const

const FEdito...

 

GetModeInfo()

Returns the editor mode information.

Public function Const

FEditorModeT...

 

GetModeManager()

Returns the owning mode manager for this mode

Public function Virtual Const

bool

 

GetOverrideCursorVisibility

(
    bool& bWantsOverride,
    bool& bHardwareCursorVisible,
    bool bSoftwareCursorVisible
)

Get override cursor visibility settings

Public function Virtual Const

bool

 

GetPivotForOrbit

(
    FVector& OutPivot
)

Lets each mode/tool specify a pivot point around which the camera should orbit

Public function

TWeakPtr< FM...

 

GetToolkit()

Gets the toolkit created by this mode

Public function Const

UInteractive...

 

GetToolManager

(
    EToolsContextScope ToolScope
)

Public function Const

UWorld *

 

GetWorld()

Returns the world this toolkit is editing

Public function Virtual

void

 

Initialize()

Public function Virtual Const

bool

 

IsCompatibleWith

(
    FEditorModeID OtherModeID
)

Public function Virtual Const

bool

 

IsOperationSupportedForCurrentAsset

(
    EAssetOperation InOperation
)

Check to see if this UEdMode wants to disallow operation on current asset

Public function Virtual Const

bool

 

IsSelectionAllowed

(
    AActor* InActor,
    bool bInSelection
)

Check to see if an actor can be selected in this mode - no side effects

Public function Virtual Const

bool

 

IsSelectionDisallowed

(
    AActor* InActor,
    bool bInSelection
)

Check to see if an actor selection is exclusively dissallowed by a mode no side effects

Public function Virtual

bool

 

IsSnapRotationEnabled()

If Rotation Snap should be enabled for this mode

Public function Virtual

void

 

MapChangeNotify()

Public function Virtual

void

 

ModeTick

(
    float DeltaTime
)

Protected function

void

 

OnModeActivated

(
    const FEditorModeID& InID,
    bool bIsActive
)

Public function Virtual

bool

 

OnRequestClose()

Protected function Virtual

void

 

OnToolEnded

(
    UInteractiveToolManager* Manag...,
    UInteractiveTool* Tool
)

Protected function Virtual

void

 

OnToolStarted

(
    UInteractiveToolManager* Manag...,
    UInteractiveTool* Tool
)

Public function Virtual

void

 

PostUndo()

Public function Virtual

bool

 

ProcessEditCopy()

Public function Virtual

bool

 

ProcessEditCut()

Public function Virtual

bool

 

ProcessEditDelete()

Public function Virtual

bool

 

ProcessEditDuplicate()

Public function Virtual

bool

 

ProcessEditPaste()

Public function Virtual

void

 

RegisterTool

(
    TSharedPtr< FUICommandInfo > UIComm...,
    FString ToolIdentifier,
    UInteractiveToolBuilder* Build...,
    EToolsContextScope ToolScope
)

Public function Virtual

bool

 

Select

(
    AActor* InActor,
    bool bInSelected
)

Handling SelectActor

Public function Virtual

void

 

SelectionChanged()

Public function Virtual

void

 

SelectNone()

Public function Virtual Const

bool

 

ShouldDrawBrushWireframe

(
    AActor* InActor
)

Public function Virtual Const

bool

 

ShouldToolStartBeAllowed

(
    const FString& ToolIdentifier
)

Subclasses can override this to add additional checks on whether a tool should be allowed to start.

Public function Virtual

bool

 

SnapRotatorToGridOverride

(
    FRotator& Rotation
)

If this mode should override the snap rotation

Public function Virtual

void

 

UpdateInternalData()

Public function Virtual Const

bool

 

UsesToolkits()

True if this mode uses a toolkit mode (eventually they all should)