Editor Tools

The editor module (TexturgeEditor) provides a complete WYSIWYG environment for animation authoring: double-clicking a UTextAnimationBlueprint asset opens a custom Blueprint editor with a designer viewport, animation list, Sequencer timeline, and preview controls.

FTextAnimationBlueprintEditor

The core animation Blueprint editor, inheriting FBlueprintEditor (Kismet base framework).

class TEXTURGEEDITOR_API FTextAnimationBlueprintEditor : public FBlueprintEditor
{
    void InitTextAnimationEditor(const EToolkitMode::Type Mode,
                                 const TSharedPtr<IToolkitHost>& InitToolkitHost,
                                 UTextAnimationBlueprint* InBlueprint);
    void Compile();
    TSharedPtr<ISequencer>& GetSequencer();
    void ChangeViewedAnimation(UGlyphAnimation& InAnimation);
    UGlyphAnimation* GetCurrentAnimation() const;
    UGlyphAnimation* RefreshCurrentAnimation();
    void SetActivePreviewSource(ETexturgePreviewSource NewSource);
    FPreviewSourceMediator* GetPreviewSourceMediator() const;
    UTexturgePreviewSceneConfig* GetPreviewSceneConfig() const;
    UTextAnimInstance* GetPreviewAnimInstance() const;
    float GetScrubPosition() const;
    void SetScrubPosition(float InTime);
    int32 AddTrack();
    int32 AddTrack(ETextAnimationTrackType InType);
    void RemoveTrack(int32 InTrackIndex);
    const TArray<FTextAnimationTrack>& GetTracks() const;
    static TSharedPtr<FTextAnimationBlueprintEditor> GetActiveEditor();
};

Dual-Mode Layout

The editor registers two application modes based on FWorkflowCentricApplication (FTextAnimBPEditorModes):

ModeFNamePurpose
Designer modeTextAnimBP_DesignerModedesigner viewport + animation list + Sequencer timeline + preview
Graph modeTextAnimBP_GraphModestandard Kismet Blueprint graph editing (BuildDefaultAnimation event graph)

Seven Tabs

The editor window registers tabs through 7 static TabIds:

TabIdTabDescription
AnimationDesignerTabIdDesignerSTextAnimationDesignerView glyph design viewport
TrackListTabIdTrack Listlegacy track list (compatibility)
TimelineTabIdTimelineSequencer integration (UGlyphAnimation keyframe editing)
DetailsTabIdDetailsBlueprint details panel
PreviewSettingsTabIdPreview Settingspreview parameter panel provided by FPreviewSettingsTabFactory (shared by Designer/Graph modes)
PreviewAnimationListTabIdAnimation ListSTextAnimationPreviewList preview animation list
PreviewViewportTabIdPreview Viewportpreview text animation widget

Workflow

  1. Double-click a text animation Blueprint (UTextAnimationBlueprint) asset to open the editor (UTextAnimationBlueprintFactory handles creation)
  2. Add / manage glyph animation (UGlyphAnimation) assets in the Animation List tab
  3. Edit keyframe curves (21 channels) in the Timeline Sequencer view
  4. In Graph mode, override the BuildDefaultAnimation event and orchestrate animations with UGlyphAnimationLayer / UGlyphAnimationFactory nodes
  5. Configure the preview text (default "Hello Texturge") and font in Preview Settings
  6. Click Compile: FTextAnimationBlueprintCompilerContext → generates UTextAnimationBlueprintGeneratedClass
  7. After compilation, InvalidateBakeCache + preview source switch (None → GlyphAnimation) automatically re-bakes

STextAnimationDesignerView

WYSIWYG glyph designer viewport inheriting STextAnimationDesignSurface, FGCObject, and the IUMGDesigner interface.

class STextAnimationDesignerView : public STextAnimationDesignSurface, public FGCObject, public IUMGDesigner
{
    void SetPreviewFrameDataOverride(const TArray<FGlyphAnimationState>& InFrameData);
    void ClearPreviewFrameDataOverride();
    void SetPreviewAnimationList(TSharedPtr<STextAnimationPreviewList> InList);
    void SetAnimationList(TSharedPtr<STextAnimationList> InList);
    // IUMGDesigner interface
    float GetPreviewScale() const;
    FGeometry GetDesignerGeometry() const;
    // preview size
    FOptionalSize GetPreviewAreaWidth() const;
    void SetPreviewAreaSize(int32 Width, int32 Height);
    float GetPreviewDPIScale() const;
};
FeatureDescription
Zoom & panwheel zoom (~31 levels), right/middle-button drag pan, zoom to fit
Gridconfigurable design grid and snapping
Rulershorizontal/vertical rulers (STextAnimationRuler) with cursor guide lines and a font metric menu
Font metricsfour metric overlays: Baseline / LineBounds / ClusterBounds / GlyphBounds (FontMetric_* flags)
Preview frame overrideSetPreviewFrameDataOverride injects baked frame data; OnPaint renders with the override data
Effect layerSTextAnimationPaintSurface draws selection boxes / hover highlights

Slate composition (private implementation, copied from the engine’s SDesignSurface system and adapted):

  • STextAnimationDesignSurface — design canvas base class (zoom/pan/grid rendering)
  • STextAnimationPaintSurface — delegated drawing layer (selection boxes, hover highlights)
  • STextAnimationDesignerToolBar — toolbar (zoom, grid, snap, font metrics, ZoomToFit)
  • STextAnimationRuler — rulers
  • STextAnimationDisappearingBar — drag-fade message bar
  • STextAnimationPreviewWidget / STextAnimationPreviewList / STextAnimationList — preview widgets and lists

Preview System

ETexturgePreviewSource

enum class ETexturgePreviewSource : uint8
{
    None,           // no preview — shows static text (identity state)
    StagePreview,   // independent clock looping through intro/default/outro stages
    GlyphAnimation  // Sequencer playhead-driven glyph animation preview
};

FPreviewSourceMediator

The preview source mediator managing the three preview modes and the bake cache.

MethodDescription
RequestSource(ETexturgePreviewSource, EAnimationStage = None, UGlyphAnimation* = nullptr)requests a preview source switch
RegisterObserver / UnregisterObserverpreview source change observers (FOnPreviewSourceChanged four-parameter delegate)
GetActiveSource() / GetSelectedStage() / GetCurrentAnimation()state queries
IsStagePreviewActive() / IsGlyphAnimationActive()convenience checks
GetBakeCache() / InvalidateBakeCache() / InvalidateBakeStageCache()bake cache management
SetActiveOverrides(...) / SetActiveVectorOverrides / SetActiveColorOverrides / SetActiveVector2DOverridespreview parameter override injection
TickPreview(View, Config, BP, Sequencer)advances the preview per frame (cache hit/miss check → bake → evaluate → render)

Cache mechanism: FTexturgePreviewBakeCache caches the results of BakeAllStages (for StagePreview) and BakeStageWithCurves (for GlyphAnimation) separately, keyed by TextFingerprint + BlueprintFingerprint.

UTexturgePreviewSceneConfig

Preview scene configuration (persisted to EditorPerProjectUserSettings), covering all preview parameters of the designer viewport:

GroupFields (selection)Default
Preview textPreviewText"Hello Texturge"
Preview viewportPreviewWidth / PreviewHeight / bPreviewSizeToContent500 / 200 / false
Color & appearancePreviewColorAndOpacity / PreviewMinDesiredWidthWhite / 0
FontPreviewFont / PreviewLetterSpacing / PreviewFontMaterial— / 0 / —
OutlinePreviewOutlineSize / PreviewOutlineColor0 / Transparent
ShadowPreviewShadowOffset / PreviewShadowColorAndOpacityZero / Transparent
Alignment & transformPreviewTextTransformPolicy / PreviewJustificationNone / Left
WrappingbPreviewAutoWrapText / PreviewWrapTextAt / PreviewWrappingPolicyfalse / 0 / DefaultWrapping
Line height & marginPreviewLineHeightPercentage / PreviewMargin1.0 / —
RenderingPreviewClipping / bPreviewPixelSnapping / PreviewRenderOpacity / PreviewStrikeBrushInherit / true / 1.0 / —
Overflow & flowPreviewFlowDirection / PreviewTextOverflowPolicyInherit / Clip

Sequencer Integration

FGlyphAnimationTrackEditor (private class) extends FMovieSceneTrackEditor, registering UGlyphAnimation’s internal UMovieSceneGlyphAnimationTrack into Sequencer:

  • Each track contains multiple UMovieSceneGlyphAnimationSections (sub-tracks); each Section corresponds to one typed sub-track (FTextAnimationSubTrackData)
  • Sub-tracks map 1–4 FMovieSceneFloatChannels per track type (Float→1, Vector2D→2, Color→4)
  • Supports standard keyframe operations (add/delete/move/interpolation curve adjustment) and multi-row display (SupportsMultipleRows)
  • The static callback OnSubTrackAddedToSequencer(ETextAnimationTrackType) syncs new sub-tracks back to the Blueprint

Toolbar & Commands

FTexturgeEditorCommands registers editor commands:

CommandDescription
OpenPreviewWindowopens the preview window
ToggleDashedOutlinetoggles the dashed outline display
ToggleGridSnaptoggles grid snapping
ToggleFontMetricstoggles font metric overlays
ZoomToFitzooms to fit
images/editor-tools.png — Texturge animation blueprint editor overview: Designer mode layout with animation list panel on the left, designer viewport showing "Hello Texturge" per-glyph animation in the center, Sequencer timeline and details panel on the right, toolbar with zoom/grid/snap/font-metric controls on top