UInteractiveTool

[UInteractiveTool](API\Runtime\InteractiveToolsFramework\UInteractiveTool) is the base class for all Tools in the InteractiveToolsFramework.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UInteractiveTool

UBspConversionTool

UClickDragTool

UCubeGridTool

UDrawAndRevolveTool

UDrawPolygonTool

UDrawPolyPathTool

UGroomToMeshTool

UMultiSelectionTool

UMotionTrailTool

UMultiSelectionMeshEditingTool

UAddPivotActorTool

UAlignObjectsTool

UAttributeEditorTool

UBakeMeshAttributeTool

UBakeMeshAttributeMapsToolBase

UBakeMeshAttributeMapsTool

UBakeMultiMeshAttributeMapsTool

UBakeMeshAttributeVertexTool

UBakeTransformTool

UBaseCreateFromSelectedTool

UBaseVoxelTool

UVoxelBlendMeshesTool

UVoxelMorphologyMeshesTool

UVoxelSolidifyMeshesTool

UCSGMeshesTool

UCutMeshWithMeshTool

USelfUnionMeshesTool

UCombineMeshesTool

UConvertMeshesTool

UEditNormalsTool

UEditPivotTool

UGenerateStaticMeshLODAssetTool

ULODManagerTool

UMergeMeshesTool

UMirrorTool

UPhysicsInspectorTool

UPlaneCutTool

URemeshMeshTool

UProjectToTargetTool

URemoveOccludedTrianglesTool

USetCollisionGeometryTool

USkinWeightsBindingTool

USplitMeshesTool

UTransferMeshTool

UTransformMeshesTool

UUVLayoutTool

UVoxelCSGMeshesTool

USequencerPivotTool

USingleClickTool

UAddPatchTool

UAddPrimitiveTool

UAddArrowPrimitiveTool

UAddBoxPrimitiveTool

UAddConePrimitiveTool

UAddCylinderPrimitiveTool

UAddDiscPrimitiveTool

UAddRectanglePrimitiveTool

UAddSpherePrimitiveTool

UAddStairsPrimitiveTool

UAddTorusPrimitiveTool

UMeshClickTool

UTextureAdapterClickTool

UVertexAdapterClickTool

USingleSelectionTool

UBaseMeshProcessingTool

UOffsetMeshTool

USmoothMeshTool

UMeshSurfacePointTool

UBaseBrushTool

UDynamicMeshBrushTool

UMeshAttributePaintTool

UMeshSelectionTool

UEditMeshMaterialsTool

USeamSculptTool

UShapeSprayTool

USkinWeightsPaintTool

UMeshTexturePaintingTool

UMeshVertexPaintingTool

UMeshColorPaintingTool

UMeshWeightPaintingTool

UDeformMeshPolygonsTool

UDynamicMeshSculptTool

UEditUVIslandsTool

UGroomCardsEditorTool

UMeshSculptToolBase

UMeshGroupPaintTool

UMeshVertexSculptTool

USingleSelectionMeshEditingTool

UConvertToPolygonsTool

UDisplaceMeshTool

UEditMeshPolygonsTool

UExtractCollisionGeometryTool

UGenerateLODMeshesTool

UHoleFillTool

ULatticeDeformerTool

UMeshBoundaryToolBase

URevolveBoundaryTool

UMeshInspectorTool

UMeshSpaceDeformerTool

UMeshTangentsTool

UMeshToVolumeTool

UParameterizeMeshTool

UPolygonOnMeshTool

URecomputeUVsTool

USimplifyMeshTool

USubdividePolyTool

UUVProjectionTool

UWeldMeshEdgesTool

UUVEditorChannelEditTool

UUVEditorLayoutTool

UUVEditorParameterizeMeshTool

UUVEditorRecomputeUVsTool

UUVEditorSeamTool

UUVSelectTool

UVolumeToMeshTool

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/InteractiveToolsFramework/Public/InteractiveTool.h

Include

#include "InteractiveTool.h"

Syntax

class UInteractiveTool :
    public UObject,
    public IInputBehaviorSource

Remarks

UInteractiveTool is the base class for all Tools in the InteractiveToolsFramework. A Tool is is a "lightweight mode" that may "own" one or more Actors/Components/etc in the current scene, may capture certain input devices or event streams, and so on. The base implementation essentially does nothing but provide sane default behaviors.

The BaseTools/ subfolder contains implementations of various kinds of standard "tool behavior", like a tool that responds to a mouse click, etc, that can be extended to implement custom behaviors.

In the framework, you do not create instances of UInteractiveTool yourself. You provide a UInteractiveToolBuilder implementation that can properly construct an instance of your Tool, this is where for example default parameters would be set. The ToolBuilder is registered with the ToolManager, and then UInteractiveToolManager::ActivateTool() is used to kick things off.

Variables

Name Description

Protected variable

TObjectPtr< UIn...

 

InputBehaviors

The current set of InputBehaviors provided by this Tool

Public variable

OnInteractiveTo...

 

OnPropertyModifiedDirectlyByTool

Public variable

OnInteractiveTo...

 

OnPropertySetsModified

Protected variable

TArray< TObject...

 

ToolPropertyObjects

The current set of Property UObjects provided by this Tool. May contain pointer to itself.

Constructors

Name Description

Public function

UInteractiveTool()

Functions

Name Description

Public function Virtual

void

 

AddInputBehavior

(
    UInputBehavior* Behavior,
    void* Source
)

Input Behaviors support Add an input behavior for this Tool.

Protected function Virtual

void

 

AddToolPropertySource

(
    UObject* PropertyObject
)

Add a Property object for this Tool

Protected function Virtual

void

 

AddToolPropertySource

(
    UInteractiveToolPropertySet* P...
)

Add a PropertySet object for this Tool

Public function Virtual Const

bool

 

CanAccept()

Public function Virtual

void

 

DrawHUD

(
    FCanvas* Canvas,
    IToolsContextRenderAPI* Render...
)

Allow the Tool to do any custom screen space drawing

Public function Virtual

void

 

ExecuteAction

(
    int32 ActionID
)

Request that the Action identified by ActionID be executed.

Public function Virtual

FInteractive...

 

GetActionSet()

Get the internal Action Set for this Tool. The action set is created and registered on-demand.

Public function Virtual Const

FInteractive...

 

GetToolInfo()

Tool Information (name, icon, help text, etc)

Public function Virtual Const

UInteractive...

 

GetToolManager()

Public function Virtual Const

TArray< UObj...

 

GetToolProperties

(
    bool bEnabledOnly
)

Property support

Public function Virtual Const

bool

 

HasAccept()

Public function Virtual Const

bool

 

HasCancel()

Protected function Virtual Const

void

 

NotifyOfPropertyChangeByTool

(
    UInteractiveToolPropertySet* P...
)

Call after changing a propertyset internally in the tool to allow external views of the property set to update properly.

Public function Virtual

void

 

OnPropertyModified

(
    UObject* PropertySet,
    FProperty* Property
)

Automatically called by UInteractiveToolPropertySet.OnModified delegate to notify Tool of child property set changes

Protected function Virtual

void

 

RegisterActions

(
    FInteractiveToolActionSet& ActionS...
)

Override this function to register the set of Actions this Tool supports, using FInteractiveToolActionSet::RegisterAction.

Public function Virtual

void

 

RemoveInputBehaviorsBySource

(
    void* Source
)

Remove all input behaviors that had the given source pointer set during their addition.

Protected function Virtual

bool

 

RemoveToolPropertySource

(
    UInteractiveToolPropertySet* P...
)

Remove a PropertySet object from this Tool. If found, will broadcast OnPropertySetsModified

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Allow the Tool to do any custom drawing (ie via PDI/RHI)

Protected function Virtual

bool

 

ReplaceToolPropertySource

(
    UInteractiveToolPropertySet* C...,
    UInteractiveToolPropertySet* R...,
    bool bSetToEnabled
)

Replace a PropertySet object on this Tool with another property set.

Public function Virtual

void

 

SetToolDisplayName

(
    const FText& NewName
)

Set Tool name

Public function Virtual

void

 

SetToolInfo

(
    const FInteractiveToolInfo& NewInf...
)

Replace existing ToolInfo with new data

Protected function Virtual

bool

 

SetToolPropertySourceEnabled

(
    UInteractiveToolPropertySet* P...,
    bool bEnabled
)

Enable/Disable a PropertySet object for this Tool.

Public function Virtual

void

 

Setup()

Called by ToolManager to initialize the Tool after ToolBuilder::BuildTool() has been called

Public function Virtual

void

 

Shutdown

(
    EToolShutdownType ShutdownType
)

Called by ToolManager to shut down the Tool

Public function Virtual

void

 

Tick

(
    float DeltaTime
)

Non overrideable func which does processing and calls the tool's OnTick

Protected function Virtual

void

 

UpdateAcceptWarnings

(
    EAcceptWarning Warning
)

Helper function to update a standard warning when we need to explain why "Accept" is disabled

Overridden from IInputBehaviorSource

Name Description

Public function Virtual Const

const UInput...

 

GetInputBehaviors()

Enums

Name

Description

Protected enum

EAcceptWarning

Typedefs

Name

Description

OnInteractiveToolPropertyInternallyModified

OnPropertyModifiedDirectlyByTool is broadcast whenever the ToolPropertyObjects array stays the same, but a property inside of one of the objects is changed internally by the tool.

OnInteractiveToolPropertySetsModified

OnPropertySetsModified is broadcast whenever the contents of the ToolPropertyObjects array is modified