diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-06-03 19:01:23 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-06-03 19:01:34 +0300 |
commit | ef0ff4aaf2515a34fd850d576f883a6b16515345 (patch) | |
tree | 33ec483d6ef97edbfa9ff2df4fb29bc7ef833652 /source/blender/blenkernel/intern/brush.c | |
parent | dbb1f56e5537d19faf6797ecea9cdc5e0b57f9e8 (diff) |
GPencil: Fix unreported error in Dots Strokes material initialization
The materials was not initializated in the right mode.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 133917e441c..3241518cae5 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -520,6 +520,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) Material *ma = BLI_findstring(&bmain->materials, "Dots Stroke", offsetof(ID, name) + 2); if (ma == NULL) { ma = BKE_gpencil_material_add(bmain, "Dots Stroke"); + ma->gp_style->mode = GP_MATERIAL_MODE_DOT; } brush->gpencil_settings->material = ma; /* Pin the matterial to the brush. */ @@ -744,6 +745,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) Material *ma = BLI_findstring(&bmain->materials, "Dots Stroke", offsetof(ID, name) + 2); if (ma == NULL) { ma = BKE_gpencil_material_add(bmain, "Dots Stroke"); + ma->gp_style->mode = GP_MATERIAL_MODE_DOT; } brush->gpencil_settings->material = ma; /* Pin the matterial to the brush. */ |