Dynamic Decals - Color History
Tracks colors used in the dynamic decals tool. When a decal or fill layer is placed, its color is added to the history (most recent first, duplicates removed). Colors can be reapplied as decal or fill
Tracks colors used in the dynamic decals tool. When a decal or fill layer is placed, its color is added to the history (most recent first, duplicates removed). Colors can be reapplied as decal or fill layer colors with a single click.
Public API
| Function | Signature | Description |
|---|---|---|
M.addColorToHistory | (color) | Adds Point4F color to history (removes duplicates, enforces max count) |
M.onGui | (guiId) | Draws color history section: color widgets, set-as buttons, delete |
M.registerEditorPreferences | (prefsRegistry) | Registers history table and maxHistoryCount (default 10) |
M.editorPreferenceValueChanged | (path, value) | Preference change callback (stub) |
M.setup | (tool_in) | Registers "Color History" section (order 122) and docs entry |
Preferences
| Key | Type | Default | Description |
|---|---|---|---|
colorHistory.history | table | {} | Array of {r, g, b, a} color tables |
colorHistory.maxHistoryCount | int | 10 | Maximum history entries (2–128) |
UI Features
Each history entry shows:
- Color preview widget (drag-and-droppable)
- "Set as decal color" button →
api.setDecalColor() - "Set as fill layer color" button →
api.setFillLayerColor() - Delete button to remove from history
Usage Example
local colorHistory = extensions.editor_dynamicDecals_colorHistory
-- Called automatically when placing decals, or manually:
colorHistory.addColorToHistory(Point4F(1, 0.5, 0, 1))Dependencies
| Module | Purpose |
|---|---|
editor_api_dynamicDecals | setDecalColor(), setFillLayerColor() |
editor_dynamicDecals_docs | Documentation registration |
See Also
- Dynamic Decals - Browser - Related reference
- Dynamic Decals - Brushes - Related reference
- Dynamic Decals - Camera - Related reference
- World Editor Guide - Guide
Dynamic Decals - Camera
Camera preset system for the dynamic decals tool. Provides one-click camera angle switching for viewing vehicle liveries from different perspectives. Presets are stored in editor preferences and are f
Dynamic Decals - Color Presets
Predefined color palette for the dynamic decals tool. Ships with 42 named automotive colors (Iconic Orange, Jet Black, Pearl White, etc.). Users can add, rename, recolor, and delete presets. Colors ca