diff options
author | Antonioya <blendergit@gmail.com> | 2019-03-25 19:02:42 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-03-25 19:06:07 +0300 |
commit | 7021bd527380b4d87cf48057f0039509326b03dd (patch) | |
tree | 55126437da17d736a789d236c8a98d199a1e6260 /source/blender/blenkernel/intern/brush.c | |
parent | 84240ebb3ebde58f6bfba256e49d37697fb6bc9f (diff) |
GPencil: Only brushes with pinned materials have materials
Using GP_BRUSH_MATERIAL_PINNED to switch between active material and brush material, instead of updating all brushes on active material changes. This will allow brushes to have no material and therefore to not inflate the user count.
This fix T62465.
Patch contributed by @matc
Reviewers: @brecht @antoniov @billreynish @mendio
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index c959504f84f..ea5605d8ed1 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -540,24 +540,6 @@ void BKE_brush_gpencil_presets(bContext *C) } -void BKE_brush_update_material(Main *bmain, Material *ma, Brush *exclude_brush) -{ - for (Brush *brush = bmain->brushes.first; brush; brush = brush->id.next) { - if ((exclude_brush != NULL) && (brush == exclude_brush)) { - continue; - } - - if (brush->gpencil_settings != NULL) { - BrushGpencilSettings *gpencil_settings = brush->gpencil_settings; - if (((gpencil_settings->flag & GP_BRUSH_MATERIAL_PINNED) == 0) && - (gpencil_settings->material != ma)) - { - gpencil_settings->material = ma; - } - } - } -} - struct Brush *BKE_brush_first_search(struct Main *bmain, const eObjectMode ob_mode) { Brush *brush; |