API ReferenceGE Extensionseditor
Undo History Viewer
Editor window that displays and interacts with the undo/redo stacks for the world editor.
Editor window that displays and interacts with the undo/redo stacks for the world editor.
Module: M (extensions.editor.undoHistory)
| Function | Description |
|---|---|
M.onEditorInitialized() | Registers the "Undo History" window menu item and ImGui window |
M.onEditorGui() | Draws two-column layout showing undo and redo stacks with selection |
M.onExtensionLoaded() | No-op placeholder |
Usage Example
-- The Undo History window is accessed via:
-- F11 > Window > Undo History
-- It displays two columns:
-- Left: Undo Stack (newest at top) with "Undo Selected" button
-- Right: Redo Stack (newest at top) with "Redo Selected" button
-- Clicking a stack entry selects it and all entries above it
-- "Delete All History" clears the undo stack while preserving changes
-- Each action shows a tooltip with serialised action data (truncated)
-- Tooltip max: 20 lines x 100 chars wide
-- Programmatic undo/redo (via editor API, not this module):
editor.undo(count) -- undo `count` actions
editor.redo(count) -- redo `count` actions
editor.clearUndoHistory() -- clear all undo history
-- The history stores action objects with:
-- { name = "action description", ... action data ... }
-- Actions are committed via editor.history:commitAction(name, data, undoFn, redoFn)See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide