Editor Tool Utilities – Style
Centralised style configuration for spline-editing tools. Provides debug-draw colours, line thicknesses, sphere scales, pulse animation parameters, and ImGui colour theme palettes.
Centralised style configuration for spline-editing tools. Provides debug-draw colours, line thicknesses, sphere scales, pulse animation parameters, and ImGui colour theme palettes.
Public API
| Function | Signature | Description |
|---|---|---|
M.getStyle | () → table | Returns the debug-draw style table with all rendering parameters |
M.getImguiCols | (theme) → table | Returns an ImGui colour palette for the given theme name |
Style Properties (key categories)
| Category | Examples | Description |
|---|---|---|
| Colours | colourNode, colourSpline, colourHighlight, colourRibGlow | Debug-draw RGBA colour objects |
| Line Thicknesses | splineThickness, wireThickness, ribThickness, dropThickness | Pixel widths for debug lines |
| Sphere Scales | sphereNode, sphereRib, sphereBar, sphereMousePos | Distance-adaptive scale factors |
| Glow Scales | nodeGlowScale, ribGlowScale, barGlowScale | Additional size for glow passes |
| Pulse Animation | highlightPulseHz, highlightScaleMin/Max, loopPulseHz | Sine-wave pulse parameters |
Available Themes
blueRose, vapourStatic, canyonClay, terminalAurora, summerOfLove, deerPark, dreamMachine, headlights, crystal (default), neoIndustrial
Code Examples
local styleCore = require('editor/toolUtilities/style')
-- Get the debug-draw style for rendering
local style = styleCore.getStyle()
debugDraw.drawSphere(pos, 0.5, style.colourNode)
debugDraw.drawLineInstance_MinArg(p0, p1, style.splineThickness, style.colourSpline)
-- Get ImGui colours for a theme
local cols = styleCore.getImguiCols('crystal')
im.TextColored(cols.greenB, 'Active Spline')
im.TextColored(cols.blueB, 'Selected Layer')
im.TextColored(cols.redB, 'Error State')
-- Theme palette structure:
-- cols.fullWhite - bright text/elements
-- cols.dullWhite - dimmed text/elements
-- cols.purpleB - accent colour
-- cols.greenB/D - primary bright/dark
-- cols.blueB/D - secondary bright/dark
-- cols.redB - warning/error
-- cols.yellowB - highlightSee Also
- Tool Utilities - Fit Polyline - Related reference
- Editor Tool Utilities – Geometry - Related reference
- Editor Tool Utilities – Gizmo - Related reference
- World Editor Guide - Guide
Editor Tool Utilities – Spline Mask Export
Exports spline ribbon surfaces as a binary PNG mask file (GFXFormatR16) covering the full terrain extent. Uses kd-tree spatial queries and barycentric quad intersection for efficient rasterisation.
Editor Tool Utilities – Terrain Painter
Paints terrain materials underneath a spline by rasterising the spline polygon to the terrain grid. Supports revertable operations with stored undo data.