Native graph implementation history
Native graph implementation history
Section titled “Native graph implementation history”This historical implementation note records the migration from the bespoke SWbpAnimStateMachineGraph canvas to a native Unreal graph-editor stack built on UEdGraph, schema classes, graph nodes, and SGraphEditor.
This page preserves the existing engineering history; it is not the current product roadmap or a release promise. See Animation state machines for the current feature overview and In development for additions still being implemented and validated.
Move the state machine editor toward the same underlying editor architecture used by Unreal’s native graph tooling, so the module can eventually inherit more of the engine’s built-in graph behavior, visuals, extensibility, and interaction model.
Migration Strategy
Section titled “Migration Strategy”The migration was staged. The native graph is now the only graph tab, and the custom SWbpAnimStateMachineGraph canvas has been removed.
Slice 1: Native Graph Foundation
Section titled “Slice 1: Native Graph Foundation”Status: implemented
- Added a native graph tab to the state machine definition editor.
- Introduced a transient editor graph model:
UWbpAnimStateMachineEdGraphUWbpAnimStateMachineEdGraphNodeUWbpAnimStateMachineEdGraphSchema- Added a native
SGraphEditorsurface wired to the definition editor. - Added custom graph node visuals for the new editor graph.
- Added one-way synchronization from the definition asset into the transient editor graph.
- Added selection/focus handoff for the native graph tab.
Slice 2: Native Graph Parity
Section titled “Slice 2: Native Graph Parity”Status: implemented
- Add richer node metadata presentation in native nodes:
- play mode
- animation name
- sub-machine state indication
- clip/state bridge cues
- Add native graph selection parity with the current details/debugger/status surfaces.
- Improve connection presentation with a custom connection drawing policy.
- Represent wildcard transitions and special transition cases more faithfully.
Implemented in this slice so far:
- native nodes now surface more authored semantics:
- play mode badges
- re-entry badges
- child-definition and auto-transition summary text
- missing-clip warning text
- bridge-target emphasis
- native connections now use a custom connection drawing policy instead of the default generic graph styling
- native bidirectional transitions now render as separated parallel lanes
- native endpoints now distribute across each node edge, keeping dense incoming/outgoing connection points readable instead of stacking them on one pixel
- native connection routing now stays farther outside the state cards and mirrors bidirectional pairs with matching curvature
- native connector anchors now choose and space a sensible state edge from relative node positions instead of visually forcing all incoming links onto the left side
- native pin presentation is now quieter so state-to-state flow reads more clearly than explicit socket chrome
- native transition wires now use metadata-aware color and weight cues for breakpoint, condition/rule, and blend/curve state without adding extra mid-wire decoration
- native graph rebuild now tracks details-panel edits live, so the graph tab stays synchronized while authoring
- native node movement and connection edits now sync back into the definition for:
EditorNodePositionsInitialState- transition wiring (while preserving existing transition metadata for unchanged edges)
- native graph now supports basic graph-first authoring:
- add state from empty-graph context menu
- create and autowire a new state from a dragged pin
- connect to existing states from node context menus
- rename authored states in-place
- delete authored states
- edit linked transitions from pin context menus:
- remove a connected transition
- add the reverse transition
- toggle breakpoint metadata
- explicitly author special-node semantics:
Make Initial StateAdd Any-State TransitionRemove Any-State TransitionClear Initial State Link
Slice 3: Native Editing
Section titled “Slice 3: Native Editing”Status: implemented
- Added schema-driven editing actions:
- add state
- delete state
- connect states
- rename state
- drag node positions
- Persisted native graph edits back into:
StatesTransitionsEditorNodePositions- Added transaction-aware edits for graph-to-definition synchronization.
Slice 4: Native-first Editor
Section titled “Slice 4: Native-first Editor”Status: implemented
- Made the native graph the default
Graphtab. - Removed the custom canvas fallback.
- Added standard graph comments for production notes and callouts.
- Added Backspace/Delete deletion for selected states and comments.
- Added auto-layout modes for compact, flow-first, wide, and selected-only graph reshaping.
- Added edge-wide smart anchors, endpoint spacing, and matched bidirectional lanes.
- Ported the remaining everyday graph conveniences to the native editor path.
Slice 5: Full Replacement / Cleanup
Section titled “Slice 5: Full Replacement / Cleanup”Status: implemented
- Removed the legacy bespoke graph after native graph feature parity was reached.
- Consolidated graph-related editor entry points around the native graph stack.
- Retired duplicate graph affordances that only existed to support the migration period.
- Keep the definition asset as the single serialized source of truth.
Remaining Parity Risks
Section titled “Remaining Parity Risks”The native graph is now the single visual authoring path.
Remaining areas to keep validating:
- dense graphs with dozens or hundreds of transitions on one state
- selected-wire deletion and other subtle
SGraphEditorcommand expectations - visual parity for any legacy-only debugging overlays
- long-duration editor sessions with repeated graph rebuilds and details-panel edits
- project-specific workflows that relied on legacy collapse/expand behavior
Design Notes
Section titled “Design Notes”- The native graph is editor-only and transient.
- The source of truth remains
UWbpAnimStateMachineDefinition. - The native graph is a synchronized editor representation, not a second serialized runtime format.
- This keeps runtime data stable while allowing the editor experience to become much more native over time.