Language:
Discover
By Skill Level
By Category

FEditorModeTools

Choose your OS:

Inheritance Hierarchy

Syntax

class FEditorModeTools :
    public FGCObject ,
    public FEditorUndoClient

Remarks

A helper class to store the state of the various editor modes.

Variables

Name Description

Protected variable

bool

 

bHideViewportUI

If true, the viewports will hide all UI overlays

Protected variable

bool

 

bSelectionHasSceneComponent

If true the current selection has a scene component

Protected variable

bool

 

bShowWidget

If 1, draw the widget and let the user interact with it.

Public variable

FVector

 

CachedLocation

Protected variable

TArray < FEditor ...

 

DefaultModeIDs

List of default modes for this tool. These must all be compatible with each other.

Public variable

FVector

 

GridBase

Public variable

FString

 

InfoString

Draws in the top level corner of all FEditorViewportClient windows (can be used to relay info to the user).

Protected variable

TArray < TShared ...

 

Modes

A list of active editor modes.

Protected variable

FWidget::EWidge ...

 

OverrideWidgetMode

If the widget mode is being overridden, this will be != WM_None.

Public variable

FVector

 

PivotLocation

Public variable

bool

 

PivotShown

Protected variable

TMap < FEditorMo ...

 

RecycledModes

A list of previously active editor modes that we will potentially recycle

Public variable

bool

 

SnappedActor

Public variable

FVector

 

SnappedLocation

Public variable

bool

 

Snapping

Protected variable

TWeakPtr < ITool ...

 

ToolkitHost

The host of the toolkits created by these modes

Public variable

float

 

TranslateRotate2DAngle

The angles for the 2d translate rotate widget

Public variable

float

 

TranslateRotateXAxisAngle

The angle for the translate rotate widget

Protected variable

FWidget::EWidge ...

 

WidgetMode

The mode that the editor viewport widget is in.

Constructors

Destructors

Name Description

Public function Virtual

~FEditorModeTools()

Functions

Name Description

Public function

void

 

ActivateDefaultMode()

Activates the default modes defined by this class.

Public function

void

 

ActivateMode

(
    FEditorModeID InID,
    bool bToggle
)

Activates an editor mode.

Public function

void

 

AddDefaultMode

(
    const FEditorModeID DefaultModeID
)

Adds a new default mode to this tool's list of default modes.

Public function

bool

 

AllowsViewportDragTool()

Public function

bool

 

AllowWidgetMove()

End of FEditorUndoClient .

Public function

bool

 

BoxSelect

(
    FBox & InBox,
    bool InSelect
)

Notifies all active modes of box selection attempts

Public function

void

 

BroadcastEditorModeChanged

(
    FEdMode * Mode,
    bool IsEnteringMode
)

Broadcasts the EditorModeChanged event

Public function

void

 

BroadcastWidgetModeChanged

(
    FWidget::EWidgetMode InWidgetMode
)

Broadcasts the WidgetModeChanged event

Public function

bool

 

CanCycleWidgetMode()

Check with modes to see if the widget mode can be cycled

Public function

bool

 

CapturedMouseMove

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

Notifies all active modes of captured mouse movement

Public function

bool

 

CheckBookmark

(
    uint32 InIndex,
    FEditorViewportClient * InViewp...
)

Checks to see if a bookmark exists at a given index

Public function

void

 

ClearAllBookmarks

(
    FEditorViewportClient * InViewp...
)

Clears all book marks

Clears all book marks

Public function

void

 

ClearBookmark

(
    uint32 InIndex,
    FEditorViewportClient * InViewp...
)

Clears a bookmark from the list.

Clears a bookmark

Public function

void

 

CompactBookmarks

(
    FEditorViewportClient * InViewp...
)

Compacts the available bookmarks into mapped spaces.

Public function

void

 

CycleWidgetMode()

Cycle the widget mode, forwarding queries to modes

Used to cycle widget modes

Public function

void

 

DeactivateAllModes()

Deactivates all modes, note some modes can never be deactivated.

Public function

void

 

DeactivateMode

(
    FEditorModeID InID
)

Deactivates an editor mode.

Protected function

void

 

DeactivateModeAtIndex

(
    int32 InIndex
)

Deactivates the editor mode at the specified index

Public function

void

 

DestroyMode

(
    FEditorModeID InID
)

Deactivate the mode and entirely purge it from memory. Used when a mode type is unregistered

Public function

bool

 

DisallowMouseDeltaTracking()

True if we should disallow mouse delta tracking.

Public function

void

 

DrawActiveModes

(
    const FSceneView * InView,
    FPrimitiveDrawInterface * PDI
)

Draws all active modes

Draws all active mode components

Public function

void

 

DrawHUD

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

Draws the HUD for all active modes

Public function

bool

 

EndTracking

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

Mouse tracking interface. Passes tracking messages to all active modes

Public function

bool

 

EnsureNotInMode

(
    FEditorModeID ModeID,
    const FText & ErrorMsg,
    bool bNotifyUser
)

Returns true if the current mode is not the specified ModeID.

Public function

FEdMode *...

 

FindMode

(
    FEditorModeID InID
)

Returns the editor mode specified by the passed in ID

Public function

bool

 

FrustumSelect

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

Notifies all active modes of frustum selection attempts

Public function

const FEdMod ...

 

GetActiveMode

(
    FEditorModeID InID
)

Public function

FEdMode *...

 

GetActiveMode

(
    FEditorModeID InID
)

Returns a pointer to an active mode specified by the passed in ID If the editor mode is not active, NULL is returned

Public function

void

 

GetActiveModes

(
    TArray < FEdMode * >& OutActive...
)

Returns an array of all active modes

Public function

SpecificMode...

 

GetActiveModeTyped

(
    FEditorModeID InID
)

Public function

const Specif...

 

GetActiveModeTyped

(
    FEditorModeID InID
)

Public function

const FModeT ...

 

GetActiveTool

(
    FEditorModeID InID
)

Returns the active tool of the passed in editor mode.

Public function

ECoordSystem

 

GetCoordSystem

(
    bool bGetRawValue
)

Returns the current CoordSystem

Public function

bool

 

GetCursor

(
    EMouseCursor::Type & OutCursor
)

Get a cursor to override the default with, if any

Public function

FMatrix

 

GetCustomDrawingCoordinateSystem()

Returns a coordinate system that should be applied on top of the worldspace system.

Public function

FMatrix

 

GetCustomInputCoordinateSystem()

Public function

const uint32

 

GetMaxNumberOfBookmarks

(
    FEditorViewportClient * InViewp...
)

Gets the maximum number of bookmarks.

Public function Virtual

USelection &...

 

GetSelectedActors()

Returns the set of selected actors.

Public function Virtual

USelection &...

 

GetSelectedComponents()

Returns the set of selected components.

Public function Virtual

USelection &...

 

GetSelectedObjects()

The set of selected non-actor objects.

Public function

bool

 

GetShowFriendlyVariableNames()

Gets the current state of script editor usage of show friendly names @ return - If true, replace variable names with sanatized ones

Public function

bool

 

GetShowWidget()

Public function

TSharedPtr < ...

 

GetToolkitHost()

Returns the host for toolkits created via modes from this mode manager

Public function

EAxisList::T ...

 

GetWidgetAxisToDraw

(
    FWidget::EWidgetMode InWidgetMode
)

Gets the widget axis to be drawn

Public function

FVector

 

GetWidgetLocation()

Returns a good location to draw the widget at.

Public function

FWidget::EWi ...

 

GetWidgetMode()

Retrieves the current widget mode, taking overrides into account.

Public function Virtual

UWorld *

 

GetWorld()

Returns the world that is being edited by this mode manager

Public function

bool

 

HandleClick

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

Notifies all active modes of mouse click messages.

Public function

bool

 

HasToolkitHost()

Check if toolkit host exists

Public function

bool

 

InputAxis

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

Notifies all active modes of axis movement

Public function

bool

 

InputDelta

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

Notifies all active modes of any change in mouse movement

Public function

bool

 

InputKey

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

Notifies all active modes of keyboard input

Public function

bool

 

IsDefaultModeActive()

Returns true if the default modes are active.

Public function

bool

 

IsModeActive

(
    FEditorModeID InID
)

Returns true if the passed in editor mode is active

Public function

bool

 

IsTracking()

Public function

bool

 

IsViewportUIHidden()

Is the viewport UI hidden?

Public function

void

 

JumpToBookmark

(
    uint32 InIndex,
    bool bShouldRestoreLevelVisibility,
    FEditorViewportClient * InViewp...
)

Activates a bookmark from the list.

Retrieves a bookmark from the list.

Public function

void

 

JumpToBookmark

(
    uint32 InIndex,
    TSharedPtr < struct FBookmarkBaseJum ...,
    FEditorViewportClient * InViewp...
)

Activates a bookmark from the list.

Public function

void

 

LoadConfig()

End of FGCObject interface.

Public function

void

 

LoadWidgetSettings()

Load Widget Settings from Ini file

Public function

bool

 

LostFocus

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

Notifies all active modes that a viewport has lost focus

Public function

void

 

MapChangeNotify()

Notifies all active modes that a map change has occured

Public function

bool

 

MouseEnter

(
    FEditorViewportClient * InViewp...,
    FViewport * Viewport,
    int32 X,
    int32 Y
)

Public function

bool

 

MouseLeave

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

Public function

bool

 

MouseMove

(
    FEditorViewportClient * InViewp...,
    FViewport * Viewport,
    int32 X,
    int32 Y
)

Notifies all active modes that the mouse has moved

Public function

FEditorModeC ...

 

OnEditorModeChanged()

Protected function

void

 

OnEditorSelectionChanged

(
    UObject * NewSelection
)

Delegate handlers

Protected function

void

 

OnEditorSelectNone()

Public function

FWidgetModeC ...

 

OnWidgetModeChanged()

Public function

bool

 

ReceivedFocus

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

Notifies all active modes that a viewport has received focus

Public function

void

 

RemoveDefaultMode

(
    const FEditorModeID DefaultModeID
)

Removes a default mode

Public function

void

 

Render

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

Renders all active modes

Public function

void

 

SaveConfig()

Saves the current state to the INI file

Public function

void

 

SaveWidgetSettings()

Save Widget Settings to Ini file

Public function

bool

 

SelectionHasSceneComponent()

Whether or not the current selection has a scene component selected

Public function

void

 

SelectNone()

Notifies all active modes to empty their selections

Public function

void

 

SetBookmark

(
    uint32 InIndex,
    FEditorViewportClient * InViewp...
)

Sets a bookmark in the levelinfo file, allocating it if necessary.

Public function

void

 

SetCoordSystem

(
    ECoordSystem NewCoordSystem
)

Sets the current CoordSystem

Public function

void

 

SetCurrentWidgetAxis

(
    EAxisList::Type NewAxis
)

Sets the current widget axis

Public function

void

 

SetDefaultMode

(
    const FEditorModeID DefaultModeID
)

Set the default editor mode for these tools

Public function

void

 

SetHideViewportUI

(
    bool bInHideViewportUI
)

Sets the hide viewport UI state

Public function

void

 

SetPivotLocation

(
    const FVector & Location,
    const bool bIncGridBase
)

Sets the pivot locations

Public function

void

 

SetShowWidget

(
    bool InShowWidget
)

Public function

void

 

SetToolkitHost

(
    TSharedRef < IToolkitHost > Host
)

Sets the host for toolkits created via modes from this mode manager (can only be called once)

Public function

void

 

SetWidgetMode

(
    FWidget::EWidgetMode InWidgetMode
)

Changes the current widget mode.

Public function

void

 

SetWidgetModeOverride

(
    FWidget::EWidgetMode InWidgetMode
)

Allows you to temporarily override the widget mode.

Public function

bool

 

ShouldDrawBrushVertices()

True if brush vertices should be drawn

Public function

bool

 

ShouldDrawBrushWireframe

(
    AActor * InActor
)

True if the passed in brush actor should be drawn in wireframe

Public function

bool

 

StartTracking

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

Mouse tracking interface. Passes tracking messages to all active modes

Public function

void

 

Tick

(
    FEditorViewportClient * Viewpor...,
    float DeltaTime
)

Ticks all active modes

Public function

bool

 

UsesTransformWidget()

True if any active mode uses a transform widget

Public function

bool

 

UsesTransformWidget

(
    FWidget::EWidgetMode CheckMode
)

True if any active mode uses the passed in transform widget

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector & Collector
)

FGCObject interface.

Overridden from FEditorUndoClient

Name Description

Public function Virtual

void

 

PostRedo

(
    bool bSuccess
)

Signal that client should run any PostRedo code

Public function Virtual

void

 

PostUndo

(
    bool bSuccess
)

Begin FEditorUndoClient .

Classes

Name

Description

Public class

FEditorModeChangedEvent

Multicast delegate for OnModeEntered and OnModeExited callbacks.

Public class

FWidgetModeChangedEvent

Delegate type for triggering when widget mode changed

References

Module

UnrealEd

Header

Editor/UnrealEd/Public/EditorModeManager.h