Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_ops.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 43ff03ea7e2..f4586fa130d 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -56,9 +56,8 @@
#include "paint_intern.h"
#include "sculpt_intern.h"
-#include <string.h>
-//#include <stdio.h>
#include <stddef.h>
+#include <string.h>
/* Brush operators */
static int brush_add_exec(bContext *C, wmOperator *UNUSED(op))
@@ -70,7 +69,7 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op))
ePaintMode mode = BKE_paintmode_get_active_from_context(C);
if (br) {
- br = BKE_brush_copy(bmain, br);
+ br = (Brush *)BKE_id_copy(bmain, &br->id);
}
else {
br = BKE_brush_add(bmain, "Brush", BKE_paint_object_mode_from_paintmode(mode));
@@ -105,7 +104,7 @@ static int brush_add_gpencil_exec(bContext *C, wmOperator *UNUSED(op))
Main *bmain = CTX_data_main(C);
if (br) {
- br = BKE_brush_copy(bmain, br);
+ br = (Brush *)BKE_id_copy(bmain, &br->id);
}
else {
br = BKE_brush_add(bmain, "Brush", OB_MODE_PAINT_GPENCIL);
@@ -144,7 +143,7 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
float scalar = RNA_float_get(op->ptr, "scalar");
if (brush) {
- // pixel radius
+ /* pixel radius */
{
const int old_size = BKE_brush_size_get(scene, brush);
int size = (int)(scalar * old_size);
@@ -161,11 +160,11 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op)
BKE_brush_size_set(scene, brush, size);
}
- // unprojected radius
+ /* unprojected radius */
{
float unprojected_radius = scalar * BKE_brush_unprojected_radius_get(scene, brush);
- if (unprojected_radius < 0.001f) { // XXX magic number
+ if (unprojected_radius < 0.001f) { /* XXX magic number */
unprojected_radius = 0.001f;
}
@@ -1357,6 +1356,7 @@ void ED_operatortypes_paint(void)
WM_operatortype_append(PAINT_OT_mask_flood_fill);
WM_operatortype_append(PAINT_OT_mask_lasso_gesture);
WM_operatortype_append(PAINT_OT_mask_box_gesture);
+ WM_operatortype_append(PAINT_OT_mask_line_gesture);
}
void ED_keymap_paint(wmKeyConfig *keyconf)