GP: Fix missing initialization converting 2.7 files

This commit is contained in:
Antonioya 2019-01-06 17:22:03 +01:00
parent eb55990777
commit e7d8b945ce
1 changed files with 12 additions and 1 deletions

View File

@ -127,7 +127,18 @@ static int gpencil_convert_old_files_exec(bContext *C, wmOperator *UNUSED(op))
MaterialGPencilStyle *gp_style = ma->gp_style;
copy_v4_v4(gp_style->stroke_rgba, palcolor->color);
copy_v4_v4(gp_style->fill_rgba, palcolor->fill);
gp_style->flag = palcolor->flag;
/* set basic settings */
gp_style->pattern_gridsize = 0.1f;
gp_style->gradient_radius = 0.5f;
ARRAY_SET_ITEMS(gp_style->mix_rgba, 1.0f, 1.0f, 1.0f, 0.2f);
ARRAY_SET_ITEMS(gp_style->gradient_scale, 1.0f, 1.0f);
ARRAY_SET_ITEMS(gp_style->texture_scale, 1.0f, 1.0f);
gp_style->texture_opacity = 1.0f;
gp_style->texture_pixsize = 100.0f;
gp_style->flag |= GP_STYLE_STROKE_SHOW;
gp_style->flag |= GP_STYLE_FILL_SHOW;
/* fix strokes */
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {