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
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 on layer type.
Module Info
| Key | Value |
|---|---|
| File | extensions/editor/dynamicDecals/selection.lua |
| logTag | editor_dynamicDecals_selection |
| Dependencies | editor_api_dynamicDecals, editor_dynamicDecals_gizmo |
Public API
| Function | Signature | Description |
|---|---|---|
M.selectLayer | (uid, addToSelection?) | Selects a layer by UID. Configures gizmo transform functions based on layer type. Multi-select when addToSelection is true |
M.deselectLayer | (uid?) | Deselects a specific layer by UID, or all layers if uid is nil. Resets gizmo state |
M.registerEditorPreferences | (prefsRegistry) | Stub |
M.editorPreferenceValueChanged | (path, value) | Stub |
M.setup | (tool_in) | Stores references to tool, API, and gizmo |
Gizmo Configuration by Layer Type
| Layer Type | Gizmo Support | Operations |
|---|---|---|
| Decal | Full | Translate (move local pos), Rotate (delta rotation), Scale (delta scale) |
| Brush Stroke | Translate only | Moves first data point position |
| Path | Translate only | Moves first data point position |
| Group | Translate only | Finds first draggable child (decal/path/brushStroke) and moves all children |
| Other | Translate stub | Logs "not yet implemented" |
Selection Storage
Selections are stored in editor.selection["dynamicDecalLayer"] as a table keyed by layer UID → deepcopy of layer data. Clearing selection also resets the tool mode to decal.
Usage Example
local selection = extensions.editor_dynamicDecals_selection
-- Select a layer (replaces current selection)
selection.selectLayer("abc-123")
-- Add to selection (Ctrl+click style)
selection.selectLayer("def-456", true)
-- Deselect specific layer
selection.deselectLayer("abc-123")
-- Deselect all
selection.deselectLayer()See Also
- Dynamic Decals - Browser - Related reference
- Dynamic Decals - Brushes - Related reference
- Dynamic Decals - Camera - Related reference
- World Editor Guide - Guide
Dynamic Decals Notification
Editor module providing an in-tool notification system for the Dynamic Decals tool. Displays categorized notifications with severity levels (log, warning, error) in a dedicated window.
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.