This is a new system to manage sculpt mode visibility. You can create groups of faces dynamically and hide/show them directly while sculpting without using masking tools or box selections.
The sculpt face grouips are also used in other sculpting features like the automasking system and mesh filters. It can also be preserved when remeshing the sculpt with the voxel remesher.
Face Groups are stored in the polys instead of in the vertices. This way we can subidivide it with multires in a predictable way.
This patch includes all basic features:
- Sculpt Face Groups data structures
- Undo support
- Remesher reprojection support
- Automasking and Mesh filter support
- Sculpt Mode Face Groups and Visibility API
- Sculpt Face Groups creation and visibility operators
- New keymap
We can change the name of this feature to avoid confusion with the mesh facemaps for rigging. If in the future we are going to use Vertex groups, Edges groups and Face groups we can keep this name for this feature.Done: The feature will be renamed to sculpt face groups The facemap colors are drawn by the PBVH. We need to add something to change the visibility of the facemap and mix it with the new sculpt vertex colors. I'm not sure if we can use an overlay for this without affecting sculpt mode performance, but that would be the ideal solution. It also misses smooth shading support and opacity controls.Done: Face groups have their own overlay and opacity control
- It needs multires support. When using dyntopo, the sculpt facemap should be disabled.
- It gives an error related to the new datalayer.
I think we should store mesh visibility in sculpt mode in polys instead of in vertices. This should be an easy change. Right now I'm using both and it is starting to become a mess. Some facemap tools have bugs related to keeping in sync facemap visibility and vertex visibility.Done: visibility can be stored per face or per vertex. This way we can still support hiding parts of the mesh with tools not related to the facemap. If this still causes problems we can fully switch to face visibility by rewriting the current visibility operators, which is not hard to do (box hide and mask hide) Colors are generated using a random seed that is generated each time the PBVH is built. This way we always get different colors, but colors will also change when entering sculpt mode. Is there something else I can use a seed? Maybe store it in the mesh datablock?Done: I will add an operator in a later patch to generate new colors updating the seed, which is stored per mesh.