Mesh Spline - Populate
Handles the placement of TSStatic mesh objects along mesh splines. Computes positions, rotations, and component selection for each mesh unit based on spacing, jitter, caps, and distribution mode.
Handles the placement of TSStatic mesh objects along mesh splines. Computes positions, rotations, and component selection for each mesh unit based on spacing, jitter, caps, and distribution mode.
Key Internal Functions
| Function | Description |
|---|---|
computeMeshMap(numMeshes, spline) | Assigns mesh component paths and rotations to each placement slot |
tryRemove(spline) | Removes all placed TSStatic objects for a spline |
populate(spline) | Places all mesh units along the spline curve |
updatePopulation(spline) | Incremental update of existing placements |
Mesh Assignment Logic
For each placement slot, the system picks a component using:
- Start/End Caps: First/last mesh forced to cap path if enabled
- Round-Robin: Cycles through active components (
main,alias1-3) in order - Random: Weighted random selection using
mainRandomWeightand alias weights
Placement Pipeline
- Compute number of meshes from spline length and component extents + spacing
- Build mesh map via
computeMeshMap() - For each mesh unit:
- Compute position on spline curve (chord-length or local interpolation)
- Apply pre-rotation quaternion based on
rotsetting (0-3 = 90° increments) - Apply jitter offsets (forward, right, up)
- Apply vertical offset
- Create or update TSStatic in scene tree
Pre-Rotation Modes
| Rot | Angle | Use Case |
|---|---|---|
| 0 | 0° | Mesh X-axis along spline |
| 1 | 90° | Mesh Y-axis along spline |
| 2 | 180° | Mesh X-axis reversed |
| 3 | 270° | Mesh Y-axis reversed |
-- Populate is called automatically when a spline is marked dirty
-- and has a valid mesh path setDependencies
editor/toolUtilities/geomeditor/toolUtilities/util
Functions
populateMeshSpline(spline, splineIdx)
Handles populate mesh spline.
spline(object)splineIdx(any)
Returns: self
Additional Exports
M.populateMeshSplineM.tryRemove
See Also
- Mesh Spline - Import - Related reference
- Mesh Spline - Spline Manager - Related reference
- World Editor Guide - Guide
Mesh Spline - Import
Handles importing existing scene mesh sequences into the Mesh Spline tool. Analyses patterns in TSStatic chains to detect caps, distribution modes, and mesh types, then reconstructs a parametric splin
Mesh Spline - Spline Manager
Core data management module for the Mesh Spline tool. Handles creation, deletion, serialization, undo/redo, linking to master splines, and mesh spline presets.