svn merge ^/trunk/blender -r46300:46330
[blender.git] / source / blender / editors / sculpt_paint / paint_ops.c
index 6860b55155660832d4813bf97ad027da21659cd2..bf01c91171bfb21c87680543b337b48ec8e117c8 100644 (file)
@@ -63,9 +63,9 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op))
        struct Brush *br = paint_brush(paint);
 
        if (br)
-               br = copy_brush(br);
+               br = BKE_brush_copy(br);
        else
-               br = add_brush("Brush");
+               br = BKE_brush_add("Brush");
 
        paint_brush_set(paint_get_active(CTX_data_scene(C)), br);
 
@@ -98,7 +98,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
        if (brush) {
                // pixel radius
                {
-                       const int old_size = brush_size(scene, brush);
+                       const int old_size = BKE_brush_size_get(scene, brush);
                        int size = (int)(scalar * old_size);
 
                        if (old_size == size) {
@@ -111,17 +111,17 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
                        }
                        CLAMP(size, 1, 2000); // XXX magic number
 
-                       brush_set_size(scene, brush, size);
+                       BKE_brush_size_set(scene, brush, size);
                }
 
                // unprojected radius
                {
-                       float unprojected_radius = scalar * brush_unprojected_radius(scene, brush);
+                       float unprojected_radius = scalar * BKE_brush_unprojected_radius_get(scene, brush);
 
                        if (unprojected_radius < 0.001f) // XXX magic number
                                unprojected_radius = 0.001f;
 
-                       brush_set_unprojected_radius(scene, brush, unprojected_radius);
+                       BKE_brush_unprojected_radius_set(scene, brush, unprojected_radius);
                }
        }
 
@@ -160,6 +160,7 @@ static void PAINT_OT_vertex_color_set(wmOperatorType *ot)
        /* identifiers */
        ot->name = "Set Vertex Colors";
        ot->idname = "PAINT_OT_vertex_color_set";
+       ot->description = "Fill the active vertex color layer with the current paint color";
        
        /* api callbacks */
        ot->exec = vertex_color_set_exec;
@@ -178,7 +179,7 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op))
        if (!ob) return OPERATOR_CANCELLED;
 
        if (ob->mode & OB_MODE_SCULPT)
-               brush_reset_sculpt(brush);
+               BKE_brush_sculpt_reset(brush);
        /* TODO: other modes */
 
        return OPERATOR_FINISHED;