[Bf-blender-cvs] [e7d8b945cec] master: GP: Fix missing initialization converting 2.7 files
Antonioya
noreply at git.blender.org
Sun Jan 6 17:22:34 CET 2019
Commit: e7d8b945cec7813012d1c4e2623f4074b7cb5665
Author: Antonioya
Date: Sun Jan 6 17:22:03 2019 +0100
Branches: master
https://developer.blender.org/rBe7d8b945cec7813012d1c4e2623f4074b7cb5665
GP: Fix missing initialization converting 2.7 files
===================================================================
M source/blender/editors/gpencil/gpencil_old.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_old.c b/source/blender/editors/gpencil/gpencil_old.c
index a2012be223d..8f1344acb43 100644
--- a/source/blender/editors/gpencil/gpencil_old.c
+++ b/source/blender/editors/gpencil/gpencil_old.c
@@ -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) {
More information about the Bf-blender-cvs
mailing list