GPencil: Fix unreported error in Dots Strokes material initialization
The materials was not initializated in the right mode.
This commit is contained in:
parent
404c3adfcc
commit
56b345adc6
Notes:
blender-bot
2023-02-14 03:52:45 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue