This patch implements a new trim brush, useful for polishing surfaces and hard surface sculpting.
This is not meant to be a final implementation of the feature, it is just an experiment to test and get feedback about the new brush behavior in order to make it as useful as possible, as well as to discuss possible integration with Blender.
As for now, the new trim brush is overriding the Scrape/Peaks brush, so you need to use that brush in order to test it. Furthermore, all brush parameters are hardcoded to a value that I think works fine, but they may need tweaking in some systems.
- Symmetry must be disabled in order to work.
- Crashes with dyntopo.
- This brush needs to modify the normal sampling radius in order to work. Should that parameter be exposed globally? It could be useful in other cases, like when creating sharp edges with the flatten brush.
- Which parameters of this new brush should be exposed to the user?
- Should this brush replace the behavior of flatten or scrape? I think it is not a good idea to keep adding new brushes with only small modifications in the deformation code.
- Currently, this brush doesn't work with symmetry because variables in StrokeCache such as last_area_co need to be independent per symmetry pass. Right now this is handled in sculpt_cache_calc_brushdata_symm by flipping the vectors, but that doesn't work in all cases. I run into the same problem when I was working in the topograb brush. I needed to store an independent vertex set per symmetry pass, but as far as I know, there is no place to do it.