[Bf-blender-cvs] [8c32004af10] greasepencil-refactor: GPencil: Patch old files to enable layer lights switch

Antonio Vazquez noreply at git.blender.org
Mon Jan 6 22:46:54 CET 2020


Commit: 8c32004af10b5963a0bb34335952cad604cc7443
Author: Antonio Vazquez
Date:   Mon Jan 6 22:46:45 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB8c32004af10b5963a0bb34335952cad604cc7443

GPencil: Patch old files to enable layer lights switch

With the new switch at object level, the layers must be set to ON by default.

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

M	source/blender/blenloader/intern/versioning_280.c

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

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 55a0fb00963..c2048eacc01 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -4438,7 +4438,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
         }
       }
 
-      /* Fix Layers Colors and Vertex Colors to Linear. */
+      /* Fix Layers Colors and Vertex Colors to Linear.
+       * Also set lights to on for layers. */
       LISTBASE_FOREACH (bGPdata *, gpd, &bmain->gpencils) {
         if (gpd->flag & GP_DATA_ANNOTATIONS) {
           continue;
@@ -4448,6 +4449,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
         srgb_to_linearrgb_v3_v3(gpd->gcolor_next, gpd->gcolor_next);
 
         LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
+          gpl->flag |= GP_LAYER_USE_LIGHTS;
           srgb_to_linearrgb_v4(gpl->tintcolor, gpl->tintcolor);
 
           LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {



More information about the Bf-blender-cvs mailing list