From a45cba5f71d7701e00f49a837d2e62e2232348e7 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 28 Jun 2012 19:12:00 +0000 Subject: Add missing brush types to sculpt_tool_name() This function is used to name undo pushes in sculpt mode, was missing some of the newer brush types. Also tweaked the switch statement so that it will warn for future missing cases and removed extraneous breaks. --- source/blender/editors/sculpt_paint/sculpt.c | 42 ++++++++++++++++------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'source/blender/editors/sculpt_paint/sculpt.c') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index e6c061a06ec..2bd0d045e56 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3145,40 +3145,46 @@ static const char *sculpt_tool_name(Sculpt *sd) { Brush *brush = paint_brush(&sd->paint); - switch (brush->sculpt_tool) { + switch ((BrushSculptTool)brush->sculpt_tool) { case SCULPT_TOOL_DRAW: - return "Draw Brush"; break; + return "Draw Brush"; case SCULPT_TOOL_SMOOTH: - return "Smooth Brush"; break; + return "Smooth Brush"; case SCULPT_TOOL_CREASE: - return "Crease Brush"; break; + return "Crease Brush"; case SCULPT_TOOL_BLOB: - return "Blob Brush"; break; + return "Blob Brush"; case SCULPT_TOOL_PINCH: - return "Pinch Brush"; break; + return "Pinch Brush"; case SCULPT_TOOL_INFLATE: - return "Inflate Brush"; break; + return "Inflate Brush"; case SCULPT_TOOL_GRAB: - return "Grab Brush"; break; + return "Grab Brush"; case SCULPT_TOOL_NUDGE: - return "Nudge Brush"; break; + return "Nudge Brush"; case SCULPT_TOOL_THUMB: - return "Thumb Brush"; break; + return "Thumb Brush"; case SCULPT_TOOL_LAYER: - return "Layer Brush"; break; + return "Layer Brush"; case SCULPT_TOOL_FLATTEN: - return "Flatten Brush"; break; + return "Flatten Brush"; case SCULPT_TOOL_CLAY: - return "Clay Brush"; break; + return "Clay Brush"; case SCULPT_TOOL_CLAY_STRIPS: - return "Clay Strips Brush"; break; + return "Clay Strips Brush"; case SCULPT_TOOL_FILL: - return "Fill Brush"; break; + return "Fill Brush"; case SCULPT_TOOL_SCRAPE: - return "Scrape Brush"; break; - default: - return "Sculpting"; break; + return "Scrape Brush"; + case SCULPT_TOOL_SNAKE_HOOK: + return "Snake Hook Brush"; + case SCULPT_TOOL_ROTATE: + return "Rotate Brush"; + case SCULPT_TOOL_MASK: + return "Mask Brush"; } + + return "Sculpting"; } /** -- cgit v1.2.3 From 8b865c01cd659006a721f4db3d6796d618c35d3c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Jun 2012 22:49:33 +0000 Subject: style cleanup: comments --- source/blender/editors/sculpt_paint/sculpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint/sculpt.c') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 2bd0d045e56..bfac2922c2b 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3645,8 +3645,8 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, } /* Returns true iff any of the smoothing modes are active (currently - one of smooth brush, autosmooth, mask smooth, or shift-key - smooth) */ + * one of smooth brush, autosmooth, mask smooth, or shift-key + * smooth) */ static int sculpt_any_smooth_mode(const Brush *brush, StrokeCache *cache, int stroke_mode) -- cgit v1.2.3