Hi!
You can achieve this using the Conditional Operator by following these steps:
1. Wire the Boards to the False input and an empty segment to the True Input.
2. Select the Conditional operator and turn on
Y Counter. Change the Mode to
Greater.
3.Right click on the Conditional node and Export
Segment Y Counter.
4. Wire this to a new
Arithmetic operator. Open the Arithmetic node's properties and change the
Operation to
Expression. 5. Enter
XSplineMatID for the expression. You are now controlling the Segment Y Counter of the Conditional operator using the material ID on the spline!
I've attached an example files which also scales the post heights using the Materials ID by multiplying it by the number of boards.
There are a couple of other notes about this style:
- You'll notice that the posts are wired to a Sequence operator set to
Increment on Y In the second input slot is a Null segment and the count value is very high. This is to prevent the style from generating more than one post at a corner.
- The post also has negative top padding so that it's Y size doesn't push the boards apart. It basically means that the boards ignore the height of the posts.
- I've added a height adjustment so you can offset the post heights above the boards.
I hope that helps, please let me know if you have any further questions.
Many thanks,
Paul