Add simplify brush for sculpt mode
This commit is contained in:
@@ -2981,7 +2981,9 @@ static void sculpt_topology_update(Sculpt *sd, Object *ob, Brush *brush)
|
||||
if (totnode) {
|
||||
PBVHTopologyUpdateMode mode = PBVH_Subdivide;
|
||||
|
||||
if (sd->flags & SCULPT_DYNTOPO_COLLAPSE) {
|
||||
if ((sd->flags & SCULPT_DYNTOPO_COLLAPSE) ||
|
||||
(brush->sculpt_tool == SCULPT_TOOL_SIMPLIFY))
|
||||
{
|
||||
mode |= PBVH_Collapse;
|
||||
}
|
||||
|
||||
@@ -3539,6 +3541,8 @@ static const char *sculpt_tool_name(Sculpt *sd)
|
||||
return "Rotate Brush";
|
||||
case SCULPT_TOOL_MASK:
|
||||
return "Mask Brush";
|
||||
case SCULPT_TOOL_SIMPLIFY:
|
||||
return "Simplify Brush";
|
||||
}
|
||||
|
||||
return "Sculpting";
|
||||
@@ -4262,7 +4266,8 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
|
||||
do_symmetrical_brush_actions(sd, ob, sculpt_topology_update);
|
||||
}
|
||||
|
||||
do_symmetrical_brush_actions(sd, ob, do_brush_action);
|
||||
if (paint_brush(&sd->paint)->sculpt_tool != SCULPT_TOOL_SIMPLIFY)
|
||||
do_symmetrical_brush_actions(sd, ob, do_brush_action);
|
||||
|
||||
sculpt_combine_proxies(sd, ob);
|
||||
|
||||
|
||||
@@ -156,10 +156,7 @@ typedef enum BrushSculptTool {
|
||||
SCULPT_TOOL_THUMB = 12,
|
||||
SCULPT_TOOL_SNAKE_HOOK = 13,
|
||||
SCULPT_TOOL_ROTATE = 14,
|
||||
|
||||
/* slot 15 is free for use */
|
||||
/* SCULPT_TOOL_ = 15, */
|
||||
|
||||
SCULPT_TOOL_SIMPLIFY = 15,
|
||||
SCULPT_TOOL_CREASE = 16,
|
||||
SCULPT_TOOL_BLOB = 17,
|
||||
SCULPT_TOOL_CLAY_STRIPS = 18,
|
||||
|
||||
@@ -65,6 +65,7 @@ EnumPropertyItem brush_sculpt_tool_items[] = {
|
||||
{SCULPT_TOOL_PINCH, "PINCH", ICON_BRUSH_PINCH, "Pinch", ""},
|
||||
{SCULPT_TOOL_ROTATE, "ROTATE", ICON_BRUSH_ROTATE, "Rotate", ""},
|
||||
{SCULPT_TOOL_SCRAPE, "SCRAPE", ICON_BRUSH_SCRAPE, "Scrape", ""},
|
||||
{SCULPT_TOOL_SIMPLIFY, "SIMPLIFY", ICON_BRUSH_SUBTRACT /* icon TODO */, "Simplify", ""},
|
||||
{SCULPT_TOOL_SMOOTH, "SMOOTH", ICON_BRUSH_SMOOTH, "Smooth", ""},
|
||||
{SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", ICON_BRUSH_SNAKE_HOOK, "Snake Hook", ""},
|
||||
{SCULPT_TOOL_THUMB, "THUMB", ICON_BRUSH_THUMB, "Thumb", ""},
|
||||
|
||||
Reference in New Issue
Block a user