Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainEditor module · class

UOrreryTerrainEditorLibrary

Editor only

The terrain editor's scripting API (Python: unreal.OrreryTerrainEditorLibrary).

Declaration

UCLASS()
class UOrreryTerrainEditorLibrary : public UBlueprintFunctionLibrary
Header
#include "OrreryTerrainEditorLibrary.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
UBlueprintFunctionLibrary
Blueprint
“Orrery Terrain Editor Library”, a Blueprint type

Description

The edits take the editor mode's own paths, so a scripted edit is an edit in the mode: ApplyEditorStroke drives the stroke the brush tools drive (FOrreryTerrainBrushStroke, the built-in target, the tools' settings conversion); PlacePlate and PlaceCorridor commit editor-owned features as the feature tools do; each edit is one undoable editor transaction. They need no viewport and no active mode: an edit opens the editor session for its own duration when the mode has none open, and keeps the ground under it resident with a temporary invoker, waiting until it is exact.

The mode and viewport functions (ActivateTerrainMode to TakeEditorShot) drive the level editor for captures: they need the level editor and, for shots, a real renderer.

World arguments may be null: the level editor's world is taken.

Note.

Game thread, editor only. Tier 3. Not for game code: the runtime API is UOrreryTerrainSubsystem.

Functions

  • GetEditorWorldBlueprintstatic

    The level editor's world; null without one (a commandlet).

  • GetEditorTerrainBlueprintstatic

    World's terrain actor, the one its terrain was created from; null when it has no terrain.

  • MakeNewTerrainPropertiesBlueprintstatic

    A new-terrain properties object with the user's last values (Manage, New): set its fields, then pass it to NewTerrain.

  • NewTerrainBlueprintstatic

    Create a terrain in World, or replace the source of its terrain, as Manage, New's Create Terrain button does: one undoable "New terrain" transaction.

  • ApplyEditorStrokeBlueprintstatic

    Apply one brush stroke as the editor mode's brush tool applies it, as one undoable "Terrain stroke" transaction.

  • PlacePlateBlueprintstatic

    Place an editor-owned plate, as the Plate tool's Enter does: one undoable transaction, kept by the authoring layer and baked by Bake.

  • PlaceCorridorBlueprintstatic

    Place an editor-owned corridor, as the Corridor tool does.

  • UndoEditorEditBlueprintstatic

    Undo the editor's last transaction (a stroke, a feature, New) and let the terrain settle.

  • BakeAuthoringBlueprintstatic

    Bake World's terrain, as Manage, Bake does without its dialog (UOrreryTerrainBake::BakeAuthoring).

  • HasUnbakedAuthoringBlueprintstatic

    Whether World's terrain holds authored edits the bake has not folded in yet: live ones not yet captured, or a captured payload.

  • GetStateHashBlueprintstatic

    The terrain's StateHash once pending sculpt bakes are done (the bits of a uint64); 0 without a terrain.

  • SampleGroundHeightsBlueprintstatic

    Exact ground heights at Points_m (world X and Y, m), waiting until the ground there is resident.

  • ActivateTerrainModeBlueprintstatic

    Activate the terrain editor mode in the level editor.

  • StartToolBlueprintstatic

    Start a tool of the mode's palette, as its button does: Sculpt, Smooth, Flatten, Paint, GroundClass, Holes, Plate, Corridor, FeatureList or New.

  • GetActiveToolBlueprintstatic

    The active tool's id; empty when none.

  • ConfigureActiveBrushBlueprintstatic

    Give the active brush tool Stroke's settings (Stroke.Tool and Path_m are not used), so its ring and HUD show them; Stroke.bInvert holds Shift.

  • SetBrushPreviewAtBlueprintstatic

    Put the active brush tool's ring (or the Stamp tool's ghost) at Location_m (world X and Y, m) as a hover would, and hold it there while the mouse crosses the viewport.

  • ClickActiveToolBlueprintstatic

    A click of the active feature tool (Plate, Corridor, FeatureList) or Stamp tool (it places a stamp) at Location_m, world m.

  • DragActiveToolBlueprintstatic

    A press at From_m, a drag to To_m and a release of the active brush tool (a stroke) or Stamp tool (a stamp centred on From_m whose radius and angle the drag sets), world m, through the mouse's own path.

  • SetActiveBrushMaskBlueprintstatic

    Pick Brush in the active brush, paint or Stamp tool's palette, as a click on its button does, and set the mask's angle.

  • ConfigureActiveStampBlueprintstatic

    Give the active Stamp tool its settings.

  • IsStampPendingBlueprintstatic

    Whether the active Stamp tool has a stamp waiting for its ground (poll it after a click over unloaded ground).

  • PressToolKeyBlueprintstatic

    Press a key in the terrain mode as the keyboard does in a level viewport: Enter commits a plate or corridor, Escape cancels (a commit waiting for its ground first), BackSpace takes a vertex back, Delete removes the selected feature.

  • GetActiveToolHudBlueprintstatic

    The HUD lines the active tool draws this frame (brush, Stamp and feature tools), for scripted checks.

  • LookAtBlueprintstatic

    Point every perspective level viewport at the ground under Target_m (world X and Y, m) from Distance_m away, Pitch_deg below the horizon, looking along Yaw_deg; realtime on.

  • TakeEditorShotBlueprintstatic

    Write a PNG of the largest editor window after Delay_s, drawing the level viewports first.

  • SetBackgroundThrottleBlueprintstatic

    Turn the editor's background throttle ("Use Less CPU when in Background") on or off, in memory only.

Properties

NameTypeDefaultMeaning
kFrameRatedouble30.0

Frames ApplyEditorStroke and the ground waits advance per second of stroke.

Blueprint