Orbdale Terrain · OrbdaleTerrainEditor module · class
UOrbdaleTerrainSplineFeatureEditorSubsystem
ExperimentalEditor onlyKeeps the spline features of the editor world in step with their splines.
Declaration
UCLASS()
class UOrbdaleTerrainSplineFeatureEditorSubsystem : public UEditorSubsystem, public FTickableEditorObject- Header
#include "SplineFeature/OrbdaleTerrainSplineFeatureEditorSubsystem.h"- Module
PublicDependencyModuleNames.Add("OrbdaleTerrainEditor");in an editor module’s Build.cs: an editor module, not in packaged games.- Stability
- Experimental: supported, may change in a minor version, with a changelog line.
- Thread
- Game thread, editor worlds only.
- Derives from
UEditorSubsystem,FTickableEditorObject
Description
Change: a spline's OnSplineChanged and TransformUpdated, and a property change of the component, are hints; the component's key (the sampled points and the parameters) is the truth, so a missed or repeated hint costs a resample.
Dragging (a hint, then a transaction still open or a mouse button down): the visualizer's preview is evaluated when the key changed, at most once every max(kMinPreviewInterval_s, kPreviewCostFactor x the last evaluation). The ground does not change.
Release: the edit's transaction finalizing (OnObjectTransacted, Finalized) on the spline, its actor, an attach parent or the component, with no mouse button down; else kQuiet_s with no hint, no button down and no transaction open. The feature is built or replaced in place (same id) through
FOrbdaleTerrainFeaturePlacement. When its ground is loaded the commit is stored in the edit's own transaction, so one Ctrl+Z takes back the spline and the ground; over ground still loading it holds (Pending, up to 60 s) and lands later as its own transaction, "Spline feature: <actor>", so that drag takes two undos. A new release replaces a waiting commit with the newest shape.Undo and redo never commit; an undo or redo that touches a component cancels its waiting commit.
Delete: deleting the actor, the component or the spline in the editor removes the feature in the delete's transaction (one Ctrl+Z restores both, same id), or holds and lands later over unloaded ground.
Copies: a component registered fresh (added, pasted, duplicated or re-keyed, never loaded) builds its own feature at its first release. A construction-script re-run is not a delete.
Load never commits; components found Missing after a load are listed in one notification with Rebuild all.
Components inside a Level Instance that is not being edited are left alone.
Experimental: it leans on the experimental USplineComponent::GetOnSplineChanged.
Game thread, editor worlds only. Editor module (Tier 3).
Functions
- UOrbdaleTerrainSplineFeatureEditorSubsystem (2 overloads)
- Initialize
- Deinitialize
- Tick
- GetStatId
- IsTickable
- Getstatic
The subsystem of the running editor, or null (no editor, or not yet initialized).
- Rebuild
Build or replace Component's feature now, in the open transaction or in one of its own: the component's Rebuild in an editor world.
- Remove
Remove Component's feature and clear the link, in the open transaction or in one of its own.
- SelectInFeaturesTool
Open the terrain mode's Features tool with Component's feature selected.
- RebuildMissing
Rebuild every component of World whose state is Missing.
- FindPreview
The preview of a component being edited (dragging, or released but not yet committed); null when there is none.
- GetLastEarthworks
The earthworks of the component's last commit in this session; bValid false when it made none.
- IsEditing
Whether a hint arrived since the component's last release: its spline is being edited.
- GetHudLines
The lines the visualizer's HUD shows for a selected component: its state, the preview's or the last commit's cut and fill in m3, and the last refusal.
- GetLastRefusal
Why the component's last commit or removal was refused; empty after one that landed.
- IsTracked
Whether the subsystem watches Component (a registered component of an editor world).
- GetOrphanCount
Commits and removals of deleted components that still wait for their ground.
- GetStats
The counters.
- ResetStats
Zero the counters.
Properties
| Name | Type | Default | Meaning |
|---|---|---|---|
k | double | 0.1 | The shortest time between two preview evaluations of one component, seconds. |
k | double | 4.0 | A preview waits at least this many times the last evaluation's duration, so it takes at most a quarter of wall time. |
k | double | 0.25 | How long an edit with no transaction and no button down must be quiet before it commits, seconds. |