This adds an operation mode to the Face Set Edit tool which deletes the
geometry of a Face Set by clicking on it.
The operator also checks for the mesh having a single Face Set to avoid
deleting the entire object by accident.
This is also disabled for Multires to avoid modifying the limit surface
without control (it is not an important limitation as base meshes for
multires are usually final, but maybe it can be supported in the future).
Details
Diff Detail
- Repository
- rB Blender
- Branch
- edit-face-set-delete-geom (branched from master)
- Build Status
Buildable 10287 Build 10287: arc lint + arc unit
Event Timeline
This seems to work fine. I like that it's disabled when no face sets are used or when sculpting on multires subdivisions.
At some point there should be discussion on how many modes are planned and should be added to this tool and how the UI/UX can be changed to make using it more effortless.
| source/blender/editors/sculpt_paint/sculpt_face_set.c | ||
|---|---|---|
| 1305–1308 | I don't understand this. You shouldn't be checking for events in the invoke. | |
| 1325–1327 | You should be able to const float mouse[2] = {event->mval[0], event->mval[1]};@Julian Eisel (Severin), is it how we handle other operators where we need them to be called from mouse events? | |
| source/blender/editors/sculpt_paint/sculpt_face_set.c | ||
|---|---|---|
| 1135 | check_single_face_set is something what checks the state of the mesh regardless of the operation. Hence, having an argument modify_hidden is confusing and misleading:
For good API it will be clear what function does from its name and argument list. | |
| 1272 | ||
| 1279–1280 | I do not quite follow the explanation. My interpretation: /* Modification of base mesh geometry requires special remapping of multires displacement, which does not happen here. * Disable delete operation. It can be supported in the future by * by doing similar displacement data remapping as what happens in the mesh edit mode. */ | |
| source/blender/editors/sculpt_paint/sculpt_face_set.c | ||
|---|---|---|
| 1325–1327 | Doing it like this is fine. Although I'd prefer it to be const (it's not in the current patch). Why make int active_face_set const but not an immutable array that's also a reference? :) | |