UEdModeInteractiveToolsContext

EdModeInteractiveToolsContext is an extension/adapter of an InteractiveToolsContext which allows it to be easily embedded inside an [FEdMode](API\Editor\UnrealEd\FEdMode).

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

EditorInteractiveToolsFramework

Header

/Engine/Source/Editor/Experimental/EditorInteractiveToolsFramework/Public/EdModeInteractiveToolsContext.h

Include

#include "EdModeInteractiveToolsContext.h"

Syntax

class UEdModeInteractiveToolsContext : public UInteractiveToolsContext

Remarks

EdModeInteractiveToolsContext is an extension/adapter of an InteractiveToolsContext which allows it to be easily embedded inside an FEdMode. A set of functions are provided which can be called from the FEdMode functions of the same name. These will handle the data type conversions and forwarding calls necessary to operate the ToolsContext

Variables

Name Description

Protected variable

IToolsContextAs...

 

AssetAPI

Protected variable

FDelegateHandle

 

BeginPIEDelegateHandle

Called when PIE is about to start, shuts down active tools

Protected variable

bool

 

bHaveSavedEditorState

Editor UI state that we set before starting tool and when exiting tool Currently disabling anti-aliasing during active Tools because it causes PDI flickering

Protected variable

bool

 

bInFlyMode

This will be set to true if user is in right-mouse "fly mode", which requires special handling to intercept hotkeys/etc

Protected variable

bool

 

bInvalidationPending

If true, we invalidate the ViewportClient on next tick

Protected variable

FInputDeviceSta...

 

CurrentMouseState

Input event instance used to keep track of various button states, etc, that we cannot directly query on-demand

Protected variable

FEdMode *

 

EditorMode

Protected variable

TArray< TUnique...

 

NextTickExecuteActions

Any actions in this array are executed at the start of the next Tick()

Protected variable

FDelegateHandle

 

PreSaveWorldDelegateHandle

Called before a Save starts. This currently shuts down active tools.

Protected variable

IToolsContextQu...

 

QueriesAPI

EdMode implementation of InteractiveToolFramework APIs - see ToolContextInterfaces.h.

Public variable

UMaterialInterf...

 

StandardVertexColorMaterial

Protected variable

IToolsContextTr...

 

TransactionAPI

Protected variable

FDelegateHandle

 

ViewportClientListChangedHandle

Called when viewport clients change

Protected variable

FDelegateHandle

 

WorldTearDownDelegateHandle

Called when a map is changed

Constructors

Functions

Name Description

Public function Virtual Const

bool

 

ActiveToolHasAccept()

Public function Virtual Const

bool

 

CanAcceptActiveTool()

Public function Virtual Const

bool

 

CanCancelActiveTool()

Public function Virtual Const

bool

 

CanCompleteActiveTool()

Public function Virtual Const

bool

 

CanStartTool

(
    const FString& ToolTypeIdentifier
)

Utility functions useful for hooking up to UICommand/etc

Public function Virtual

bool

 

CapturedMouseMove

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

Public function Virtual

void

 

EndTool

(
    EToolShutdownType ShutdownType
)

Public function Virtual

bool

 

EndTracking

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

Public function Const

IToolsContex...

 

GetAssetAPI()

Public function Virtual Const

FRay

 

GetLastWorldRay()

Public function Const

IToolsContex...

 

GetQueriesAPI()

Protected function Static

FRay

 

GetRayFromMousePos

(
    FEditorViewportClient* Viewpor...,
    FViewport* Viewport,
    int MouseX,
    int MouseY
)

Utility function to convert viewport x/y from mouse events (and others?) into scene ray.

Public function Const

IToolsContex...

 

GetTransactionAPI()

Public function Virtual

void

 

InitializeContextFromEdMode

(
    FEdMode* EditorMode,
    IToolsContextAssetAPI* UseAsse...
)

Public function Virtual

bool

 

InputKey

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

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

void

 

PostInvalidation()

Public function Virtual

bool

 

ProcessEditDelete()

Public function Virtual

void

 

Render

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

Protected function

void

 

RestoreEditorState()

Protected function

void

 

SaveEditorStateAndSetForTool()

Protected function

void

 

ScheduleExecuteAction

(
    TUniqueFunction< void()> Action
)

Push the input action onto the NextTickExecuteActions list.

Public function Virtual Const

bool

 

ShouldIgnoreHotkeys()

Public function Virtual

void

 

ShutdownContext()

Public function Virtual

void

 

StartTool

(
    const FString& ToolTypeIdentifier
)

Public function Virtual

bool

 

StartTracking

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

Public function Virtual

void

 

TerminateActiveToolsOnPIEStart()

Default behavior is to accept active tool

Public function Virtual

void

 

TerminateActiveToolsOnSaveWorld()

Default behavior is to accept active tool

Public function Virtual

void

 

TerminateActiveToolsOnWorldTearDown()

Default behavior is to accept active tool

Public function Virtual

void

 

Tick

(
    FEditorViewportClient* Viewpor...,
    float DeltaTime
)

Overridden from UInteractiveToolsContext

Name Description

Protected function Virtual

void

 

DeactivateActiveTool

(
    EToolSide WhichSide,
    EToolShutdownType ShutdownType
)

Protected function Virtual

void

 

DeactivateAllActiveTools()

Protected function Virtual

void

 

Initialize

(
    IToolsContextQueriesAPI* Queri...,
    IToolsContextTransactionsAPI* ...
)

We hide these

Protected function Virtual

void

 

Shutdown()

Shutdown Context by destroying InputRouter and ToolManager

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss