The material handling on curves was not super strong yet because there was not a lot of need for it. However, now with Grease Pencil it's much more likely that material selections are used on curves. The patch is larger than one might expect at first, because we have to pass more information into the field context in many places, because the materials are stored on `Curves` and not `CurvesGeometry`. Related to #128109. Pull Request: https://projects.blender.org/blender/blender/pulls/128182