FEdMode

Base class for all editor modes.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/EdMode.h

Include

#include "EdMode.h"

Syntax

class FEdMode :
    public TSharedFromThis< FEdMode >,
    public FGCObject,
    public FEditorCommonDrawHelper

Remarks

Base class for all editor modes.

Variables

Name Description

Protected variable

bool

 

bEditedPropertyIsTransform

Indicates

Protected variable

FModeTool *

 

CurrentTool

The tool that is currently active within this mode.

Protected variable

EAxisList::Type

 

CurrentWidgetAxis

The current axis that is being dragged on the widget.

Protected variable

int32

 

EditedPropertyIndex

If the property being edited is an array property, this is the index of the element we're currently dealing with

Protected variable

FString

 

EditedPropertyName

Name of the property currently being edited

Protected variable

FEditorModeInfo

 

Info

Information pertaining to this mode.

Protected variable

FEditorModeTool...

 

Owner

Pointer back to the mode tools that we are registered with

Protected variable

TSharedPtr< cla...

 

Toolkit

Editor Mode Toolkit that is associated with this toolkit mode

Protected variable

TArray< FModeTo...

 

Tools

Optional array of tools for this mode.

Constructors

Name Description

Public function

FEdMode()

Destructors

Name Description

Public function Virtual

~FEdMode()

Functions

Name Description

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 Const

bool

 

AllowsViewportDragTool()

Public function Virtual

bool

 

AllowWidgetMove()

If the EdMode is handling InputDelta (i.e., returning true from it), this allows a mode to indicated whether or not the Widget should also move.

Public function Virtual

bool

 

BoxSelect

(
    FBox& InBox,
    bool InSelect
)

Lets each mode/tool handle box selection in its own way.

Public function Virtual

void

 

BuildModeToolbar

(
    FToolBarBuilder& ToolbarBuilder
)

Called when the editor mode should rebuild its toolbar

Public function Static

bool

 

CanCreateWidgetForProperty

(
    UProperty* InProp
)

Returns true if this property can support creating a widget in the editor

Public function Static

bool

 

CanCreateWidgetForStructure

(
    const UStruct* InPropStruct
)

Returns true if this structure can support creating a widget in the editor

Public function Virtual Const

bool

 

CanCycleWidgetMode()

Check to see if the current widget mode can be cycled

Public function Virtual

bool

 

CapturedMouseMove

(
    FEditorViewportClient* InViewp...,
    FViewport* InViewport,
    int32 InMouseX,
    int32 InMouseY
)

Called when the mouse is moved while a window input capture is in effect

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

Public function Virtual

void

 

CurrentToolChanged()

Public function Virtual Const

bool

 

DisallowMouseDeltaTracking()

If the Edmode is handling its own mouse deltas, it can disable the MouseDeltaTacker

Public function Virtual

void

 

DrawBrackets

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport,
    const FSceneView* View,
    FCanvas* Canvas
)

Called when the mode wants to draw brackets around selected objects

Public function Virtual

void

 

DrawHUD

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport,
    const FSceneView* View,
    FCanvas* Canvas
)

Overlays the editor hud (brushes, drag tools, static mesh vertices, etc*.

Public function Virtual

bool

 

EndTracking

(
    FEditorViewportClient* InViewp...,
    FViewport* InViewport
)

Public function Virtual

void

 

Enter()

Public function Virtual

void

 

Exit()

Public function

FModeTool &#...

 

FindTool

(
    EModeTools InID
)

Public function Virtual

bool

 

FrustumSelect

(
    const FConvexVolume& InFrustum,
    FEditorViewportClient* InViewp...,
    bool InSelect
)

Lets each mode/tool handle frustum selection in its own way.

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 Const

const FModeT...

 

GetCurrentTool()

Public function

FModeTool &#...

 

GetCurrentTool()

Returns the current tool.

Public function Const

EAxisList::T...

 

GetCurrentWidgetAxis()

Public function Virtual Const

bool

 

GetCursor

(
    EMouseCursor::Type& OutCursor
)

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

Public function Virtual

bool

 

GetCustomDrawingCoordinateSystem

(
    FMatrix& InMatrix,
    void* InData
)

Public function Virtual

bool

 

GetCustomInputCoordinateSystem

(
    FMatrix& InMatrix,
    void* InData
)

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.

Protected function Virtual Const

UObject *...

 

GetItemToTryDisplayingWidgetsFor

(
    FTransform& OutWidgetToWorld
)

Finds the best item to display widgets for (preferring selected components over selected actors)

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

Protected function Const

void

 

GetPropertyWidgetInfos

(
    const UStruct* InStruct,
    const void* InContainer,
    TArray< FPropertyWidgetInfo >& Out...
)

Gets an array of property widget info structures for the given struct/class type for the given container.

Public function

TSharedPtr< ...

 

GetToolkit()

Gets the toolkit created by this mode

Public function Const

const TArray...

 

GetTools()

Public function Virtual

UTexture2D &...

 

GetVertexTexture()

Public function Virtual Const

EAxisList::T...

 

GetWidgetAxisToDraw

(
    FWidget::EWidgetMode InWidgetMode
)

Allows each mode to customize the axis pieces of the widget they want drawn.

Public function Virtual Const

FVector

 

GetWidgetLocation()

Allows each mode/tool to determine a good location for the widget to be drawn at.

Public function Virtual

FVector

 

GetWidgetNormalFromCurrentAxis

(
    void* InData
)

Public function Const

UWorld *

 

GetWorld()

Returns the world this toolkit is editing

Public function Virtual

bool

 

HandleClick

(
    FEditorViewportClient* InViewp...,
    HHitProxy* HitProxy,
    const FViewportClick& Click
)

Public function Virtual

bool

 

HandleDragDuplicate()

Called when attempting to duplicate the selected actors by alt+dragging, return true to prevent normal duplication.

Public function Virtual

void

 

Initialize()

Public function Virtual

bool

 

InputAxis

(
    FEditorViewportClient* InViewp...,
    FViewport* Viewport,
    int32 ControllerId,
    FKey Key,
    float Delta,
    float DeltaTime
)

Public function Virtual

bool

 

InputDelta

(
    FEditorViewportClient* InViewp...,
    FViewport* InViewport,
    FVector& InDrag,
    FRotator& InRot,
    FVector& InScale
)

Public function Virtual

bool

 

InputKey

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport,
    FKey Key,
    EInputEvent Event
)

Public function Virtual Const

bool

 

IsCompatibleWith

(
    FEditorModeID OtherModeID
)

Public function Const

bool

 

IsPendingDeletion()

Returns true if this mode is to be deleted at the next convenient opportunity (FEditorModeTools::Tick)

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

bool

 

IsSnapRotationEnabled()

If Rotation Snap should be enabled for this mode

Public function Virtual

bool

 

LostFocus

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport
)

Public function Virtual

void

 

MapChangeNotify()

Public function Virtual

bool

 

MouseEnter

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport,
    int32 x,
    int32 y
)

Public function Virtual

bool

 

MouseLeave

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport
)

Public function Virtual

bool

 

MouseMove

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport,
    int32 x,
    int32 y
)

Public function Virtual

bool

 

PostConvertMouseMovement

(
    FEditorViewportClient* InViewp...
)

Called after mouse movement is converted to drag/rot

Public function Virtual

void

 

PostUndo()

Public function Virtual

bool

 

PreConvertMouseMovement

(
    FEditorViewportClient* InViewp...
)

Called before mouse movement is converted to drag/rot

Public function Virtual

bool

 

ProcessCapturedMouseMoves

(
    FEditorViewportClient* InViewp...,
    FViewport* InViewport,
    const TArrayView< FIntPoint >& Cap...
)

Process all captured mouse moves that occurred during the current frame

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

bool

 

ReceivedFocus

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport
)

Public function Virtual

void

 

Render

(
    const FSceneView* View,
    FViewport* Viewport,
    FPrimitiveDrawInterface* PDI
)

Draws translucent polygons on brushes and volumes.

Public function

void

 

RequestDeletion()

Request that this mode be deleted at the next convenient opportunity (FEditorModeTools::Tick)

Public function Virtual

bool

 

Select

(
    AActor* InActor,
    bool bInSelected
)

Handling SelectActor

Public function Virtual

void

 

SelectionChanged()

Public function Virtual

void

 

SelectNone()

Public function

void

 

SetCurrentTool

(
    FModeTool* InModeTool
)

Public function

void

 

SetCurrentTool

(
    EModeTools InID
)

Public function

void

 

SetCurrentWidgetAxis

(
    EAxisList::Type InAxis
)

Public function Static

bool

 

ShouldCreateWidgetForProperty

(
    UProperty* InProp
)

See if we should create a widget for the supplied property when selecting an actor instance

Public function Virtual Const

bool

 

ShouldDrawBrushWireframe

(
    AActor* InActor
)

Public function Virtual Const

bool

 

ShouldDrawWidget()

Lets the mode determine if it wants to draw the widget or not.

Public function Virtual Const

bool

 

ShowModeWidgets()

Public function Virtual

bool

 

SnapRotatorToGridOverride

(
    FRotator& Rotation
)

If this mode should override the snap rotation

Public function Virtual

bool

 

StartTracking

(
    FEditorViewportClient* InViewp...,
    FViewport* InViewport
)

Public function Virtual

void

 

Tick

(
    FEditorViewportClient* Viewpor...,
    float DeltaTime
)

Public function Virtual

void

 

UpdateInternalData()

Public function Virtual Const

bool

 

UsesPropertyWidgets()

Lets each mode selectively enable widgets for editing properties tagged with 'Show 3D Widget' metadata.

Public function Virtual Const

bool

 

UsesToolkits()

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

Public function Virtual Const

bool

 

UsesTransformWidget()

Lets each tool determine if it wants to use the editor widget or not.

Public function Virtual Const

bool

 

UsesTransformWidget

(
    FWidget::EWidgetMode CheckMode
)

Lets each mode selectively exclude certain widget types.

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Pure virtual that must be overloaded by the inheriting class.

Classes

Name

Description

Public struct

FPropertyWidgetInfo

Property Widgets.

Constants

Name

Description

MD_MakeEditWidget

: Find a better home for these?

MD_ValidateWidgetUsing

Specifies a function used for validation of the current value of a property.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback