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:
authorCampbell Barton <ideasman42@gmail.com>2018-01-10 11:58:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-10 11:58:05 +0300
commit2b56faebe5f2a8e2b37004485206007d22cdac1d (patch)
treef96042f4c8f9b9c06b3b9f694d207f1bc62a5a5c /source/blender/blenkernel/intern/paint.c
parent5ff33ecdf0ed319db2e589926a614f67738531a6 (diff)
parent18f53d8822518928baceab1407eac195ab9bf817 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r--source/blender/blenkernel/intern/paint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 11702236066..47df20906c7 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -532,8 +532,10 @@ void BKE_paint_init(Scene *sce, ePaintMode mode, const char col[3])
short ob_mode = BKE_paint_object_mode_from_paint_mode(mode);
brush = BKE_brush_first_search(G.main, ob_mode);
- if (!brush)
+ if (!brush) {
brush = BKE_brush_add(G.main, "Brush", ob_mode);
+ id_us_min(&brush->id); /* fake user only */
+ }
BKE_paint_brush_set(paint, brush);
}