This adds a property that checks the normals of each vertex against the
view direction to decide if they should be masked (similar to the
"Front Faces Only" option works for brushes.
Details
Diff Detail
- Repository
- rB Blender
Event Timeline
It should probably be refactored into its own operator in a later patch as it is not really a selection
Why not to do it now, before the selection operator became this uber "select-or-fancy-mask-depending-on-settings" chimera?
Ok, I created a separate operator for box mask in D8456, then this can be implemented the same way for both.
Ok, this is now implemented for both box and lasso mask in the same way. The code of lasso and box mask is basically identical, so this Friday I can rewrite this operators to make them share the same code.
This is not what quality fridays are for. They are for solving existing technical debt, or to explore more ways of how we can help ourselves with technical solutions. They are not for solving technical debt of recently introduced code. Thew new code we add must be acceptable at a level of what we see a good outcome of code quality day.
I'm talking about the code duplication and cleanup of what is already in paint_mask.c, which is what I was planning to do. If this is added now, it can be part of the refactor, otherwise I can do another patch with the same functionality after the refactor.
Well, solving duplication and improving existing code when working on a new features in the surrounding areas is the natural course of development.
Anyway, point is: such refactors and general house keeping shall not be limited to the quality day.
From moving forward, is indeed easier to apply this patch and do required house keeping right after this.
| source/blender/editors/sculpt_paint/paint_mask.c | ||
|---|---|---|
| 279 | Swap the terms, helps with lazy evaluation. | |
| source/blender/editors/sculpt_paint/paint_mask.c | ||
|---|---|---|
| 279 | short-circuit evaluation, not lazy evaluation. | |