diff options
author | Antonioya <blendergit@gmail.com> | 2019-04-10 12:31:37 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-04-10 12:31:37 +0300 |
commit | 99f1e3d57fa1ee1f4400c299f1247ac5c614b6f0 (patch) | |
tree | d020d007edebf5a03db1489bcfb5232309c981fa /source/blender | |
parent | f9e0836147e5ad6168bce381ca36b61a169b165a (diff) |
Fix T63455: Legacy GPencil settings in Annotations
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 8 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_ops_versioning.c | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 6eeb70c3e16..6407a0a058e 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -571,6 +571,14 @@ static void do_versions_fix_annotations(bGPdata *gpd) for (bGPDpalettecolor *palcolor = palette->colors.first; palcolor; palcolor = palcolor->next) { /* fix layers */ for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) { + /* unlock/unhide layer */ + gpl->flag &= ~GP_LAYER_LOCKED; + gpl->flag &= ~GP_LAYER_HIDE; + /* set opacity to 1 */ + gpl->opacity = 1.0f; + /* disable tint */ + gpl->tintcolor[3] = 0.0f; + for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) { for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { if ((gps->colorname[0] != '\0') && diff --git a/source/blender/editors/gpencil/gpencil_ops_versioning.c b/source/blender/editors/gpencil/gpencil_ops_versioning.c index f4e1b9aa83d..9fdb5a9b174 100644 --- a/source/blender/editors/gpencil/gpencil_ops_versioning.c +++ b/source/blender/editors/gpencil/gpencil_ops_versioning.c @@ -170,6 +170,13 @@ static int gpencil_convert_old_files_exec(bContext *C, wmOperator *op) for (bGPDpalettecolor *palcolor = palette->colors.first; palcolor; palcolor = palcolor->next) { /* fix layers */ for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) { + /* unlock/unhide layer */ + gpl->flag &= ~GP_LAYER_LOCKED; + gpl->flag &= ~GP_LAYER_HIDE; + /* set opacity to 1 */ + gpl->opacity = 1.0f; + /* disable tint */ + gpl->tintcolor[3] = 0.0f; for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) { for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { if ((gps->colorname[0] != '\0') && |