API ReferenceGE ExtensionseditorroadSpline
Road Spline Group Manager
Backend manager for road spline groups - handles creation, removal, splitting, joining, serialization, terrain painting, and undo/redo operations.
Backend manager for road spline groups - handles creation, removal, splitting, joining, serialization, terrain painting, and undo/redo operations.
Public API
| Function | Signature | Description |
|---|---|---|
M.getGroups | () | Returns the current road splines array |
M.getIdToIdxMap | () | Returns the group id → index mapping table |
M.getToolPrefixStr | () | Returns "Road Spline" prefix string |
M.getEditModeKey | () | Returns "roadSplineEditor" edit mode key |
M.addGroupToGroupArray | (group) | Adds a group to the collection with a unique name and scene tree folder |
M.removeGroup | (idx) | Removes group at index, deleting layers, terrain painting, and scene tree folder |
M.removeLinkedRoadSpline | (splineId) | Removes a linked road spline by its UUID |
M.removeAllGroups | (isIncludeDisabled) | Removes all groups (optionally including disabled/linked) |
M.updateDirtyGroups | () | Updates geometry, layers, and painting for all dirty groups |
M.setFixedWidth | (group, width) | Sets uniform width across all nodes |
M.recreateAutoGeneratedLayers | (group) | Removes and recreates all hidden auto-generated layers |
M.addNewGroup | (name?) | Creates a new group with default properties and auto-layers |
M.copyGroupProfile | (sourceGroup) | Copies layer profile (non-hidden layers + flags) |
M.pasteGroupProfile | (targetGroup, profile) | Applies a copied profile to a target group |
M.deepCopyGroup | (group) | Deep copies a single group (clears secondary geometry) |
M.deepCopyAllGroups | () | Deep copies all groups |
M.splitGroup | (group, groupIdx, selectedNodeIdx) | Splits a group at a node into two groups (or breaks a loop) |
M.joinRoadSplines | (groupIdx1, nodeIdx1, groupIdx2, nodeIdx2) | Joins two groups into one |
M.convertPathsToRoadGroups | (paths) | Converts traced bitmap paths to road splines |
M.serializeGroup | (group) | Serializes a group to binary buffer |
M.deserializeGroup | (data, isCreateObject) | Deserializes a group from binary buffer |
M.singleGroupEditUndo | (data) | Undo handler for single-group edits |
M.singleGroupEditRedo | (data) | Redo handler for single-group edits |
M.transGroupEditUndo | (groupsData) | Undo handler for trans-group edits (multi-group operations) |
M.transGroupEditRedo | (groupsData) | Redo handler for trans-group edits |
M.getCurrentRoadSplineList | () | Returns list of enabled splines with name/id/type |
M.isLinked | (id) | Returns true if the spline is linked to a master spline |
M.setLink | (id, groupId, isLink) | Sets/unsets the link status for a spline |
M.updateLinkedRoadSpline | (id, points, widths, nmls, isLoop, isConformToTerrain) | Updates linked spline geometry |
M.unlinkAll | () | Unlinks all road splines |
Group Data Structure
local group = {
name = "Road Spline 1",
id = "uuid",
isLoop = false,
sceneTreeFolderId = 123,
isEnabled = true,
isDirty = false,
isLink = false,
nodes = {}, -- vec3 positions
widths = {}, -- per-node widths
nmls = {}, -- per-node normals
layers = {}, -- layer objects (see layerMgr)
-- Auto-layer flags:
isLightTreadMarks = true,
isRoadCenterLine = true,
isRoadEdgeLines = true,
isEdgeBlend1 = true,
-- Terrain painting:
isPainting = false,
paintMargin = 0.0,
}See Also
- Road Spline Import - Related reference
- Road Spline Layer Manager - Related reference
- World Editor Guide - Guide
Resource Checker – Resource Utilities
Background job utilities for resource checking: material parsing, verification, duplicate detection, unused asset scanning, texture export, and asset statistics.
Road Spline Import
Handles importing DecalRoad objects into road spline groups - supports both direct selection and polygon-based selection, computing reference splines and relative layer properties.