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
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 scrolling, and bulk metadata editing.
Module Info
| Key | Value |
|---|---|
| File | extensions/editor/dynamicDecals/textures.lua |
| logTag | editor_dynamicDecals_textures |
| Dependencies | editor_api_dynamicDecals, editor_api_dynamicDecals_textures, editor_dynamicDecals_browser, editor_dynamicDecals_layerTypes_decal, editor_dynamicDecals_docs, editor_dynamicDecals_selection, editor_dynamicDecals_notification, editor_dynamicDecals_helper |
Public API
| Function | Signature | Description |
|---|---|---|
M.getTexturesDirectoryPath | () → string | Returns the textures directory path from the textures API |
M.dynamicDecals_onTextureFileAdded | (filepath) | Hook called when a texture file is added; generates sidecar and notifies |
M.dynamicDecals_onTextureFileDeleted | (filepath) | Hook called when a texture file is deleted; cleans up selection |
M.registerEditorPreferences | (prefsRegistry) | Registers texture browser preferences |
M.editorPreferenceValueChanged | (path, value) | Stub |
M.setup | (tool_in) | Registers browser tabs ("Textures" priority 10, "Tags" priority 20), docs, inspector handler, initializes textures API, handles missing sidecar files |
Preferences
| Path | Type | Default | Description |
|---|---|---|---|
dynamicDecalsTool.textureBrowser.loadImagesPerFrameCount | int | 3 | Images loaded per frame in the browser |
dynamicDecalsTool.textureBrowser.enableVirtualScrolling | bool | true | Only load visible textures (performance) |
dynamicDecalsTool.textureBrowser.texturePreviewSize | float | 128 | Thumbnail size in the browser (32–512) |
Browser Features
- Textures tab - Grid of texture thumbnails with text filter, virtual scrolling, double-click to set as color texture, RMB context menu, drag-drop source (
DynDecalTextureDrapDrop) - Tags tab - Textures organized by tags from sidecar metadata, collapsible sections
- Selection - LMB select, Ctrl+LMB multi-select, Shift+LMB range select
- Context menu - "Set as decal color texture" / "Set as decal alpha texture"
Inspector Features (Texture Selection)
When textures are selected, the inspector shows per-texture metadata:
- Version, resolution, texture type (greyscale/color/sdf), SDF compatibility flag
- Tags list with add/remove, vehicle binding field
- Apply/Cancel buttons per texture
- Bulk Change panel for multi-select: apply type, SDF flag, tags, vehicle to all selected
Usage Example
local textures = extensions.editor_dynamicDecals_textures
local dir = textures.getTexturesDirectoryPath()
-- Returns "/art/dynamicDecals/textures/"See Also
- Dynamic Decals - Browser - Related reference
- Dynamic Decals - Brushes - Related reference
- Dynamic Decals - Camera - Related reference
- World Editor Guide - Guide
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.
Dynamic Decals Vehicle Color Palette
Editor module providing the Vehicle Color Palette section for the Dynamic Decals tool. Allows editing the three vehicle color slots (color, colorPalette0, colorPalette1) with metallic paint data, rand