From 56b345adc6fd12954a9320c7ed76e30115a279ac Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 3 Jun 2020 18:01:23 +0200 Subject: GPencil: Fix unreported error in Dots Strokes material initialization The materials was not initializated in the right mode. --- source/blender/blenkernel/intern/brush.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source') diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index ab107218214..64b57838ad8 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -477,6 +477,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. */ @@ -701,6 +702,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. */ -- cgit v1.2.3