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

Action Map Management

Action map management for the livery editor - handles input mode switching between transform, rotate, scale, and stamp modes.

Action map management for the livery editor - handles input mode switching between transform, rotate, scale, and stamp modes.


Overview

ui_liveryEditor_controls manages input action maps for different livery editing modes. It switches between cursor-based and mouse-projection-based input and provides toggles for vehicle and edit-mode action maps.

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


Exports (M)

FunctionSignatureDescription
useMouseProjection()Activates mouse-projection input mode (stamp transform).
useCursorProjection()Activates cursor-based input mode (transform).
useActionMap(actionMapKey)Activates a specific action map, disabling all others.
disableAllActionMaps()Pops all livery editor action maps.
toggleEditActionMaps(enable)Enables/disables the main livery editor action map.
enableVehicleControls(enable)Enables/disables vehicle input action maps.
liveryEditor_OnUseMousePosChanged(value)Hook - switches input mode when mouse-pos setting changes.

Constants

KeyDescription
M.ACTION_MAPSMap of mode names to action map object names.

Internals

Action Map Registry

local ACTION_MAPS = {
  rotate = "LiveryEditorRotate",
  scale = "LiveryEditorScale",
  skew = "LiveryEditorSkew",
  transform = "LiveryEditorTransform",
  transformStamp = "LiveryEditorTransformStamp",
  material = "LiveryEditorMaterial"
}

Mode Switching

useActionMap disables all action maps first, then activates the requested one. If the API is in mouse-position mode, transform is automatically upgraded to transformStamp:

M.useActionMap = function(actionMapKey)
  disableAllActionMaps()
  actionMapKey = actionMapKey == "transform" and api.isUseMousePos() and "transformStamp" or actionMapKey
  local actionMap = ACTION_MAPS[actionMapKey]
  if actionMap then
    pushActionMap(actionMap)
  end
end

Input Modes

ModeAction MapDescription
Mouse ProjectiontransformStampDecal follows mouse position on vehicle surface
Cursor ProjectiontransformDecal placed via cursor controls

Vehicle Control Override

During editing, vehicle controls are disabled to prevent accidental input:

M.enableVehicleControls = function(enable)
  scenetree.findObject("VehicleCommonActionMap"):setEnabled(enable)
  scenetree.findObject("VehicleSpecificActionMap"):setEnabled(enable)
end

How It Works

  1. Livery editor starts → disableAllActionMaps() clears input state
  2. Edit mode activates → useActionMap("transform") pushes appropriate map
  3. User toggles mouse projection → liveryEditor_OnUseMousePosChanged switches mode
  4. Mode change auto-selects transform vs transformStamp action map
  5. On deactivation, all livery action maps are popped and vehicle controls restored

Additional Exports

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

  • M.dependencies
  • M.disableAllActionMaps
  • M.editAsController
  • M.liveryEditor_OnUseMousePosChanged
  • M.toggleEditActionMaps
  • M.toggleUseMousePos
  • M.useCursorProjection
  • M.useMouseProjection

See Also

  • Livery Editor - Camera - Related reference
  • Livery Editor - Edit Mode - Related reference
  • Livery Editor – Editor (Core) - Related reference
  • UI System Guide - Guide

Camera Management

Camera management for the livery editor - orthographic views, orbit camera, and layer-based positioning.

Edit Mode State Machine

Edit mode state machine for the livery editor - manages layer application, reapplication, selection, and undo within an editing session.

On this page

OverviewExports (M)ConstantsInternalsAction Map RegistryMode SwitchingInput ModesVehicle Control OverrideHow It WorksAdditional ExportsSee Also