Commit: 99f1e3d57fa1ee1f4400c299f1247ac5c614b6f0
Author: Antonioya
Date:   Wed Apr 10 11:31:37 2019 +0200
Branches: master
https://developer.blender.org/rB99f1e3d57fa1ee1f4400c299f1247ac5c614b6f0

Fix T63455: Legacy GPencil settings in Annotations

===================================================================

M       source/blender/blenloader/intern/versioning_280.c
M       source/blender/editors/gpencil/gpencil_ops_versioning.c

===================================================================

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') &&

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to