Sculpt: Rename Topology Brush to Slide Relax Brush

The full name was "Topology Slide/Relax", but it didn't fit in the
toolbar UI. This was causing some problems:

- The mesh filter that does the same thing is called "Relax"
- We may want to add a "Topology Brush" tool in the future that is more
oriented to retopology task (like creating strips of quads), so by doing
this we avoid having two tools with the same name in the UI.

Reviewed By: billreynish

Differential Revision: https://developer.blender.org/D6590
This commit is contained in:
Pablo Dobarro
2020-01-15 15:54:11 +01:00
parent 5186bb56b5
commit 300f937aec
4 changed files with 15 additions and 15 deletions

View File

@@ -928,7 +928,7 @@ void BKE_brush_sculpt_reset(Brush *br)
br->curve_preset = BRUSH_CURVE_POW4;
br->spacing = 5;
break;
case SCULPT_TOOL_TOPOLOGY:
case SCULPT_TOOL_SLIDE_RELAX:
br->spacing = 10;
br->alpha = 1.0f;
break;

View File

@@ -1755,7 +1755,7 @@ static float brush_strength(const Sculpt *sd,
case SCULPT_TOOL_DRAW_SHARP:
case SCULPT_TOOL_LAYER:
return alpha * flip * pressure * overlap * feather;
case SCULPT_TOOL_TOPOLOGY:
case SCULPT_TOOL_SLIDE_RELAX:
return alpha * pressure * overlap * feather * 2.0f;
case SCULPT_TOOL_CLAY_STRIPS:
/* Clay Strips needs less strength to compensate the curve */
@@ -3142,7 +3142,7 @@ static void do_topology_relax_task_cb_ex(void *__restrict userdata,
BKE_pbvh_vertex_iter_end;
}
static void do_topology_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
static void do_slide_relax_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
{
SculptSession *ss = ob->sculpt;
Brush *brush = BKE_paint_brush(&sd->paint);
@@ -6096,8 +6096,8 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe
case SCULPT_TOOL_ELASTIC_DEFORM:
do_elastic_deform_brush(sd, ob, nodes, totnode);
break;
case SCULPT_TOOL_TOPOLOGY:
do_topology_brush(sd, ob, nodes, totnode);
case SCULPT_TOOL_SLIDE_RELAX:
do_slide_relax_brush(sd, ob, nodes, totnode);
break;
}
@@ -6612,8 +6612,8 @@ static const char *sculpt_tool_name(Sculpt *sd)
return "Pose Brush";
case SCULPT_TOOL_MULTIPLANE_SCRAPE:
return "Multiplane Scrape Brush";
case SCULPT_TOOL_TOPOLOGY:
return "Topology Slide/Relax Brush";
case SCULPT_TOOL_SLIDE_RELAX:
return "Slide/Relax Brush";
}
return "Sculpting";
@@ -6737,7 +6737,7 @@ static void sculpt_update_cache_invariants(
cache->saved_mask_brush_tool = brush->mask_tool;
brush->mask_tool = BRUSH_MASK_SMOOTH;
}
else if (brush->sculpt_tool == SCULPT_TOOL_TOPOLOGY) {
else if (brush->sculpt_tool == SCULPT_TOOL_SLIDE_RELAX) {
/* Do nothing, this tool has its own smooth mode */
}
else {
@@ -7117,7 +7117,7 @@ static bool sculpt_needs_connectivity_info(const Brush *brush, SculptSession *ss
(brush->sculpt_tool == SCULPT_TOOL_SMOOTH) || (brush->autosmooth_factor > 0) ||
((brush->sculpt_tool == SCULPT_TOOL_MASK) && (brush->mask_tool == BRUSH_MASK_SMOOTH)) ||
(brush->sculpt_tool == SCULPT_TOOL_POSE) ||
(brush->sculpt_tool == SCULPT_TOOL_TOPOLOGY));
(brush->sculpt_tool == SCULPT_TOOL_SLIDE_RELAX));
}
static void sculpt_stroke_modifiers_check(const bContext *C, Object *ob, const Brush *brush)
@@ -7749,7 +7749,7 @@ static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(str
if (brush->sculpt_tool == SCULPT_TOOL_MASK) {
brush->mask_tool = ss->cache->saved_mask_brush_tool;
}
else if (brush->sculpt_tool == SCULPT_TOOL_TOPOLOGY) {
else if (brush->sculpt_tool == SCULPT_TOOL_SLIDE_RELAX) {
/* Do nothing */
}
else {

View File

@@ -504,7 +504,7 @@ typedef enum eBrushSculptTool {
SCULPT_TOOL_ELASTIC_DEFORM = 21,
SCULPT_TOOL_POSE = 22,
SCULPT_TOOL_MULTIPLANE_SCRAPE = 23,
SCULPT_TOOL_TOPOLOGY = 24,
SCULPT_TOOL_SLIDE_RELAX = 24,
} eBrushSculptTool;
/* Brush.uv_sculpt_tool */
@@ -519,7 +519,7 @@ typedef enum eBrushUVSculptTool {
ELEM(t, \
SCULPT_TOOL_DRAW, \
SCULPT_TOOL_DRAW_SHARP, \
SCULPT_TOOL_TOPOLOGY, \
SCULPT_TOOL_SLIDE_RELAX, \
SCULPT_TOOL_CREASE, \
SCULPT_TOOL_BLOB, \
SCULPT_TOOL_LAYER, \
@@ -542,7 +542,7 @@ typedef enum eBrushUVSculptTool {
SCULPT_TOOL_THUMB, \
SCULPT_TOOL_LAYER, \
SCULPT_TOOL_DRAW_SHARP, \
SCULPT_TOOL_TOPOLOGY, \
SCULPT_TOOL_SLIDE_RELAX, \
SCULPT_TOOL_ELASTIC_DEFORM, \
SCULPT_TOOL_POSE, \
\
@@ -557,7 +557,7 @@ typedef enum eBrushUVSculptTool {
SCULPT_TOOL_ROTATE, \
SCULPT_TOOL_THUMB, \
SCULPT_TOOL_DRAW_SHARP, \
SCULPT_TOOL_TOPOLOGY, \
SCULPT_TOOL_SLIDE_RELAX, \
SCULPT_TOOL_MASK) == 0)
/* ImagePaintSettings.tool */

View File

@@ -93,7 +93,7 @@ const EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = {
{SCULPT_TOOL_POSE, "POSE", ICON_BRUSH_GRAB, "Pose", ""},
{SCULPT_TOOL_NUDGE, "NUDGE", ICON_BRUSH_NUDGE, "Nudge", ""},
{SCULPT_TOOL_ROTATE, "ROTATE", ICON_BRUSH_ROTATE, "Rotate", ""},
{SCULPT_TOOL_TOPOLOGY, "TOPOLOGY", ICON_BRUSH_GRAB, "Topology", ""},
{SCULPT_TOOL_SLIDE_RELAX, "TOPOLOGY", ICON_BRUSH_GRAB, "Slide Relax", ""},
{0, "", 0, NULL, NULL},
{SCULPT_TOOL_SIMPLIFY, "SIMPLIFY", ICON_BRUSH_DATA, "Simplify", ""},
{SCULPT_TOOL_MASK, "MASK", ICON_BRUSH_MASK, "Mask", ""},