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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index d76403521d9..6252741799a 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -69,8 +69,8 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op))
}
else {
br = BKE_brush_add(bmain, "Brush", BKE_paint_object_mode_from_paintmode(mode));
- id_us_min(&br->id); /* fake user only */
}
+ id_us_min(&br->id); /* fake user only */
BKE_paint_brush_set(paint, br);
@@ -104,12 +104,13 @@ static int brush_add_gpencil_exec(bContext *C, wmOperator *UNUSED(op))
}
else {
br = BKE_brush_add(bmain, "Brush", OB_MODE_PAINT_GPENCIL);
- id_us_min(&br->id); /* fake user only */
/* Init grease pencil specific data. */
BKE_brush_init_gpencil_settings(br);
}
+ id_us_min(&br->id); /* fake user only */
+
BKE_paint_brush_set(paint, br);
return OPERATOR_FINISHED;