Navigation
Unreal Engine C++ API Reference > Editor > UnrealEd > Tools
Inheritance Hierarchy
- TCommands< CommandContextType >
- TInteractiveToolCommands
- FCubeGridToolActionCommands
- FDrawAndRevolveToolActionCommands
- FDrawPolygonToolActionCommands
- FEditMeshMaterialsToolActionCommands
- FEditMeshPolygonsToolActionCommands
- FMeshAttributePaintToolActionCommands
- FMeshGroupPaintToolActionCommands
- FMeshPaintingToolActionCommands
- FMeshPlaneCutToolActionCommands
- FMeshSelectionToolActionCommands
- FMeshVertexPaintToolActionCommands
- FModelingToolActionCommands
- FSculptToolActionCommands
- FTransformToolActionCommands
- FUVEditorBrushSelectToolCommands
- FUVEditorToolActionCommands
- FVertexSculptToolActionCommands
References
Module | UnrealEd |
Header | /Engine/Source/Editor/UnrealEd/Public/Tools/InteractiveToolsCommands.h |
Include | #include "Tools/InteractiveToolsCommands.h" |
Syntax
template<typename CommandContextType>
class TInteractiveToolCommands : public TCommands< CommandContextType >
Remarks
TInteractiveToolCommands is a base class that handles connecting up Tool Actions (ie the FInteractiveToolAction provided by a UInteractiveTool) to the UnrealEditor Command system, which allows for remappable hotkeys, etc
Usage is as follows:
- in your EdMode Module, create a subclass-instance of this, say FMyToolCommands and call FMyToolCommands::Register() in your ::StartupModule() function
- subclass must implement GetToolDefaultObjectList(), here you just add GetMutableDefault
to the input list for all your Tools - add a member TSharedPtr
UICommandList; to your EdMode impl - when you start a new Tool, call FMyToolCommands::Get().BindCommandsForCurrentTool(UICommandList, NewTool)
- when you end a Tool, call FMyToolCommands::Get().UnbindActiveCommands()
- in your EdModeImpl::InputKey override, call UICommandList->ProcessCommandBindings()
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
TArray< FToolActionCommand > | ActionCommands | |
![]() |
TMap< EStandardToolActions, FToolActionCommand > | SharedActionCommands | Support for sharing common commands between Tools where the commands are not shared across Tool Modes (and hence not in FStandardToolModeCommands) List FToolActionCommands for standard Tool Actions |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
TInteractiveToolCommands
(
const FName InContextName, |
Forwarding constructor |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() ![]() |
void | BindCommandsForCurrentTool
(
TSharedPtr< FUICommandList > UICommandList, |
Bind any of the registered UICommands to the given Tool, if they are compatible. |
![]() |
bool | FindOrCreateSharedCommand
(
EStandardToolActions ActionID, |
Find or Create a UICommand for a standard Tool Action, that will be shared across Tools |
![]() ![]() |
TSharedPtr< FUICommandInfo > | FindStandardCommand
(
EStandardToolActions ToolActionID |
Query FStandardToolModeCommands to find an existing command/hotkey for this standard tool action |
![]() |
void | GetToolDefaultObjectList
(
TArray< UInteractiveTool* >& ToolCDOs |
Interface that subclasses need to implement RegisterCommands() needs actual UInteractiveTool instances for all the Tools that want to provide Actions which will be connected to hotkeys. |
![]() ![]() |
bool | IntializeStandardToolAction
(
EStandardToolActions ActionID, |
Create a suitable FInteractiveToolAction for the standard Tool Action, ie with suitable command name and description strings and hotkeys. |
![]() ![]() |
void | Initialize commands. | |
![]() |
void | RegisterUIToolCommand
(
const FInteractiveToolAction& ToolAction, |
Utility function that registeres a Tool Aciton as a UICommand |
![]() ![]() ![]() |
void | UnbindActiveCommands
(
TSharedPtr< FUICommandList > UICommandList |
Unbind all of the currently-registered commands |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FToolActionCommand | List of pairs of known Tool Actions and their associated UICommands. |