[Bf-blender-cvs] [56b345adc6f] blender-v2.83-release: GPencil: Fix unreported error in Dots Strokes material initialization

Antonio Vazquez noreply at git.blender.org
Thu Jun 11 09:35:43 CEST 2020


Commit: 56b345adc6fd12954a9320c7ed76e30115a279ac
Author: Antonio Vazquez
Date:   Wed Jun 3 18:01:23 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB56b345adc6fd12954a9320c7ed76e30115a279ac

GPencil: Fix unreported error in Dots Strokes material initialization

The materials was not initializated in the right mode.

===================================================================

M	source/blender/blenkernel/intern/brush.c

===================================================================

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. */



More information about the Bf-blender-cvs mailing list