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:
authorAntonio Vazquez <blendergit@gmail.com>2020-06-03 19:01:23 +0300
committerJeroen Bakker <jeroen@blender.org>2020-06-11 10:34:39 +0300
commit56b345adc6fd12954a9320c7ed76e30115a279ac (patch)
treed2ae4edabed5890beda94bff154e11f2e3a2e391 /source/blender/blenkernel/intern
parent404c3adfcc768546381eb1efbbe4a9cf95847bb4 (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')
-rw-r--r--source/blender/blenkernel/intern/brush.c2
1 files changed, 2 insertions, 0 deletions
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. */