This implements the Sculpt Mode API functions needed for Face Sets and
visibility management for PBVH_GRIDS. No major changes were needed in
the operators and the sculpt mode code. This implementation stores the
face sets in the base mesh, so faces created in higher subdivision
levels can't be modified individually. Also, we are not checking for
multiple face sets per vertex (that can be added in the future), so
relax tools don't work yet. The rest of the features (paint, undo,
visibility operators..) work as expected.
I don't think it is worth it adding face sets data to the grids, even in a future version. It will increase memory usage and code complexity considerably. In almost all use cases, this is exactly what is needed to manage visibility in multires. If your base mesh has good topology (something we can assume if multires sculpting is enabled), you always get non jagged edges that are following the topology of the model.