[Bf-blender-cvs] [2273a19b691] soc-2016-pbvh-painting: Rename Smudge to Smear since we already call this smear in image editor

Campbell Barton noreply at git.blender.org
Wed Apr 12 18:51:20 CEST 2017


Commit: 2273a19b691737a29acecebf7928e98a36c943f4
Author: Campbell Barton
Date:   Thu Apr 13 02:49:40 2017 +1000
Branches: soc-2016-pbvh-painting
https://developer.blender.org/rB2273a19b691737a29acecebf7928e98a36c943f4

Rename Smudge to Smear since we already call this smear in image editor

===================================================================

M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/editors/sculpt_paint/paint_vertex.c
M	source/blender/makesdna/DNA_brush_types.h
M	source/blender/makesrna/intern/rna_brush.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index d551d088c67..26f3159aeb7 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1620,10 +1620,10 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 				br->ob_mode = OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT;
 			}
 
-			br = (Brush *)BKE_libblock_find_name_ex(main, ID_BR, "Smudge");
+			br = (Brush *)BKE_libblock_find_name_ex(main, ID_BR, "Smear");
 			if (!br) {
-				br = BKE_brush_add(main, "Smudge", OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT);
-				br->vertexpaint_tool = PAINT_BLEND_SMUDGE;
+				br = BKE_brush_add(main, "Smear", OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT);
+				br->vertexpaint_tool = PAINT_BLEND_SMEAR;
 				br->ob_mode = OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT;
 			}
 		}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 26ec13e99a2..f647015e41e 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -744,7 +744,7 @@ static unsigned int vpaint_blend_tool(const int tool, const unsigned int col,
 		case PAINT_BLEND_MIX:
 		case PAINT_BLEND_BLUR:     return mcol_blend(col, paintcol, alpha_i);
 		case PAINT_BLEND_AVERAGE:  return mcol_blend(col, paintcol, alpha_i);
-		case PAINT_BLEND_SMUDGE:   return mcol_blend(col, paintcol, alpha_i);
+		case PAINT_BLEND_SMEAR:    return mcol_blend(col, paintcol, alpha_i);
 		case PAINT_BLEND_ADD:      return mcol_add(col, paintcol, alpha_i);
 		case PAINT_BLEND_SUB:      return mcol_sub(col, paintcol, alpha_i);
 		case PAINT_BLEND_MUL:      return mcol_mul(col, paintcol, alpha_i);
@@ -905,7 +905,7 @@ static float wpaint_blend_tool(const int tool,
 	switch (tool) {
 		case PAINT_BLEND_MIX:
 		case PAINT_BLEND_AVERAGE:
-		case PAINT_BLEND_SMUDGE:
+		case PAINT_BLEND_SMEAR:
 		case PAINT_BLEND_BLUR:     return wval_blend(weight, paintval, alpha);
 		case PAINT_BLEND_ADD:      return wval_add(weight, paintval, alpha);
 		case PAINT_BLEND_SUB:      return wval_sub(weight, paintval, alpha);
@@ -2437,7 +2437,7 @@ static void do_wpaint_brush_blur_task_cb_ex(
 	BKE_pbvh_vertex_iter_end;
 }
 
-static void do_wpaint_brush_smudge_task_cb_ex(
+static void do_wpaint_brush_smear_task_cb_ex(
         void *userdata, void *UNUSED(userdata_chunk), const int n, const int UNUSED(thread_id))
 {
 	SculptThreadedTaskData *data = userdata;
@@ -2484,7 +2484,7 @@ static void do_wpaint_brush_smudge_task_cb_ex(
 						float stroke_dot_max = 0.0f;
 
 						/* Get the color of the loop in the opposite direction of the brush movement
-						 * (this callback is specifically for smudge.) */
+						 * (this callback is specifically for smear.) */
 						float weight_final = 0.0;
 						for (int j = 0; j < ss->modes.vwpaint.vert_to_poly[v_index].count; j++) {
 							const int p_index = ss->modes.vwpaint.vert_to_poly[v_index].indices[j];
@@ -2688,10 +2688,10 @@ static void wpaint_paint_leaves(
 			        0, totnode, &data, NULL, 0,
 			        do_wpaint_brush_draw_task_cb_ex, true, false);
 			break;
-		case PAINT_BLEND_SMUDGE:
+		case PAINT_BLEND_SMEAR:
 			BLI_task_parallel_range_ex(
 			        0, totnode, &data, NULL, 0,
-			        do_wpaint_brush_smudge_task_cb_ex, true, false);
+			        do_wpaint_brush_smear_task_cb_ex, true, false);
 			break;
 		case PAINT_BLEND_BLUR:
 			BLI_task_parallel_range_ex(
@@ -3475,7 +3475,7 @@ static void do_vpaint_brush_blur_task_cb_ex(
 	BKE_pbvh_vertex_iter_end;
 }
 
-static void do_vpaint_brush_smudge_task_cb_ex(
+static void do_vpaint_brush_smear_task_cb_ex(
         void *userdata, void *UNUSED(userdata_chunk), const int n, const int UNUSED(thread_id))
 {
 	SculptThreadedTaskData *data = userdata;
@@ -3630,10 +3630,10 @@ static void vpaint_paint_leaves(
 			    0, totnode, &data, NULL, 0,
 			    do_vpaint_brush_blur_task_cb_ex, true, false);
 			break;
-		case PAINT_BLEND_SMUDGE:
+		case PAINT_BLEND_SMEAR:
 			BLI_task_parallel_range_ex(
 			    0, totnode, &data, NULL, 0,
-			    do_vpaint_brush_smudge_task_cb_ex, true, false);
+			    do_vpaint_brush_smear_task_cb_ex, true, false);
 			break;
 		default:
 			BLI_task_parallel_range_ex(
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 8e28c66eb9a..de85ca13f35 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -317,7 +317,7 @@ enum {
 	PAINT_BLEND_LIGHTEN = 5,
 	PAINT_BLEND_DARKEN = 6,
 	PAINT_BLEND_AVERAGE = 7,
-	PAINT_BLEND_SMUDGE = 8
+	PAINT_BLEND_SMEAR = 8,
 };
 
 typedef enum {
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index bd4e69ed1c3..7b3636f1615 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -95,7 +95,7 @@ EnumPropertyItem rna_enum_brush_vertex_tool_items[] = {
 	{PAINT_BLEND_LIGHTEN, "LIGHTEN", ICON_BRUSH_LIGHTEN, "Lighten", "Use lighten blending mode while painting"},
 	{PAINT_BLEND_DARKEN, "DARKEN", ICON_BRUSH_DARKEN, "Darken", "Use darken blending mode while painting"},
 	{PAINT_BLEND_AVERAGE, "AVERAGE", ICON_BRUSH_BLUR, "Average", "Use average blending mode while painting" },
-	{PAINT_BLEND_SMUDGE, "SMUDGE", ICON_BRUSH_BLUR, "Smudge", "Use smudge blending mode while painting" },
+	{PAINT_BLEND_SMEAR, "SMEAR", ICON_BRUSH_BLUR, "Smear", "Use smear blending mode while painting" },
 	{0, NULL, 0, NULL, NULL}
 };




More information about the Bf-blender-cvs mailing list