UBaseLegacyWidgetEdMode

This class is to aid transitioning from native FEdModes to UEdModes, in the case that the [FEdMode](API\Editor\UnrealEd\FEdMode) used property widgets and/or transform widgets To use this class:

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

UnrealEd

Header

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

Include

#include "Tools/LegacyEdModeWidgetHelpers.h"

Syntax

class UBaseLegacyWidgetEdMode :
    public UEdMode,
    public ILegacyEdModeWidgetInterface,
    public ILegacyEdModeViewportInterface

Remarks

This class is to aid transitioning from native FEdModes to UEdModes, in the case that the FEdMode used property widgets and/or transform widgets To use this class:

Subclass FLegacyEdModeWidgetHelper, and override the methods needed for your native FEdMode implementation

Transition your native FEdMode to a UObject, by inheriting from this class

Override CreateWidgetHelper function to return a SharedRef to the class you created in step 1.

Variables

Name Description

Protected variable

TSharedPtr< FLe...

 

WidgetHelper

Functions

Name Description

Protected function Virtual

TSharedRef< ...

 

CreateWidgetHelper()

Overridden from UEdMode

Name Description

Public function Virtual

void

 

ActorSelectionChangeNotify()

Public function Virtual

void

 

Initialize()

If you need to do any initialization in your mode, be sure to still call through to this function.

Overridden from ILegacyEdModeWidgetInterface

Name Description

Public function Virtual

bool

 

AllowWidgetMove()

ILegacyEdModeWidgetInterface overrides are just a pass through to the FLegacyEdModeWidgetHelper.

Public function Virtual Const

bool

 

CanCycleWidgetMode()

Check to see if the current widget mode can be cycled

Public function Virtual

void

 

DrawHUD

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

Public function Virtual Const

EAxisList::T...

 

GetCurrentWidgetAxis()

Public function Virtual

bool

 

GetCustomDrawingCoordinateSystem

(
    FMatrix& InMatrix,
    void* InData
)

Public function Virtual

bool

 

GetCustomInputCoordinateSystem

(
    FMatrix& InMatrix,
    void* InData
)

Public function Virtual Const

EAxisList::T...

 

GetWidgetAxisToDraw

(
    UE::Widget::EWidgetMode InWidgetMod...
)

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 Virtual

void

 

Render

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

Public function Virtual

void

 

SetCurrentWidgetAxis

(
    EAxisList::Type InAxis
)

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 Const

bool

 

UsesPropertyWidgets()

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

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

(
    UE::Widget::EWidgetMode CheckMode
)

Lets each mode selectively exclude certain widget types.

Overridden from ILegacyEdModeViewportInterface

Name Description

Public function Virtual Const

bool

 

AllowsViewportDragTool()

Public function Virtual

bool

 

HandleClick

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

Public function Virtual

bool

 

InputDelta

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