4. Creating your own Blueprint functions for handling the Spline Events

To get the most out of the spline tool – it needs to communicate with the parent Blueprint that lays out the SplineMeshes and/or instances. Each sub-spline has to relate it’s mesh data with the correct indexes as if it were still a complete spline.

rdSplineTools handles this the easy/fast way – all the mesh data (usually stored as arrays in your blueprint) is retained in each subspline, but they have a “spline section start index” in each one that is set to the offset of where that subspline is located, point wise.

The down side to this, if you add or remove points from any of the subsplines, you’ll need to update your tables to mesh types to reflect that in the main spline if you intend to join all splines back together at any point. It’s not hard to do in your Blueprints if you prefer too.

I did intend to rejoin my road splines once I’d edited them in my game, but it’s actually really convenient to work with small sections (and automagically they work in World Partition) – doing landscape deformations on smaller sections at a time is much easier and faster.

To support rdSplineTools splitting and editing in your Blueprints, just create the following functions, and tick “Call in Editor” in the details panel for each one.

1. rdClearSpline

This is called whenever the spline points are all being removed – use this to remove your meshes from the spline.

2. rdBuildSplineSection

This one gets called with the subspline is split, this passes in the current mesh offset and index and returns the same once the meshes have been added for this section.

3. rdBuildSpline

If you’ve done things the easy way – this should just zero your “spline section index” variable.

4. rdMergeSubSplineData

This gets called when you join a spline. It only gets called on the main parent spline and is called for each subspline, passing in their start and end indexes.

See Tutorial 5 for details on how to implement these functions to support rdSplineTools split splines.