Dynamic Decals Layer Stack
Editor module providing the Layer Stack panel for the Dynamic Decals tool. Renders the full layer hierarchy with drag-and-drop reordering, visibility toggling, layer masks, duplication, mirroring, and
Editor module providing the Layer Stack panel for the Dynamic Decals tool. Renders the full layer hierarchy with drag-and-drop reordering, visibility toggling, layer masks, duplication, mirroring, and highlighting.
Module Info
| Key | Value |
|---|---|
| File | extensions/editor/dynamicDecals/layerStack.lua |
| logTag | editor_dynamicDecals_layerStack |
| Dependencies | editor_api_dynamicDecals, editor_dynamicDecals_layerTypes_fill, editor_dynamicDecals_layerTypes_textureFill, editor_dynamicDecals_gizmo, editor_dynamicDecals_selection, editor_dynamicDecals_helper, editor_dynamicDecals_docs |
Public API
| Function | Signature | Description |
|---|---|---|
M.registerLayerElementGui | () | Empty stub for future extension |
M.registerEditorPreferences | (prefsRegistry) | Registers layer stack preferences (see below) |
M.editorPreferenceValueChanged | (path, value) | Stub |
M.setup | (tool_in) | Registers "Decal Stack / Layers" section at priority 140 with docs link |
Preferences
| Path | Type | Default | Description |
|---|---|---|---|
dynamicDecalsTool.layerStack.topToBottomLayerStructure | bool | true | Top-to-bottom vs bottom-to-top display order |
dynamicDecalsTool.layerStack.layerTypeIconColor | table | (per-type RGBA) | Color tint for each layer type icon (decal, fill, textureFill, group, brushStroke, path, linkedSet) |
Key Features
- Drag-and-Drop - Layers can be reordered within or across parent groups via ImGui drag-drop with
DynDecalLayerDragDroppayload - Layer Masks - Copy/paste/append/export layer masks via right-click context menu
- Highlighting - Hover or click the lightbulb icon to highlight a decal layer in the viewport
- Max Depth - Nesting limited to 2 levels (
maxLayerDepth = 2) - Layer Actions - Select, delete, duplicate, duplicate-and-mirror, toggle visibility, toggle mask editing
Usage Example
-- The layer stack is auto-registered via setup()
-- Programmatic layer manipulation:
local api = extensions.editor_api_dynamicDecals
api.addFillLayer()
api.addGroup()
api.moveLayer(fromIndex, fromParentUid, toIndex, toParentUid)
api.duplicateLayer(index, parentUid)
api.duplicateAndMirrorLayer(index, parentUid, true)See Also
- Dynamic Decals - Browser - Related reference
- Dynamic Decals - Brushes - Related reference
- Dynamic Decals - Camera - Related reference
- World Editor Guide - Guide
Dynamic Decals Inspector
Editor module providing the Inspector panel for the Dynamic Decals tool. Displays and allows editing of all properties for selected layers and brushes. Supports multi-select with collapsible tree node
Dynamic Decals Load/Save
Editor module providing Save and Load functionality for Dynamic Decals projects. Exports/imports the layer stack as `.dyndecals.json` files with overwrite or append loading modes.