RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Ambient SoundUI Apps ManagerUI AudioBindings LegendCamera Distance AppDeveloper ConsoleCredits MusicExternal WebSocket ServerFade ScreenGame BlurGameplay App ContainersGrid SelectorLivery EditorMessages DebuggerMessages/Tasks App ContainersMission InfoPolice InfoTop BarUI ModsNavigation Map DataVehicle Paint EditorVehicle Vicinity AppUI Visibility
Camera ManagementAction Map ManagementEdit Mode State MachineLivery EditorUndo/Redo WrapperLayer ActionsLayer Edit LifecycleLayer DataDecal Texture LoaderLayer SelectionToolsLivery FilesMath Utilities

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE ExtensionsuiliveryEditor

Undo/Redo Wrapper

Thin wrapper around the dynamic decals API undo/redo system that notifies the UI on history changes.

Thin wrapper around the dynamic decals API undo/redo system that notifies the UI on history changes.


Overview

ui_liveryEditor_history exposes undo and redo operations and listens for layer mutations (add, delete, update, move) to push history state to the UI via guihooks.

Extension path: lua/ge/extensions/ui/liveryEditor/history.lua


Exports (M)

FunctionSignatureDescription
undo()Undoes the last operation via api.undo().
redo()Redoes the last undone operation via api.redo().

Hook Listeners

These are called by the dynamic decals API - do not call directly.

HookTrigger
dynamicDecals_onLayerAdded(layerUid)A layer was added
dynamicDecals_onLayerDeleted(layerUid)A layer was deleted
dynamicDecals_onLayerUpdated(layerUid)A layer property changed
dynamicDecals_moveLayer(from, fromParentUid, to, toParentUid)A layer was reordered

All four hooks trigger guihooks.trigger("LiveryEditor_onHistoryUpdated", api.getHistory()).


How It Works

  1. User performs an action (add/delete/move/update layer)
  2. The dynamic decals API fires one of the dynamicDecals_* hooks
  3. This module catches the hook and pushes the full history object to the UI
  4. The UI updates its undo/redo button states accordingly

Example Usage

-- Undo last action
extensions.ui_liveryEditor_history.undo()

-- Redo
extensions.ui_liveryEditor_history.redo()

Additional Exports

The following exports are available but not yet documented in detail:

  • M.dynamicDecals_moveLayer
  • M.dynamicDecals_onLayerAdded
  • M.dynamicDecals_onLayerDeleted
  • M.dynamicDecals_onLayerUpdated
  • M.redo
  • M.undo

See Also

  • Livery Editor - Camera - Related reference
  • Livery Editor - Controls - Related reference
  • Livery Editor - Edit Mode - Related reference
  • UI System Guide - Guide

Livery Editor

Core entry point and API interface for the livery editor UI. Manages editor lifecycle (setup, session, save, exit).

Layer Actions

Dispatches high-level actions (reproject, transform, delete, duplicate, mirror, etc.) on the currently selected layer(s).

On this page

OverviewExports (M)Hook ListenersHow It WorksExample UsageAdditional ExportsSee Also