diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-09-29 09:21:56 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-09-29 09:21:56 +0300 |
commit | bbc69563d0704a8269318d8699e7c2bf4edc91c2 (patch) | |
tree | 7d9d0aa1f35597442f633c3b2d88ff4d2df704d4 /source/blender/blenkernel/intern/paint.cc | |
parent | a4ff106c5864343dd40cc945a5bdc74ed22d4274 (diff) |
Sculpt: Normal-based automasking modes
Two new normal-based automasking modes.
The first mode, "brush", compares vertex normals with the initial
normal at the beginning of the brush stroke.
The second, "view", compares vertex normals with the view normal.
If "occlusion" is on then rays will be shot from each vertex to test
if it is occluded by other geometry (note: this can be very slow).\
Only geometry inside the sculpt mesh is considered.
Each mode has an associated angular limit and a falloff.
Reviewed by: Julien Kaspar and Jeroen Bakker
Differential Revision: https://developer.blender.org/D15297
Ref D15297
Diffstat (limited to 'source/blender/blenkernel/intern/paint.cc')
-rw-r--r-- | source/blender/blenkernel/intern/paint.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 08e49550426..e0a27a3d03e 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -2079,6 +2079,14 @@ void BKE_sculpt_toolsettings_data_ensure(Scene *scene) sd->constant_detail = 3.0f; } + if (!sd->automasking_start_normal_limit) { + sd->automasking_start_normal_limit = 20.0f / 180.0f * M_PI; + sd->automasking_start_normal_falloff = 0.25f; + + sd->automasking_view_normal_limit = 90.0f / 180.0f * M_PI; + sd->automasking_view_normal_falloff = 0.25f; + } + /* Set sane default tiling offsets. */ if (!sd->paint.tile_offset[0]) { sd->paint.tile_offset[0] = 1.0f; |