Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
UBaseBrushTool implements standard brush-style functionality for an InteractiveTool. This includes: 1) brush radius property set with dimension-relative brush sizing and default brush radius hotkeys 2) brush indicator visualization 3) tracking of last brush stamp location via .LastBrushStamp FProperty 4) status of brush stroke via .bInBrushStroke FProperty 5) "B" hotkey to adjust brush radius / strength by click-dragging in the viewport
| Name | UBaseBrushTool |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseTools/BaseBrushTool.h |
| Include Path | #include "BaseTools/BaseBrushTool.h" |
Syntax
UCLASS (MinimalAPI)
class UBaseBrushTool : public UMeshSurfacePointTool
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UInteractiveTool → USingleSelectionTool → UMeshSurfacePointTool → UBaseBrushTool
Implements Interfaces
- IClickDragBehaviorTarget
- IModifierToggleBehaviorTarget
- IHoverBehaviorTarget
- IInputBehaviorSource
- IInteractiveToolCameraFocusAPI
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBaseBrushTool() |
BaseTools/BaseBrushTool.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bInBrushStroke | bool | Set to true by Tool if user is currently in an active brush stroke | BaseTools/BaseBrushTool.h | |
| BrushProperties | TObjectPtr< UBrushBaseProperties > | Properties that control brush size/etc | BaseTools/BaseBrushTool.h | |
| LastBrushStamp | FBrushStampData | Position of brush at last update (both during stroke and during Hover) | BaseTools/BaseBrushTool.h | |
| WorldToLocalScale | float | Uniform scale factor that scales from world space (where brush usually exists) to local space | BaseTools/BaseBrushTool.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bEnabled | bool | BaseTools/BaseBrushTool.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DecreaseBrushFalloffAction() |
BaseTools/BaseBrushTool.h | ||
virtual void DecreaseBrushSizeAction() |
BaseTools/BaseBrushTool.h | ||
virtual void DecreaseBrushStrengthAction() |
BaseTools/BaseBrushTool.h | ||
virtual double GetCurrentBrushRadius() |
BaseTools/BaseBrushTool.h | ||
virtual double GetCurrentBrushRadiusLocal() |
BaseTools/BaseBrushTool.h | ||
virtual void IncreaseBrushFalloffAction() |
BaseTools/BaseBrushTool.h | ||
virtual void IncreaseBrushSizeAction() |
BaseTools/BaseBrushTool.h | ||
virtual void IncreaseBrushStrengthAction() |
BaseTools/BaseBrushTool.h | ||
virtual PRAGMA_DISABLE_DEPRECATION_WARNINGS bool IsInBrushStroke() |
BaseTools/BaseBrushTool.h | ||
void SetBrushEnabled
(
bool bIsEnabled |
BaseTools/BaseBrushTool.h | ||
virtual bool SupportsBrushAdjustmentInput() |
Return false to disable the hotkey for adjusting the brush radius and strength in the viewport | BaseTools/BaseBrushTool.h |
Overridden from UMeshSurfacePointTool
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnBeginDrag
(
const FRay& Ray |
UMeshSurfacePointTool implementation. | BaseTools/BaseBrushTool.h | |
virtual void OnCancelDrag() |
This function is called when the user's drag is cancelled, for example due to the whole tool being shut down. | BaseTools/BaseBrushTool.h | |
virtual void OnEndDrag
(
const FRay& Ray |
This function is called when the user releases the button driving a click-drag-release interaction | BaseTools/BaseBrushTool.h | |
virtual void OnUpdateDrag
(
const FRay& Ray |
This function is called each frame that the user is in a click-drag-release interaction | BaseTools/BaseBrushTool.h |
Overridden from UInteractiveTool
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DrawHUD
(
FCanvas* Canvas, |
Allow the Tool to do any custom screen space drawing | BaseTools/BaseBrushTool.h | |
| Automatically called by UInteractiveToolPropertySet.OnModified delegate to notify Tool of child property set changes | BaseTools/BaseBrushTool.h | ||
virtual void RegisterActions
(
FInteractiveToolActionSet& ActionSet |
Override this function to register the set of Actions this Tool supports, using FInteractiveToolActionSet::RegisterAction. | BaseTools/BaseBrushTool.h | |
virtual void Render
(
IToolsContextRenderAPI* RenderAPI |
Allow the Tool to do any custom drawing (ie via PDI/RHI) | BaseTools/BaseBrushTool.h | |
virtual void Setup() |
UInteractiveTool. | BaseTools/BaseBrushTool.h | |
virtual void Shutdown
(
EToolShutdownType ShutdownType |
Called by ToolManager to shut down the Tool | BaseTools/BaseBrushTool.h |
Overridden from IClickDragBehaviorTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FInputRayHit CanBeginClickDragSequence
(
const FInputDeviceRay& PressPos |
IClickDragBehaviorTarget implementation. | BaseTools/BaseBrushTool.h |
Overridden from IHoverBehaviorTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool OnUpdateHover
(
const FInputDeviceRay& DevicePos |
Update active hover sequence with new input position | BaseTools/BaseBrushTool.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual double EstimateMaximumTargetDimension() |
Subclasses should implement this to give an estimate of target dimension for brush size scaling | BaseTools/BaseBrushTool.h | |
void RecalculateBrushRadius() |
BaseTools/BaseBrushTool.h | ||
virtual void SetupBrushStampIndicator() |
BaseTools/BaseBrushTool.h | ||
virtual void ShutdownBrushStampIndicator() |
BaseTools/BaseBrushTool.h | ||
virtual void UpdateBrushStampIndicator() |
BaseTools/BaseBrushTool.h |