Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
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.
| Name | UInteractiveTool |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/InteractiveTool.h |
| Include Path | #include "InteractiveTool.h" |
Syntax
UCLASS (Transient, MinimalAPI)
class UInteractiveTool :
public UObject ,
public IInputBehaviorSource
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInteractiveTool
Implements Interfaces
Derived Classes
UInteractiveTool derived class hierarchy
- UBaseMeshFromSplinesTool
- UBspConversionTool
- UClickDragTool
- UConvertMeshesTool
- UCubeGridTool
- UDrawAndRevolveTool
- UDrawPolygonTool
- UDrawPolyPathTool
- UDrawSplineTool
- UGroomToMeshTool
- UISMEditorTool
- UMultiSelectionTool
- UScriptableInteractiveTool
- USingleClickTool
- USingleSelectionTool
- UUVEditorBrushSelectTool
- UUVEditorChannelEditTool
- UUVEditorLayoutTool
- UUVEditorMechanicAdapterTool
- UUVEditorParameterizeMeshTool
- UUVEditorRecomputeUVsTool
- UUVEditorSeamTool
- UUVEditorTexelDensityTool
- UUVEditorTransformTool
- UUVEditorUVSnapshotTool
- UUVSelectTool
- UVolumeToMeshTool
- UAvaInteractiveToolsToolBase
- URectangleSelectTool
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UInteractiveTool() |
InteractiveTool.h |
Enums
Protected
| Name | Remarks |
|---|---|
| EAcceptWarning |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| OnInteractiveToolPropertyInternallyModified | TMulticastDelegate_OneParam< void, UObject * > | 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. | InteractiveTool.h |
| OnInteractiveToolPropertySetsModified | TMulticastDelegate_NoParams< void > | OnPropertySetsModified is broadcast whenever the contents of the ToolPropertyObjects array is modified | InteractiveTool.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnPropertyModifiedDirectlyByTool | OnInteractiveToolPropertyInternallyModified | InteractiveTool.h | ||
| OnPropertySetsModified | OnInteractiveToolPropertySetsModified | InteractiveTool.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bLastShowedAcceptWarning | bool | Tracks whether the UpdateAcceptWarnings function showed a warning the last time it was called. | InteractiveTool.h | |
| DefaultToolInfo | FInteractiveToolInfo | ToolInfo for this Tool | InteractiveTool.h | |
| ToolActionSet | FInteractiveToolActionSet * | Set of actions this Tool can execute. | InteractiveTool.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddInputBehavior
(
UInputBehavior* Behavior, |
Input Behaviors support Add an input behavior for this Tool. | InteractiveTool.h | |
virtual bool CanAccept() |
InteractiveTool.h | ||
virtual void DrawHUD
(
FCanvas* Canvas, |
Allow the Tool to do any custom screen space drawing | InteractiveTool.h | |
virtual void ExecuteAction
(
int32 ActionID |
Request that the Action identified by ActionID be executed. | InteractiveTool.h | |
virtual FInteractiveToolActionSet * GetActionSet () |
Action support/system | InteractiveTool.h | |
virtual FInteractiveToolInfo GetToolInfo() |
Tool Information (name, icon, help text, etc) | InteractiveTool.h | |
virtual UInteractiveToolManager * GetToolManager() |
InteractiveTool.h | ||
| Property support | InteractiveTool.h | ||
virtual bool HasAccept() |
InteractiveTool.h | ||
virtual bool HasCancel() |
InteractiveTool.h | ||
| Automatically called by UInteractiveToolPropertySet.OnModified delegate to notify Tool of child property set changes | InteractiveTool.h | ||
virtual void RemoveInputBehaviorsBySource
(
void* Source |
Remove all input behaviors that had the given source pointer set during their addition. | InteractiveTool.h | |
virtual void Render
(
IToolsContextRenderAPI* RenderAPI |
Allow the Tool to do any custom drawing (ie via PDI/RHI) | InteractiveTool.h | |
virtual void SetToolDisplayMessage
(
const FText& NewDisplayMessage |
Set the Tool's Display Message | InteractiveTool.h | |
virtual void SetToolDisplayName
(
const FText& NewName |
Set Tool name | InteractiveTool.h | |
virtual void SetToolIcon
(
const FSlateBrush* NewIcon |
Set the Tool's Icon | InteractiveTool.h | |
virtual void SetToolInfo
(
const FInteractiveToolInfo& NewInfo |
Replace existing ToolInfo with new data | InteractiveTool.h | |
virtual void Setup() |
Called by ToolManager to initialize the Tool after ToolBuilder::BuildTool() has been called | InteractiveTool.h | |
virtual void Shutdown
(
EToolShutdownType ShutdownType |
Called by ToolManager to shut down the Tool | InteractiveTool.h | |
virtual void Tick
(
float DeltaTime |
Non overrideable func which does processing and calls the tool's OnTick | InteractiveTool.h |
Overridden from IInputBehaviorSource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const UInputBehaviorSet * GetInputBehaviors() |
InteractiveTool.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddToolPropertySource
(
UObject* PropertyObject |
Add a Property object for this Tool | InteractiveTool.h | |
virtual void AddToolPropertySource
(
UInteractiveToolPropertySet* PropertySet |
Add a PropertySet object for this Tool | InteractiveTool.h | |
virtual void NotifyOfPropertyChangeByTool
(
UInteractiveToolPropertySet* PropertySet |
Call after changing a propertyset internally in the tool to allow external views of the property set to update properly. | InteractiveTool.h | |
virtual void OnTick
(
float DeltaTime |
Allow the Tool to do any necessary processing on Tick | InteractiveTool.h | |
virtual void RegisterActions
(
FInteractiveToolActionSet& ActionSet |
Override this function to register the set of Actions this Tool supports, using FInteractiveToolActionSet::RegisterAction. | InteractiveTool.h | |
virtual bool RemoveToolPropertySource
(
UInteractiveToolPropertySet* PropertySet |
Remove a PropertySet object from this Tool. If found, will broadcast OnPropertySetsModified | InteractiveTool.h | |
virtual bool ReplaceToolPropertySource
(
UInteractiveToolPropertySet* CurPropertySet, |
Replace a PropertySet object on this Tool with another property set. | InteractiveTool.h | |
virtual bool SetToolPropertySourceEnabled
(
UInteractiveToolPropertySet* PropertySet, |
Enable/Disable a PropertySet object for this Tool. | InteractiveTool.h | |
virtual void UpdateAcceptWarnings
(
EAcceptWarning Warning |
Helper function to update a standard warning when we need to explain why "Accept" is disabled Note that calling this base implementation will clear any unrelated warnings. | InteractiveTool.h |