Navigation
API > API/Editor > API/Editor/EditorInteractiveToolsFramework
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UInteractiveToolsContext
- UEditorInteractiveToolsContext
- UEdModeInteractiveToolsContext
- UModeManagerInteractiveToolsContext
- UWidgetToolsContext
References
| Module | EditorInteractiveToolsFramework |
| Header | /Engine/Source/Editor/Experimental/EditorInteractiveToolsFramework/Public/EdModeInteractiveToolsContext.h |
| Include | #include "EdModeInteractiveToolsContext.h" |
Syntax
class UEditorInteractiveToolsContext : public UInteractiveToolsContext
Remarks
UEditorInteractiveToolsContext is an extension/adapter of an InteractiveToolsContext designed for use in the UE Editor. Currently this implementation assumes that it is created by a Mode Manager (FEditorModeTools), and that the Mode Manager will call various API functions like Render() and Tick() when necessary.
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
| Type | Name | Description | |
|---|---|---|---|
| UGizmoViewContext * | GizmoViewContext | An object in which we save the current scene view information that gizmos can use on the game thread to figure out how big the gizmo is for hit testing. | |
| TMap< FViewportClient *, int32 > | InvalidationMap | Tools need to be able to Invalidate the view, in case it is not Realtime. | |
| int32 | InvalidationTimestamp | Current invalidation timestamp, incremented by invalidation calls | |
| FOnDrawHUD | OnDrawHUD | ||
| FOnRender | OnRender | ||
| FOnTick | OnTick | ||
| TOptional< EToolShutdownType > | PendingToolShutdownType | ||
| TOptional< FString > | PendingToolToStart | ||
| IToolsContextQueriesAPI * | QueriesAPI | EdMode implementation of InteractiveToolFramework APIs - see ToolContextInterfaces.h. | |
| TObjectPtr< UMaterialInterface > | StandardVertexColorMaterial | ||
| IToolsContextTransactionsAPI * | TransactionAPI |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Activate () |
||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | CanStartTool
(
const FString ToolTypeIdentifier |
Utility functions useful for hooking up to UICommand/etc | |
| void | Deactivate () |
||
| void | DrawHUD
(
FViewportClient* ViewportClient, |
||
| void | EndTool
(
EToolShutdownType ShutdownType |
||
| bool | |||
| FString | |||
| bool | |||
| bool | |||
| FRay | |||
| FEditorModeTools * | |||
| IToolsContextQueriesAPI * | |||
| FRay | GetRayFromMousePos
(
FEditorViewportClient* ViewportClient, |
Utility function to convert viewport x/y from mouse events (and others?) into scene ray. | |
| IToolsContextTransactionsAPI * | |||
| UWorld * | GetWorld () |
||
| bool | |||
| void | InitializeContextWithEditorModeManager
(
FEditorModeTools* InEditorModeManager, |
Initialize a new ToolsContext for an EdMode owned by the given InEditorModeManager | |
| void | OnEditorSelectionSetChanged
(
const UTypedElementSelectionSet* InSelectionSet |
Handle Editor selection changes | |
| void | OnLevelEditorCreated
(
TSharedPtr< ILevelEditor > InLevelEditor |
Called upon Level Editor Created in order to bind to EditorElementSelectionPtr changed event since global selection set is not initialized before the tools context. | |
| void | OnToolEnded
(
UInteractiveToolManager* InToolManager, |
||
| void | OnToolPostBuild
(
UInteractiveToolManager* InToolManager, |
||
| void | Call this to notify the Editor that the viewports this ToolsContext is related to may need a repaint, ie during interactive tool usage | ||
| bool | |||
| void | Render
(
const FSceneView* View, |
||
| void | |||
| void | SetAbsoluteWorldSnappingEnabled
(
bool bEnabled |
Configure whether Transform Gizmos created by the ITF (eg CombinedTransformGizmo) should, when in World coordinate system, snap to an Absolute world-aligned grid, or snap Relative to the initial position of any particular gizmo transform. | |
| void | 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 | ||
| void | SetEnableRenderingDuringHitProxyPass
(
bool bEnabled |
Configuration functions Configure whether Render() should early-out for HitProxy rendering passes. | |
| void | SetForceCombinedGizmoMode
(
bool bEnabled |
Configure whether Transform Gizmos created by the ITF (eg CombinedTransformGizmo) should prefer to show in 'Combined' mode. | |
| void | Shutdown ToolsContext and clean up any connections/etc | ||
| void | |||
| void | Default behavior is to cancel active tool | ||
| void | Default behavior is to accept active tool | ||
| void | Default behavior is to accept active tool | ||
| void | Default behavior is to cancel active tool | ||
| void | Tick
(
FEditorViewportClient* ViewportClient, |
Call functions of the same name on the ToolManager and GizmoManager |
Overridden from UInteractiveToolsContext
| Type | Name | Description | |
|---|---|---|---|
| void | DeactivateActiveTool
(
EToolSide WhichSide, |
||
| void | DeactivateAllActiveTools
(
EToolShutdownType ShutdownType |
||
| void | Initialize
(
IToolsContextQueriesAPI* QueriesAPI, |
We hide these | |
| void | Shutdown () |
Shutdown Context by destroying InputRouter and ToolManager |