Dynamic Decals Settings
Editor module providing the Settings panel for the Dynamic Decals tool. Manages tool enable state, cursor mode, UV layer, material/mesh selection, texture resolution, and preferences access.
Editor module providing the Settings panel for the Dynamic Decals tool. Manages tool enable state, cursor mode, UV layer, material/mesh selection, texture resolution, and preferences access.
Module Info
| Key | Value |
|---|---|
| File | extensions/editor/dynamicDecals/settings.lua |
| logTag | editor_dynamicDecals_settings |
| Dependencies | editor_api_dynamicDecals, editor_dynamicDecals_helper |
Public API
| Function | Signature | Description |
|---|---|---|
M.updateMaterials | () | Refreshes material name/index maps from the current vehicle's shape |
M.getUsedMaterialNames | () → string[] | Returns names of currently enabled materials |
M.registerEditorPreferences | (prefsRegistry) | Stub |
M.editorPreferenceValueChanged | (path, value) | Stub |
M.setup | (tool_in) | Registers "Settings" section (priority 1040), builds UI comboboxes, initializes materials and meshes |
Section GUI Features
| Feature | Description |
|---|---|
| Enable toggle | Master on/off for dynamic decals |
| UseMousePos | Toggle between mouse cursor and manual cursor position |
| Cursor Position | Two float sliders (x, y) for manual cursor UV position |
| UV Layer | Combo box selecting UV layer 0 or 1 (reprojects all layers) |
| Materials | Filterable checklist of vehicle materials with enable/disable and "Update materials" button |
| Meshes | Filterable checklist with enable all / disable all buttons |
| Texture Resolution | Separate X/Y resolution combos from api.textureResolutions, with apply button and change indicator |
| Preferences | Button to open the dynamic decals preferences panel |
Material Mapping
Two internal lookup tables are built by updateMaterials():
materialsMapMaterialNameToMaterialIdx- name → material IDmaterialsMapMaterialIdxToMaterialName- material ID → name
Usage Example
local settings = extensions.editor_dynamicDecals_settings
-- Refresh materials after vehicle change
settings.updateMaterials()
-- Get names of active materials
local names = settings.getUsedMaterialNames()
-- Returns e.g. {"etk800_body", "etk800_glass"}See Also
- Dynamic Decals - Browser - Related reference
- Dynamic Decals - Brushes - Related reference
- Dynamic Decals - Camera - Related reference
- World Editor Guide - Guide
Dynamic Decals Selection
Editor module managing layer selection and gizmo integration for the Dynamic Decals tool. Handles selecting/deselecting layers, configuring the axis gizmo for translate/rotate/scale operations based o
Dynamic Decals Textures
Editor module providing the texture browser, tag browser, texture inspector, and sidecar metadata management for the Dynamic Decals tool. Handles texture selection, context menus, drag-drop, virtual s