From 38d6533f212bf9001cd5f70ed8757eccb9b39dad Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Thu, 5 Mar 2020 14:53:23 +0100 Subject: Sculpt Face Sets Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces. This initial commit includes: - Sculpt Face Sets data structures and PBVH rendering. - Face Set overlay and opacity controls. - Sculpt Undo support. - Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing. - Automasking and Mesh filter support. - Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding). - Sculpt Mode Face Sets and Visibility API. - Sculpt Face Sets creation and visibility management operators. - Operator to randomize the Face Sets colors. - Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke. - Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide). - Pie menu on the W key with Face common Sets operations. Know limitations: - Multires support. The Face Sets and Visibility API needs to be implemented for Multires. Reviewed By: jbakker, #user_interface, Severin Differential Revision: https://developer.blender.org/D6070 --- source/blender/blenkernel/intern/brush.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/blenkernel/intern/brush.c') diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 8abad2d541d..a1725197a36 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -1010,6 +1010,12 @@ void BKE_brush_sculpt_reset(Brush *br) br->flag &= ~BRUSH_SPACE; br->flag &= ~BRUSH_SPACE_ATTEN; break; + case SCULPT_TOOL_DRAW_FACE_SETS: + br->alpha = 0.5f; + br->flag &= ~BRUSH_ALPHA_PRESSURE; + br->flag &= ~BRUSH_SPACE; + br->flag &= ~BRUSH_SPACE_ATTEN; + break; case SCULPT_TOOL_GRAB: br->alpha = 0.4f; br->size = 75; @@ -1085,6 +1091,7 @@ void BKE_brush_sculpt_reset(Brush *br) case SCULPT_TOOL_SIMPLIFY: case SCULPT_TOOL_MASK: + case SCULPT_TOOL_DRAW_FACE_SETS: br->add_col[0] = 0.750000; br->add_col[1] = 0.750000; br->add_col[2] = 0.750000; -- cgit v1.2.3