GPencil: Fix unreported error in Dots Strokes material initialization
The materials was not initializated in the right mode.
This commit is contained in:
parent
dbb1f56e55
commit
ef0ff4aaf2
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue