Dynamic Decals Inspector Utils
Utility functions for the Dynamic Decals inspector. Provides reusable ImGui widgets for editing decal texture paths and gradient colors within layer inspectors.
Utility functions for the Dynamic Decals inspector. Provides reusable ImGui widgets for editing decal texture paths and gradient colors within layer inspectors.
Module Info
| Key | Value |
|---|---|
| File | extensions/editor/dynamicDecals/inspector/utils.lua |
| logTag | editor_dynamicDecals_inspector_utils |
| Dependencies | editor_api_dynamicDecals |
Public API
| Function | Signature | Description |
|---|---|---|
M.decalTextureWidgetInspect | (layer, property, guiId, removeTextureOverridePath) | Renders a texture path input with folder picker, delete button, image preview, and drag-drop target |
M.decalColorGradientWidgetInspect | (k, layer, guiId) | Renders a 4-corner gradient color editor with visual preview rectangle |
M.onGui | () | Empty stub (no standalone GUI) |
M.registerEditorPreferences | (prefsRegistry) | Stub |
M.editorPreferenceValueChanged | (path, value) | Stub |
M.setup | (tool_in) | Stores tool and API references |
Texture Widget Features
- Read-only text input showing current texture path
- Folder icon button opens a file dialog (PNG, JPG filters)
- Delete icon button resets path to
"/"or a custom override path - Image preview respecting
dynamicDecalsTool.inspector.texturePreviewSize - Accepts
DynDecalTextureDrapDropdrag-drop payloads
Gradient Widget Features
- Four color pickers at corners (top-left, top-right, bottom-left, bottom-right)
- Multi-color filled rectangle drawn via
ImDrawList_AddRectFilledMultiColor - Changes auto-commit to layer via
api.setLayer(layer, true)
Usage Example
local inspectorUtils = extensions.editor_dynamicDecals_inspector_utils
-- In a layer inspector GUI function:
inspectorUtils.decalTextureWidgetInspect(layer, "decalColorTexturePath", guiId)
inspectorUtils.decalColorGradientWidgetInspect(k, layer, guiId)Module Variables
dependencies(table) - Module variable.
Additional Exports
M.dependencies
See Also
- World Editor Guide - Guide
Dynamic Decals Widgets
Editor module providing the unified property widget rendering system for the Dynamic Decals tool. Maps API property types to appropriate ImGui controls (sliders, inputs, combos, color pickers, texture
Dynamic Decals Layer Type: Brush Stroke
Editor module for the Brush Stroke layer type in the Dynamic Decals tool. Provides inspector GUI and section GUI for configuring brush stroke properties such as interpolation, color, scale, rotation,