Orrery Terrain · OrreryTerrainEditor module · class
UOrreryTerrainEdMode
Editor onlyEditor mode "Terrain (Orrery)".
Declaration
UCLASS()
class UOrreryTerrainEdMode : public UEdMode, public ILegacyEdModeViewportInterface- Header
#include "Mode/OrreryTerrainEdMode.h"- Module
PublicDependencyModuleNames.Add("OrreryTerrainEditor");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
UEdMode,ILegacyEdModeViewportInterface
Description
Enter registers every tool and action of the registry with the mode's tool manager and command list, and keeps them in step with later registrations; Exit reverses that and saves the mode's settings. The mode never decides which tools exist: the tool modules and extensions add registry entries. With no terrain in the world only entries that do not require one (Manage, New) are enabled.
Registered with the mode manager from the class's CDO (Info), so there is no RegisterMode call.
While entered it holds the terrain's editor session, with the author limits of UOrreryTerrainEditorSettings, re-opened when the terrain is re-created; and a transient invoker actor that the brush tools move to the cursor, so the ground under the brush loads wherever the camera is. It routes the active tool's hotkeys (FInteractiveToolActionSet) from the viewport, and before Ctrl+Z or Ctrl+Y closes an open stroke into its transaction, so the undo takes the whole stroke back.
Game thread, editor only. Tier 3.
Functions
- UOrreryTerrainEdMode
- Enter
- Exit
- UsesToolkits
- GetModeCommands
- ShouldToolStartBeAllowed
- HasTerrain
Whether the mode's world has a terrain.
- IsToolEnabled
Whether a registered tool can start now (terrain present when it needs one).
- IsActionEnabled
Whether a registered action can run now (terrain present when it needs one, and its CanExecute).
- GetRegisteredToolIds
Ids of the tools this mode has registered, in registry order; empty while not entered.
- GetRegisteredActionIds
Ids of the actions this mode has registered, in registry order; empty while not entered.
- IsEntered
Whether Enter ran and Exit has not.
- GetModeSettings
The mode's settings object (owned by the mode, created on Enter); null before Enter.
- SyncWithRegistry
Make the registered tools and actions match the registry now.
- InputKey
- RouteKey
What the viewport's key does in this mode: Ctrl+Z and Ctrl+Y first close an open brush stroke into its transaction (and are not consumed, so the undo or redo runs); a key of the active tool's action set runs that action.
- MoveInvoker
Move the brush's invoker to Location_cm (world cm), keeping full-resolution ground within Radius_m of it.
- GetInvoker
The transient invoker actor while entered; null otherwise.
- MakeEditorSessionstatic
The editor session the mode opens: the author limits of
UOrreryTerrainEditorSettings. - CreateToolkitprotected
- OnToolStartedprotected
Properties
| Name | Type | Default | Meaning |
|---|---|---|---|
EM_ | const FEditor | — | The mode's id. |