Skip to content
Orbdale

Orbdale Terrain · OrbdaleTerrainEditor module · class

UOrbdaleTerrainBrushTool

Editor only

One class for every brush: a click-drag stroke on the analytic ground, with a preview ring and a HUD.

Declaration

UCLASS()
class UOrbdaleTerrainBrushTool : public UInteractiveTool, public IClickDragBehaviorTarget, public IHoverBehaviorTarget
Header
#include "Tools/OrbdaleTerrainBrushTool.h"
Module
PublicDependencyModuleNames.Add("OrbdaleTerrainEditor"); in an editor module’s Build.cs: an editor module, not in packaged games.
Stability
Stable: changes within a major version only add.
Thread
Game thread, editor only.
Derives from
UInteractiveTool, IClickDragBehaviorTarget, IHoverBehaviorTarget

Description

Height tools (Raise, Smooth, Flatten) and paint tools (kind Paint: a layer, the ground class or holes, by UOrbdaleTerrainPaintProperties::Target) share the stroke, the hotkeys, the preview and the undo record. Paint takes the layer's colour from the layer table; holes draw a dashed ring.

The cursor is RaycastGround, so it hits exactly the ground a stroke changes, with or without collision. Strokes go through FOrbdaleTerrainBrushStroke and the built-in FOrbdaleTerrainSculptHeightTarget, so a stroke here is a stroke in the tests. Each stroke is one editor transaction (FOrbdaleTerrainStrokeChange through AppendChange, never EmitObjectChange, so it outlives the tool). Shift inverts; [ ] scale the radius, Ctrl+[ ] the strength and Ctrl+Shift+[ ] the falloff; Ctrl+click in Flatten picks the target. The mode routes the keys (InputKey).

A brush mask (UOrbdaleTerrainBrushMaskProperties: the palette, the angle, rotation mode, jitter, mirror and footprint) shapes every dab: the tool registers it with the terrain when a stroke begins, the preview draws its 50 % contour and its rotated square, and , . turn it by 15 degrees, Ctrl+wheel by 5.

Note.

Game thread, editor only. Tier 3.

Types

  • EAction enum

    Action ids of the hotkeys (RegisterActions).

    RadiusDown, RadiusUp, StrengthDown, StrengthUp, FalloffDown, FalloffUp, AngleDown, AngleUp, AngleFineDown, AngleFineUp

Functions

Properties

NameTypeDefaultMeaning
kShiftModifierint321

Modifier ids of the tool's behaviours.

kCtrlModifierint322—
kAngleStep_degdouble15.0

Degrees the comma and period keys turn a brush mask by; Ctrl+wheel turns it by kFineAngleStep_deg.

kFineAngleStep_degdouble5.0—